[GTKMM] Standalone pixmap



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





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]