I am using Processing V2.0a6 and In my sketch I
The idea was that those areas of the buffer that were not drawn to, should be transparent when drawn on the main display surface. Unfortunately they were white.
Somewhere along the way I lost the transparency.
I see three possibilities (not mutually exclusive)
Any thoughts on this would be appreciated.
- Used createGraphics to create a PGraphicsJava2D off-screen buffer (pg)
- Used pg.background(pg.color(255,0)); to set a fully transparent background
- Used pg.image() to draw some images to the buffer (does not fill the complete surface)
- Used pg.get() to get a PImage of the buffer
- Then displayed the buffer image on the main PApplet draw() method.
The idea was that those areas of the buffer that were not drawn to, should be transparent when drawn on the main display surface. Unfortunately they were white.
Somewhere along the way I lost the transparency.
I see three possibilities (not mutually exclusive)
- creatGraphics does create an ARGB surface,
- setting the bacground with an ARGB colour does not give an ARGB surface (this is suggested/ hinted at in the Javadoc comments), or
- the alpha channel is lost when using get()
Any thoughts on this would be appreciated.
1