How to draw transparent area in button?


#1

I am using a png file, but I can’t seem to get Juce to treat the white area as transparent so the underlying component color is painted instead.

How do you do this?


#2

Make part of your png transparent and it’ll be transparent…


#3

I thought I was doing this but maybe I didn’t do it right. Does JUCE support any other image formats besides png?


#4

it does jpeg + gif, but a png is the thing you want.


#5

Well I have a weird issue. I see that in Paintshop Pro my png has one pixel that is transparent, but when I load it in JUCE and query its isUsingALpha or whatever that method is, it comes back false.


#6

ah well, you’re probably doing something wrong in PSP. I use pngs all the time from photoshop and they work just fine.


#7