harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor V. Stolyarov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-5240) [classlib][awt] Graphics.drawOval incorrectly works with AlphaComposite different from AlphaComposite.SrcOver
Date Mon, 03 Dec 2007 11:00:43 GMT

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

Igor V. Stolyarov updated HARMONY-5240:
---------------------------------------

    Attachment: RI.JPG
                Harmony.JPG

> [classlib][awt] Graphics.drawOval incorrectly works with AlphaComposite different from
AlphaComposite.SrcOver
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5240
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5240
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Win 
>            Reporter: Igor V. Stolyarov
>         Attachments: Harmony.JPG, RI.JPG
>
>
> Graphics.drawOval incorrectly works with AlphaComposite different from AlphaComposite.SrcOver
> Simple reproducer:
> import java.io.*; 
> import java.awt.*; 
> import java.awt.image.*; 
> import javax.swing.*; 
> public class DrawOvalTest extends JFrame { 
>    public static void main(String[] args){ 
>       final DrawOvalTest test = new DrawOvalTest(); 
>       test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
>       test.setSize(200, 200); 
>       test.add(new Panel(){
>           public void paint(Graphics g){
>               Composite composite = AlphaComposite.Clear;
>               int w = test.getWidth();
>               int h = test.getHeight();
>               g.setColor(Color.green);
>               g.fillRect(0, 0, w, h);
>               Graphics2D g2d = (Graphics2D)g;
>               g2d.setColor(Color.red);
>               g2d.setComposite(composite);
>               g2d.drawOval(w/4, h/4, w/2, h/2);
>           }
>       });
>       test.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