harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry A. Durnev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1448) [classlib][awt] Paint can be set to null by Graphics2D.setPaint()
Date Tue, 12 Sep 2006 15:47:26 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1448?page=comments#action_12434191 ] 
            
Dmitry A. Durnev commented on HARMONY-1448:
-------------------------------------------

Calling this method with a null Paint object does not have any effect on the current Paint
attribute of this Graphics2D. 
But on Harmony we can set Paint to null. The following test

------------------------------------------------------------------------
import java.awt.Frame;
import java.awt.Graphics2D;
import java.awt.Paint;


public class PaintTest {
    
    public static void main(String[] args) {
        Frame f = new Frame();
        f.addNotify();
        Graphics2D g2d = (Graphics2D) f.getGraphics();
        Paint paint = g2d.getPaint();
        System.out.println(paint);
        g2d.setPaint(null);
        System.out.println(g2d.getPaint());

    }

}
---------------------------------------------------------------

prints:

java.awt.Color[r=0,g=0,b=0]
java.awt.Color[r=0,g=0,b=0]

on RI and

java.awt.SystemColor[index=9]
null

on Harmony. 

> [classlib][awt] Paint can be set to null by Graphics2D.setPaint()
> -----------------------------------------------------------------
>
>                 Key: HARMONY-1448
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1448
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry A. Durnev
>            Priority: Minor
>
> Spec says:

-- 
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

        

Mime
View raw message