Hi,
I just started with pygtk and right now I am trying to create something
like an arrow widget. In oder to get that done, I am drawing an arrow on
a GtkPixmap which I create with gtk.create_pixmap and draw the pixmap
on DrawingArea.
This works fine and I get a black arrow on a white background.
Now I want the background to be transparent instead of white. As far as
I can tell, I need a bitmap for that. So the first thing I tried to do
was to create a bitmap from the pixmap, but I could not find a way to do
this.
The next thing I tried was to create a bitmap with PIL and from that
create a GdkBitmap with create_bitmap_from_data. This worked fine as
well, but now I have to create the pixmap from the bitmap, because I can
not use the bitmap in gtk.draw_pixmap() to put it on the DrawingArea. I
also tried toconvert the bitmap I created in PIL to an rgb and than
somehow get the xpm data to create the pixmap with
create_pixmap_from_xpm_d, but PIL does not support xpm format in the
tostring method. I also tried to draw rgb data from the pil image on a
newly created pixmap by calling gtk.draw_rgb_image(), but here I only
got a segmentation fault.
Does anybody know of an easier way (or any way at all). Any help would
be appreciated.
I am using Python2.0c1, PIL 1.1 and pygtk 0.6.6.
Thanks a lot
Ralph
P.S. Since I have not subscribed to this list yet, it would be nice if
you could reply to this address as well
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk