Hi guys,
In this example, a small gtk.gdk.Pixbuf is copied onto a larger pixbuf
however where on the small pixbuf, there is transparency, this is
converted to the gtk background colour.
This means when the small pixbuf is copied 3 times and overlaid (as in
the example), it looks incorrect. How do I make it so that the
transparency in the small pixbuf is not replaced with the gtkbackground
colour?
Also is there someone I can speak to to get an IRC ban lifted?
#!/usr/bin/env python
import gtk
icon_theme = gtk.icon_theme_get_default();
small_pixbuf = icon_theme.load_icon("image", 24, ());
large_pixbuf = icon_theme.load_icon("image", 48, ());
large_pixbuf.fill(0x000000);
counter = 0
for i in range(3):
small_pixbuf.copy_area(0, 0, 16, 16, large_pixbuf, counter, counter);
counter += 8;
image = gtk.Image()
image.set_from_pixbuf(large_pixbuf)
window = gtk.Window()
window.add(image)
window.show_all()
gtk.main()
--
Andrew
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/