Re: transparent colors and setXORMode doesn't work together



Which two rectangle? Did you mean the blue Ellipse2D and Rectangle2D?

yup

since it didn't worked I suggest another (a bit tricky) way -
use two BufferedImages:
first (TYPE_INT_ARGB) for image data and second (TYPE_BYTE_GRAY) for alpha.

1) first fill first image with opaque white and second with black.
2) draw your figures to both images
3) copy pixel data from second image to alpha channel of first image (you
will need access to DataBuffer)

Andrey

--
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities


.



Relevant Pages

  • Re: About Factory Method and Abstract Factory (design pattern)
    ... revolves around implementations in Java, so you might want to look in Java-specific forums. ... The first image just shows the complete Cloudscape implementation of the factory, while the second diagram shows a partial implementation for three different providers. ... but i just to know pattern. ...
    (microsoft.public.dotnet.languages.csharp)
  • Drawing multiple images in Java
    ... I am investigating the feasibility of using Java for a project and need ... Draw a semi-transparent blue rectangle on this. ... first image. ... I greatly appreciate anyone that can help me prove to my boss that this ...
    (comp.lang.java.help)