Re: pygtk: transparent pixmaps



On Wed, Jun 07, 2006 at 11:36:35AM +0200, Jachym Cepicky wrote:
I try to script some app. using pygtk. One of the tasks is to draw some
data on the image background. I would like to use approach like follows:

    pixbuf =  gtk.gdk.pixbuf_new_from_file("tmp.ppm")
    pixmap = gtk.gdk.Pixmap(widget.window, width, height)

    for line in lines:
        pixmap.draw_line(line[x], line[y]...)

    drawingarea.window.draw_pixbuf(...,pixbuf,0,0,0,0,.....)
    drawingarea.window.draw_drawable(..., pixmap, ....)

Result is, the background image (pixbuf) appears, but only shortly, than
it is overlaid by *black* (non-transparent) pixmap.

So my question: How to perform task like this with python?

Scrap the pixmap and just draw the lines on
drawingarea.window (after the pixbuf, of course)?

Yeti


--
Anonyms eat their boogers.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]