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] Assigned: (HARMONY-4680) [classlib][awt] No correct result of java.awt.Graphics2D.scale() method use when the drawing figure is java.awt.geom.Area object
Date Mon, 27 Aug 2007 09:43:30 GMT

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

Alexey Petrenko reassigned HARMONY-4680:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][awt] No correct result of java.awt.Graphics2D.scale() method use when the
drawing figure is java.awt.geom.Area object
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4680
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4680
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Nellya Udovichenko
>            Assignee: Alexey Petrenko
>         Attachments: H-4680.patch
>
>
> After the test launching we get
> at RI: 2 figures - red and blue ellipses;
> at Harmony: 3 figures: cyan, red and blue ellipses;
> But the blue ellipse has to be transformed. So it covers the cyan one.
> Test:
> import java.awt.BorderLayout;
> import java.awt.Color;
> import java.awt.Graphics;
> import java.awt.Graphics2D;
> import java.awt.geom.Area;
> import java.awt.geom.Ellipse2D;
> import javax.swing.*;
> public class Test extends JPanel {
>     protected void paintComponent(Graphics g) {
>         Graphics2D g2 = (Graphics2D) g;
>         g2.scale(200.0 / 100.0, 200.0 / 140.0);
>         
>         Ellipse2D circle = new Ellipse2D.Double(25, 70, 50.0, 50.0);
>         g2.setColor(Color.cyan);
>         g2.draw(circle);
>         Ellipse2D oval = new Ellipse2D.Double(30, 50, 40.0, 70.0);
>         g2.setColor(Color.red);
>         g2.draw(oval);
>         Area ar = new Area(circle);
>         g2.setColor(Color.blue);
>         g2.draw(ar);
>     }
>     public static void main(String[] args) {
>         JFrame frame = new JFrame();
>         frame.getContentPane().setLayout(new BorderLayout());
>         frame.getContentPane().add(new PolygonTest());
>         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>         frame.setSize(800, 600);
>         frame.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