drawing a pixmap with transparent pixels
- From: Rob Chansky <robc titan com>
- To: gtk-app-devel-list gnome org
- Subject: drawing a pixmap with transparent pixels
- Date: Mon, 07 Nov 2005 13:54:01 -0800
Hi all. I'm trying to draw a pixmap onto another pixmap and have the
first pixmap have transparent pixels so that the background of the
second pixmap shows through.
I can see that the general rule is to draw onto my pixmap, and then draw
onto a bitmap, and use that bitmap as a mask to display the pixmap. My
problem is, I'm already CPU-bound and don't want to draw twice.. that
would remove the margin I would gain from keeping cached pixmaps of the
generated animation.
I can see that gdk_pixmap_create_from_data() loads both a pixmap and
bitmap from a data file, and that's almost what I want. I can see that
some pixbuf routines do what I want, too, but my problem is I'm drawing
onto a pixmap using gdk_draw_arc() and ilk and I can't draw those onto a
pixbuf... and copying my pixmap into a pixbuf (across the server
barrier) and back won't get me my optimization either...
Is there a way to convert my pixmap into a bitmap and keep it on the
server side? Or, failing that, can I use gdk_draw_arc() etc onto a pixbuf?
Rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]