I have a Graphics2D object that has a clip set. If I do a System.out.println(g2d.getClip()) I get this:
java.awt.geom.Rectangle2D$Float[x=0.0,y=0.0,w=594.0,h=841.0]
The graphics object is also scaled.
The image I am drawing using g2d.drawImage(image,x,y,this) is larger than the clip.
I expect everything outside the clip not to be drawn. This does not happen - the image is drawn outside the clip.
Why doesn't drawImage() care about the clip?
The image is located in a JInternalFrame.
If I do a tab to switch from the java application to another app, and then go back, the image is drawn even outside the JInternalFrame.
It seems to behave very strange. Any hints on what to look into here?
java.awt.geom.Rectangle2D$Float[x=0.0,y=0.0,w=594.0,h=841.0]
The graphics object is also scaled.
The image I am drawing using g2d.drawImage(image,x,y,this) is larger than the clip.
I expect everything outside the clip not to be drawn. This does not happen - the image is drawn outside the clip.
Why doesn't drawImage() care about the clip?
The image is located in a JInternalFrame.
If I do a tab to switch from the java application to another app, and then go back, the image is drawn even outside the JInternalFrame.
It seems to behave very strange. Any hints on what to look into here?