Image transparency


#1

Hi all,
I’ve a problem with Image transparency. I have several components superposed, every one with a background with a dynamic opacity and a foreground completely opaque. In order to optimize paint function, I would like to use for every component an offscreen image updated only when needed. I’ve tried with a juce Image, but if I draw an image with a transparent or semi-transparent background in top of the others (using drawImageAt), the result is a black background.

How do that?
Many thanks for any suggestion
Best regards
Riccardo


#2

And you’ve definitely not called setOpaque(true) on these components?


#3

yes, components are all not opaque


#4

Then either your image is RGB instead of ARGB, or you’ve painted it black, or you’re drawing black somewhere else. It’ll be something obvious, I’m sure!


#5

why not just call setBufferedToImage(true); ?

http://www.rawmaterialsoftware.com/juce/api/classComponent.html#6c2cc1b90ba72443ed9241fff11a9441


#6

Fixed. yes, was something obvious.
Many Thanks