A few corrections ...

On Tue, 9 Nov 1999, James Henstridge wrote:

> Doing proper transparency is difficult.  If you just want to draw a shaped
> pixmap onto a square tile, that is much easier.  You would use something
> like:
> 
>   import gtk, GdkImlib
> 
>   im1 = GdkImlib.Image('greytile.png')
>   pix, mask = im1.render()
That should read:
    im1.render()
    pix, mask = im1.get_pixmap()
> 
>   im2 = GdkImlib.Image('shapedimage.png')
>   tmppix, tmpmask = im2.render()
Same here
> 
>   # gc is the GC to draw with
>   gc.clip_mask = tmpmask
>   gtk.draw_pixmap(pix, gc, tmppix, 0, 0, im2.rgb_width, im2.rgb_height)
>   gc.clip_mask = None
> 
> You should now have a pixmap/mask combination of a shaped pixmap drawn
> onto a backing tile.  You could then create a GtkPixmap widget to display
> the combined image.  Note that this will not take alpha blending of the
> pixmap into account (it uses 1-bit alpha channel) -- for that, you will
> have to wait for a gdk-pixbuf/libart wrapper in gnome-python.
> 
> Drawing a shaped pixmap to the panel is a bit more difficult.  Some work
> is being done on this for gnome-core-1.1, but is not available yet.
> 
> James.
> 
> --
> Email: [EMAIL PROTECTED]
> WWW:   http://www.daa.com.au/~james/
> 
> 
> On Tue, 9 Nov 1999, Jozsa Kristof wrote:
> 
> > Hello,
> > 
> >    I wonder what's the decent way of setting an xpm pic to be the pygnome
> > applet's icon. My xpm is transparent of course, but if I put it out to a
> > GtkPixmap and out to the applet's frame; it wont be transparent. I'd like to
> > have a transparent applet look similar to any gnome app launcher with the
> > standard grey background tile. Anyone can show me the way to do this please?
> > 
> > Christopher
> > -- 
> > +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-: .~. :-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ 
> > | Christopher Jozsa               /V\    Veszprem Linux Users Group |
> > | [EMAIL PROTECTED]             /( )\       student of IT, Hungary |
> > +-=-=-=-=-=-=-=-=-=-=-=-=-=-=--: ^^-^^ :--=-=-=-=-=-=-=-=-=-=-=-=-=-+
> > To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> > 
> 
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to