Re: pixmaps and xpm-transparency
- From: Tobias Hintze <hintze_gtk siemens md st schule de>
- To: Paul Davis <pbd op net>
- Cc: gtk-list gnome org
- Subject: Re: pixmaps and xpm-transparency
- Date: Tue, 17 Apr 2001 18:46:21 +0200
On Tue, Apr 17, 2001 at 12:13:03PM -0400, Paul Davis wrote:
>
> what you need is a non-rectangular window, which means that you need
> to use gtk_widget_shape_combine_mask. this will adjust a widget's
> shape by using a mask. you can use the same mask as was generated when
> you created the pixmap, and the result is that all areas marked as
> "transparent" in the XPM are "removed" from the widget's outline
> shape.
i'm afraid that's not what i really want. i will explain a bit more.
i wan't display some graphics within a GtkTable. for now:
[snip]
GtkWidget *gPix;
...
gPix = gtk_pixmap_new(pixmap1, mask1);
[snap]
and i insert gPix into the table. the pixmap is shown.
i just don't see how to use gtk_widget_shape_combine_mask
(which window to take) to solve this.
as i mentioned already i have two xpm-datas (pixmap1, pixmap2)
for now i draw pixmap2 onto pixmap1 and gPix is created from pixmap1.
i could imagine to go through the xpm-data by hand, merge the colormaps
and overwrite pixmap1 with all non-transparent-pixels from pixmap2.
but i think there must be something available doing this already.
(doing it even faster)
thanks in advance,
th
--
Tobias Hintze - http://hbs-solutions.de
HBS solutions GbR - Network & Information Systems
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]