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] Created: (HARMONY-1652) [classlib][awt] Graphics doesn't draw image if clip is set to null
Date Mon, 02 Oct 2006 09:17:19 GMT
[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


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

        

Mime
View raw message