Hi Karys,
I'm dealing with the same problem.
When doing a bufferdImage.clearRect() , all pixels of the bufImage are set to
the BackgroundColor --white in your case. You can set the backgroundColor using
the Graphic Context of the Image. however, when another thread creates a new
Graphic Context, the backgroundColor will still be white.
I couldn't find any way to set the BackgroundColor of a BufferedImage
permanently.
If you did, please let me know !
Cheers,
Mark
Image image= new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);
Graphics g = image.getGraphics();
if( g instanceof Graphics2D ){
Graphics2D g2d = (Graphics2D) g;
// make sure the background is filled with transparent pixels
when cleared !
g2d.setBackground(new Color(0,0,0,0));
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_IN, 0.0f));
}
[Message sent by forum member 'mark_minnoye' (mark_minnoye)]
http://forums.java.net/jive/thread.jspa?messageID=324664
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".