Clearing a transparent Graphics object


#1

Hi all,

Take a transparent Graphics context. Draw some non-transparent stuff in it. Now how can you erase what you've drawn ? 

If you call g.fillAll(juce::Colours::black), it will erase it but your Graphics won't be transparent anymore.

If you call g.fillAll(juce::Colours::transparentBlack), it won't erase it.

Any ideas ?

 

 

 

 


#2

You don't erase it.

You can erase an Image, but a Graphics is device-independent, and won't necessarily be drawing to a target where the concept of "erasing" would make sense.


#3

I see - thanks for the clarification !