harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-5263) [classlib][awt] Graphics drawPolyline & drawPolygon methods work incorretly in XORMode
Date Thu, 06 Dec 2007 08:17:43 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-5263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Petrenko updated HARMONY-5263:
-------------------------------------

    Fix Version/s: 5.0M4

> [classlib][awt] Graphics drawPolyline & drawPolygon methods work incorretly in XORMode
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5263
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5263
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Linux
>            Reporter: Igor V. Stolyarov
>            Assignee: Alexey Petrenko
>             Fix For: 5.0M4
>
>         Attachments: H-5263.patch, Harmony.PNG, RI.PNG
>
>
> Graphics drawPolyline & drawPolygon methods work incorretly in XORMode
> Simple reproducer:
> import java.io.*; 
> import java.awt.*; 
> import java.awt.image.*; 
> import javax.swing.*; 
> public class DrawPolylineTest extends JFrame { 
>    public static void main(String[] args){ 
>       final DrawPolylineTest test = new DrawPolylineTest(); 
>       test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
>       test.setSize(200, 200); 
>       test.add(new Panel(){
>           public void paint(Graphics g){
>               int w = getWidth();
>               int h = getHeight();
>               int num = 8;
>               int x[] = new int[num];
>               int y[] = new int[num];
>               x[0] = w / 3;
>               x[1] = w / 6;
>               x[2] = w / 4;
>               x[3] = (w / 5) * 2;
>               x[4] = (w / 3) * 2;
>               x[5] = (w / 5) * 3;
>               x[6] = w - w / 6;
>               x[7] = w / 2;
>               y[0] = h - h / 5;
>               y[1] = h - h / 3;
>               y[2] = h / 6;
>               y[3] = h / 3;
>               y[4] = h / 4;
>               y[5] = (h / 5) * 3;
>               y[6] = h - h / 4;
>               y[7] = h - h / 6;
>               g.setColor(Color.green);
>               g.fillRect(0, 0, w, h);
>               g.setColor(Color.red);
>               g.setXORMode(Color.blue);
>               g.drawPolyline(x, y, num);
>           }
>       });
>       test.setVisible(true);
>    } 
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message