You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Dmitry A. Durnev (JIRA)" <ji...@apache.org> on 2006/10/02 11:30:20 UTC

[jira] Updated: (HARMONY-1652) [classlib][awt] Graphics doesn't draw image if clip is set to null

     [ http://issues.apache.org/jira/browse/HARMONY-1652?page=all ]

Dmitry A. Durnev updated HARMONY-1652:
--------------------------------------

    Attachment: H1652-fix.patch

Attached fix.

> [classlib][awt] Graphics doesn't draw image if clip is set to null
> ------------------------------------------------------------------
>
>                 Key: HARMONY-1652
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1652
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows
>            Reporter: Dmitry A. Durnev
>            Priority: Minor
>         Attachments: H1652-fix.patch
>
>
> Compile & run the following test:
> import java.awt.Color;
> import java.awt.Frame;
> import java.awt.Graphics;
> import java.awt.Image;
> import java.awt.Insets;
> import java.awt.image.BufferedImage;
> public class DrawImageTest {
>     public static void main(String[] args) {
>         Frame f = new Frame("draw image test"){
>             
>             public void paint(Graphics g) {
>                 g.setClip(null);
>                 Insets ins = getInsets();
>                 g.drawImage(getBufImg(50), ins.left, ins.top, null);
>             }
>         };
>         f.setSize(100, 100);
>         f.show();
>     }
>     
>     static Image getBufImg(int size) {
>         final BufferedImage img = new BufferedImage(size, size,
>                 BufferedImage.TYPE_INT_ARGB);
>         Graphics g = img.getGraphics();
>         g.setColor(Color.RED);
>         g.fillRect(0, 0, size, size);
>         return img;
>     }
> }
> On RI image (red square of size 50x50 pixels) appears in the upper-left corner of the window.
> On Harmony(for example the last snapshot - r450941) no image appears at all.

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