Re: [gtk-list] Re: Gtk-Perl and Pixmaps
- From: Paolo Molaro <lupus lettere unipd it>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Gtk-Perl and Pixmaps
- Date: Mon, 4 Oct 1999 18:27:30 +0200
On Sun, Oct 03, 1999 at 10:20:18PM -0400, Owen Taylor wrote:
> > > ($pixmap, $mask) = Gtk::Gdk::Pixmap->colormap_create_from_xpm($win, $cmap,
> > > $win->style->bg('normal'), 'pixmaps/test.xpm');
[...]
> If you use the colormap variant, you don't need to call realize() -
> the colormap for a widget exists from the point it is created.
> [ At least for C, and I don't see how Gtk-Perl could be different. ]
[...]
> $cmap = $win->get_colormap;
> ($pixmap, $mask) =
> Gtk::Gdk::Pixmap->colormap_create_from_xpm(undef, $cmap, undef,
> 'pixmaps/test.xpm');
>
> 1) When providing the colormap, a window isn't needed.
> 2) There is no reason to provide the transparent-color argument if
> you are using a mask. (GDK defaults to white or something, and
> you'll never draw those pixels anyways.)
>
> I don't know if Gtk-Perl handles 'undef' properly for those
> arguments now. (It didn't at some point in the past, IIRC,
> but it definitely needs to.)
colormap_create_from_xpm was added on 11th september and handles
correctly undef for window, colormap and transparent color.
lupus
--
-----------------------------------------------------------------
lupus@debian.org debian/rules
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]