Re: Getting data from a mask
- From: Paolo Molaro <lupus ximian com>
- To: gtk-perl-list gnome org
- Subject: Re: Getting data from a mask
- Date: Fri, 20 Apr 2001 16:09:31 +0200
On 04/19/01 poyen aleks com wrote:
I try to use the shape_combine_mask function, to do some fancy background
on my own Perl_gtk gnome_applet. On the Gtk_Perl tutorial, I've seen how
to use the shape_combine_mask with a mask created from an xpm.
(URL:http://www-zeuthen.desy.de/computing/documentation/perl/gtkperl-tutorial/tut-38.html)
But now, I would like to get the bitmap or pixmap, the data itself to play
with it, with Bitmap, or anything else.
You can create your own bitmap or pixmap and draw in it as
appropriate, or you can get a Gtk::Gdk::Image from a drawable
and use the get_pixel/set_pixel on it, if you really want to get
dirty with low-level details. Note that this last is not for the faint
of heart.
My question is : How can I get the Bitmap, or pixmap data , and not only
Gtk::Gdk::Pixmap=HASH(0x8209708). How can I get what's inside ?
For those who are wondering why I'm doing that, I've a nice pixmap on my
gnome panel, and I would like to have a fancy perl_gtk applet on it. So I
want the applet to be transparent wheter than grey on most pixel possible.
I think I can do that with shape_combine_mask, but first I need to have a
mask.
A mask here is simply a Bitmap (that is a 1 bit depth Pixmap).
So, create such a pixmap, draw on it your shape and use it
as the mask. Or use one of the several other cfunctions that
greate a Gtk::Gdk::Bitmap...
lupus
--
-----------------------------------------------------------------
lupus debian org debian/rules
lupus ximian com Monkeys do it better
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]