Re: [gtk-list] revised curve plus new gamma widget
- From: pmattis parker EECS Berkeley EDU
- To: gtk-list redhat com
- Subject: Re: [gtk-list] revised curve plus new gamma widget
- Date: Fri, 13 Jun 1997 20:52:38 -0700
I'm resending mail I sent in the past week (from a different account)
it appears scam is not sending remote mail.
David Mosberger-Tang writes:
>There is a slight problem with the pixmaps: i wanted to make the
>background transparent, but when doing so, the _entire_ pixmap became
>transparent. I couldn't figure out what's going wrong, so if anybody
>has a suggestion, I'm all ears (just search for "why does this not
>work" in the patch below and you'll see what I mean...).
One problem is that your xpm's don't define a transparent color. For
instance, I changed the "c" color of the "spline" xpm to "c c None"
and now it does the transparency correctly. But, there is still a bug
here since if no transparent pixels are defined in the xpm then the
mask should be filled. And it does this correctly on my system. I
suspect that assuming the white color is composed of all bits set
(0xffffffff) is an error. Let me know if the following patch works for
you.
Peter
--- gdkpixmap.c.bak Tue Jun 10 16:11:09 1997
+++ gdkpixmap.c Tue Jun 10 16:18:35 1997
@@ -411,9 +411,12 @@
*mask = gdk_pixmap_new (window, width, height, 1);
gc = gdk_gc_new (*mask);
+
+ tmp_color.pixel = 0;
+ gdk_gc_set_foreground (gc, &tmp_color);
gdk_draw_rectangle (*mask, gc, TRUE, 0, 0, -1, -1);
- gdk_color_white (colormap, &tmp_color);
+ tmp_color.pixel = ~((gulong) 0);
gdk_gc_set_foreground (gc, &tmp_color);
}
@@ -546,9 +549,12 @@
*mask = gdk_pixmap_new (window, width, height, 1);
gc = gdk_gc_new (*mask);
+
+ tmp_color.pixel = 0;
+ gdk_gc_set_foreground (gc, &tmp_color);
gdk_draw_rectangle (*mask, gc, TRUE, 0, 0, -1, -1);
- gdk_color_white (colormap, &tmp_color);
+ tmp_color.pixel = ~((gulong) 0);
gdk_gc_set_foreground (gc, &tmp_color);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]