Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Cannot figure out why alpha is acting strange here!

$
0
0
Transparency works! It's just that Processing transforms a transparent color into an opaque equivalent 
when it is drawn at the main screen!

The deal is, the color code you draw isn't the same you read from canvas afterwards!

I was thinking about what you would do to tame it and come up w/ an idea:

You coulda created a parallel PGraphics instance as an intermediary buffer.
The idea is that you would draw in it rather than directly in main PGraphics.

Once it's ready, you stamp the resultant drawings from it in the main canvas, so it can be rendered.

However, when you need to read a color code, 
you read from your parallel buffer instead of directly from canvas!
Since a PImage or PGraphics retain its alpha value!

Viewing all articles
Browse latest Browse all 1768

Trending Articles