Re: [GTKMM] Standalone pixmap
- From: Mateusz 'vArDo' Bilinski <vardo fr pl>
- To: gtkmm-list gnome org
- Subject: Re: [GTKMM] Standalone pixmap
- Date: Wed, 29 Dec 2004 13:55:48 +0100
Rob Benton wrote:
> 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.
Thanks for anwsering.
I think you're right. I've checked this once again. I misunderstood it
because I thought I've checked it once and for example I couldn't create
a pixmap with size for 10x20 and had to create a pixmap using get_width
(), get_height() methods. But it was probably very late ;/.
But from what I read if I set my own depth (diffrent from -1) I don't
have to give any Gdk::Drawable. The question is how to do it?
Glib::RefPtr<Gdk::Pixmap> pixmap = Gdk::Pixmap::create(
0,
100,
100,
2);
does not work as I had written before. I know that it should be a
reference, but how can I pass a null-reference? Using some Glib stuff?
It an argument were a pointer it should work, but now I of course get
errors like this:
../networksarea.cc: In member function `bool
RLC::CNetworksArea::on_networksarea_configure_event
(GdkEventConfigure*)':
../networksarea.cc:358: error: no matching function for call to
`Gdk::Pixmap::
create(NULL, int, int, int)'
/usr/include/gdkmm-2.4/gdkmm/pixmap.h:122: error: candidates are: static
Glib::RefPtr<Gdk::Pixmap> Gdk::Pixmap::create(const
Glib::RefPtr<Gdk::Drawable>&, int, int, int)
/usr/include/gdkmm-2.4/gdkmm/pixmap.h:125: error: static
Glib::RefPtr<Gdk::Pixmap> Gdk::Pixmap::create(const
Glib::RefPtr<Gdk::Drawable>&, const char*, int, int, int, const
Gdk::Color&,
const Gdk::Color&)
/usr/include/gdkmm-2.4/gdkmm/pixmap.h:128: error: static
Glib::RefPtr<Gdk::Pixmap> Gdk::Pixmap::create(const
Glib::RefPtr<Gdk::Display>&, unsigned int)
Once again thanks for any suggestions in advance.
vArDo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]