Pixmap and transparency color



Hello,

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)


and this is what I have been doing:
<BEGIN CODE>
gdk_color_parse("FF0000", color);
if(gdk_colormap_alloc_color(gdk_colormap_get_system(),
                            color,FALSE,FALSE)) {
	//Have tried FALSE,TRUE in last line but to no avail.
	cout << "RED not found" << endl;
};
gdk_pixmap_vtk=gdk_pixmap_colormap_create_from_xpm_d(
		NULL,gdk_colormap_get_system(),
		NULL,color,image_name);
pixmap_vtk = gtk_pixmap_new(gdk_pixmap_vtk, NULL);
<END CODE>

I get the "Red not found" on console, and the image displays just
fine, except the image shows red were it should be transparent.

Thanks for your help!

Bart Van den Bosch


-- 
*******************************************************************************
 Bart Van den Bosch , aka Boschke
           bvdb skynet be

Who the hell is General Failure, and why is he reading my Hard Drive???

Very funny Scotty... NOW BEAM DOWN MY CLOTHES!!
*******************************************************************************




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