You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2007/12/06 09:03:43 UTC

[jira] Assigned: (HARMONY-5263) [classlib][awt] Graphics drawPolyline & drawPolygon methods work incorretly in XORMode

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

Alexey Petrenko reassigned HARMONY-5263:
----------------------------------------

    Assignee: Alexey Petrenko

> [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
>         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.