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/12/05 13:44:43 UTC
[jira] Resolved: (HARMONY-5258) [classlib][awt] Graphics draw and
fill methods work incorrectly with AlphaComposite different from
AlphaComposite.Src
[ https://issues.apache.org/jira/browse/HARMONY-5258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko resolved HARMONY-5258.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.0M4
The patch has been applied.
Please verify.
> [classlib][awt] Graphics draw and fill methods work incorrectly with AlphaComposite different from AlphaComposite.Src
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-5258
> URL: https://issues.apache.org/jira/browse/HARMONY-5258
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Linux
> Reporter: Igor V. Stolyarov
> Assignee: Alexey Petrenko
> Fix For: 5.0M4
>
> Attachments: H-5258.patch, Harmony.PNG, RI.PNG
>
>
> Graphics draw and fill methods work incorrectly with AlphaComposite different from AlphaComposite.Src
> Simple reproducer:
> import java.io.*;
> import java.awt.*;
> import java.awt.image.*;
> import javax.swing.*;
> public class FillRectTest extends JFrame {
> public static void main(String[] args){
> final FillRectTest test = new FillRectTest();
> 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 = getWidth();
> int h = getHeight();
> g.setColor(Color.green);
> g.fillRect(0, 0, w, h);
> Graphics2D g2d = (Graphics2D)g;
> g2d.setColor(Color.red);
> g2d.setComposite(composite);
> g2d.fillRect(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.