Re: Image/Pixbuf: How to set colour "behind" (semi)-transparent data?



Carl Nygard wrote:

On Mon, 2005-02-28 at 16:20 +0100, Toralf Lund wrote:
When drawing a pixbuf which has an alpha channel, how do I set the background colour? I'm talking about the colour that will "shine through" fully or partially where alpha value<255. (Seems like a grayish colour is the default; I actually want black instead.)

I'd think you'd have to draw the bkgr color in the drawable first, then
draw the pixbuf.
Hmm. Yes, that may be it. I actually realised after I asked the question, that I could change the colour visible through the transparent pixels by setting the background of the container (a Gtk::Viewport in my case) - rather than setting the background colour of the image itself, which has no effect. But maybe that's the same thing as drawing the background of the drawable being used, since a Gtk::Image has no window of its own?

I think from what I've seen, it's not a true alpha
blend, more like on/off pixmap/bkgr.

Regards,
Carl






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]