On Sat, 25 Oct 2008 15:56:30 -0600 Travis Boucher <i9169345 hotmail com> wrote:
Date: Sat, 25 Oct 2008 12:51:19 -0400 From: zentara1 sbcglobal net To: gtk-perl-list gnome org Subject: Re: Using Pixbufs and Pixmaps On Sat, 25 Oct 2008 06:46:05 -0600 Travis Boucher wrote:I wasn't aware that Gnome2::Canvas didn't require gnome,See this for a Goo graphing example: http://perlmonks.org?node_id=702916 Handling transparent images on Goo: http://perlmonks.org?node_id=695452 zentara
I'll look at Gnome2::Canvas and Goo::Canvas a little closer, however I'd still like to learn how to effectively use Pixbufs and Pixmaps for doing graphics stuff in layers.
I'm not the expert here, but yeah, it's a bit complicated because the DrawingArea has no persisitence, and that was the greatest source of confusion for me. So the technique shown in all the demos, is to make a "backing pixmap" on it, draw to the pixamp( which is a drawable), then reload the pixmap on every expose event for the DrawingArea. I'm sure you already know this, but see: http://perlmonks.org?node_id=583578 So now I attach a layered image script with transparency, on a DrawingArea Hope it helps you, and any code improvements welcome. zentara -- I'm not really a human, but I play one on earth. http://zentara.net/Remember_How_Lucky_You_Are.html
Attachment:
plane-b-alpha.png
Description: PNG image
Attachment:
zblack3.png
Description: PNG image
Attachment:
z-transparent-popup-image-layer
Description: Binary data