harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2020) [classlib][awt] Stroke is not produces proper shapes
Date Tue, 31 Oct 2006 14:50:20 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2020?page=all ]

Denis Kishenko updated HARMONY-2020:
------------------------------------

    Attachment: actual.PNG

Actual image

> [classlib][awt] Stroke is not produces proper shapes
> ----------------------------------------------------
>
>                 Key: HARMONY-2020
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2020
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Attachments: actual.PNG, expected.PNG
>
>
> The created shapes are not as expected. I expected top have 2x2 rects (as RI does), but
have 1x2 lines instead.
> ================ Test ================
> import java.awt.BasicStroke;
> import java.awt.Color;
> import java.awt.Frame;
> import java.awt.Graphics;
> import java.awt.Graphics2D;
> import java.awt.Panel;
> public class Test {
>     public static void main(String args[]) throws Exception {
>         Frame f = new Frame();
>         Panel p = new Panel() {
>             public void paint(final Graphics g) {
>                 super.paint(g);
>                 Graphics2D g2d = (Graphics2D)g;
>                 g2d.setStroke(new BasicStroke(2, BasicStroke.CAP_BUTT,
> BasicStroke.JOIN_BEVEL, 0, new float[] {2, 4}, 0));
>                 for (int i = 0; i < getHeight(); i += 3) {
>                     g.setColor(Color.RED);
>                     g.drawLine(0, i, getWidth(), i);
>                 }
>             }
>         };
>         f.add(p);
>         f.setSize(200, 200);
>         f.setVisible(true);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message