[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
overlaying GdkPixmaps
- From: Andreas Sliwka <goff nef wh uni-dortmund de>
- To: gtklist <gtk-app-devel-list redhat com>
- Subject: overlaying GdkPixmaps
- Date: Sun, 6 Feb 2000 03:58:52 +0100
Frickeln - second part.
Hi,
I want to overlay two GdkPixmaps. The first one is opaque , the second one
is mostly transparent. How can I accomplish that the I see all the opaque
pixels of the second GdkPixmap, and on all positions where the second on is
transparent the pixels of the first one shine through? I tried the following:
---------------- Code Snippet ------------
/* copying from template to buffer */
gdk_gc_set_function(bufferGC,GDK_COPY);
gdk_draw_pixmap(buffer, bufferGC, template,
posx, posy, 0, 0, 24, 24);
/* overlaying buffer with overlay !DOES NOT WORK! */
gdk_gc_set_function(bufferGC,GDK_OR);
gdk_draw_pixmap(buffer,bufferGC,overlay,0,0,0,0,24,24);
gdk_gc_set_function(bufferGC,GDK_COPY);
/* copying the buffer on the screen */
gdk_draw_pixmap(actual_pixmap, bufferGC, buffer,
0, 0, posx, posy, 24, 24);
---------------- Snippet End -------------
But that doesnt work.
Can someone help me please?
the whole code (main.c:60-78) can be obtained at
http://trashcan.nef.wh.uni-dortmund.de/~goff/CheeseNMice.tgz
mfg
--
Andreas Sliwka | goff@nef.wh.uni-dortmund.de | ICQ goff:13961062
------BEGIN GEEK CODE BLOCK-----
GCS/MU/L d-(+) S:++ a- C++$ UL++$ P++$ L+++$ E--- W+$ N++ o-- K- w-- O- !M !V
PS+(++) PE Y+ PGP>++ t(+) 5+ X- R tv+ b+++ DI++ D G e+ h- r++ x+++
-------END GEEK CODE BLOCK------
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]