I'm not sure what sort of performance penality there is but I have had success
using the following:
BufferedImage pixmap = GraphicsEnvironment.getLocalGraphicsEnvironment()
.getDefaultScreenDevice().getDefaultConfiguration()
.createCompatibleImage((int)bounds.getWidth(), (int)bounds.getHeight(),
Transparency.TRANSLUCENT);
HTH,
chris
John Sproull wrote:
> Hi all, now that I've ditched the Area idea, i'm trying to construct a
> completely transparent image which i will then draw polygons on and then,
> in turn, draw the image to the main graphics context which i have. the
> only thing is that i can't seem to figure out how to replace the pixels on
> the image with transparent ones. I've tried every combination of source
> and alpha using
> AlphaComposite.getInstance(). i must've missed one. my image still has a
> background color when it draws.
>
> thanks again.
>
> John
>
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 2D Home Page: http://java.sun.com/products/java-media/2D/
--
------------------------------------
Chris Grindstaff - Applied Reasoning
mailto:[EMAIL PROTECTED]
http://www.appliedreasoning.com
919-851-7677
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/