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/08/27 11:43:30 UTC
[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
[ 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.