Re: [GTKMM] Standalone pixmap
- From: Rob Benton <rob benton conwaycorp net>
- To: Mateusz 'vArDo' Bilinski <vardo fr pl>
- Cc: gtkmm-list gnome org
- Subject: Re: [GTKMM] Standalone pixmap
- Date: Tue, 28 Dec 2004 18:17:38 -0600
Mateusz 'vArDo' Bilinski wrote:
Hello.
Is is possible to create a pixmap not connected with any drawable
(pixmap nor window). I want to have to draw on in separately and later
redraw some of it to a pixmap connected with window. Some like this
below does not work:
Glib::RefPtr<Gdk::Pixmap> rpPixmap = Gdk::Pixmap::create(
0,
2,
2,
-1);
The declaration of this static method is:
Glib::RefPtr<Pixmap> create (const Glib::RefPtr<Drawable>& drawable, int
width, int height, int depth=-1)
In a comment to Gdk::Drawable::draw_pixbuf there is written:
The destination drawable must have a colormap. All windows have a
colormap, however, pixmaps only have colormap by default __if_they_were
created_with_a_non-0_window_argument. Otherwise a colormap must be set
on them with Gdk::Drawable::set_colormap().
So I suppose it is possible to do what I want. The question is how.
Thanks for any suggestions in advance.
vArDo
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
Passing a Gdk::Drawable into the Gdk::Pixmap::create() method does not
associate it or anything like that. All it does is set the Pixmap's
depth to that of the Gdk::Drawable you passed in.
If I'm wrong someone please correct me. I looked at the Gtk
"gdk_pixmap_new()" function for this info.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]