You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/10/31 15:50:17 UTC
[jira] Updated: (HARMONY-2020) [classlib][awt] Stroke is not
produces proper shapes
[ http://issues.apache.org/jira/browse/HARMONY-2020?page=all ]
Denis Kishenko updated HARMONY-2020:
------------------------------------
Attachment: expected.PNG
Expected 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