Re: Pixmap and transparency color



Bart Van den Bosch <boschke ulyssis org> writes:
> 
> Just wondering:
> I am trying to get an image of which I have a GIF on a gtk1.2 interface
> (a logo) . I have already succeeded of making it into a ppm, then
> converting it to a xpm, and showing it in the window, but so far
> I am not having any success into getting the transparency right.
> As far as I know the transparency color should be red. (HEX: FF0000)

The transparency color isn't what you probably want (color to be made
transparent) but rather the color to be used where the image is
transparent, i.e. the background color. To have transparency in an XPM
you want a None color in it, see e.g. book_open_xpm in
gtk+/gtk/testgtk.c.

> gdk_color_parse("FF0000", color);

Also, I think you need a hash mark like so: "#FF0000"

Havoc



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