Re: Draw multiple Gdk::Pixbuf to one DrawingArea?
- From: Krzesimir Nowak <qdlacz gmail com>
- To: Harry Van Haaren <harryhaaren gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Draw multiple Gdk::Pixbuf to one DrawingArea?
- Date: Tue, 21 Dec 2010 18:42:34 +0100
On Tue, 2010-12-21 at 14:45 +0000, Harry Van Haaren wrote:
> Hey all,
>
> I've been trying to get this sorted for a while, and now I'm resorting to
> asking yee guys. :-)
>
> I have a class that derives from a DrawingArea, and in this widget I want to
> display 2 .png files.
>
> I have code to show 1 image:
> Glib::RefPtr<Gdk::Pixbuf> faderImage=
> Gdk::Pixbuf::create_from_file("faderGreen.png");
>
> faderImage -> render_to_drawable( get_window() ,
> get_style()->get_black_gc(),
> 0, 0, 42, 100,
> faderImage->get_width(),
> faderImage->get_height(),
> Gdk::RGB_DITHER_NONE, 0, 0);
>
> That code works perfect, just as I'd want it to. The problems start here:
>
> I create another Pixbuf pointer:
> Glib::RefPtr<Gdk::Pixbuf> backgroundImage;
>
> And compiling will still work, but the program segfaults? Is there something
> that you can't have
> 2 Glib::RefPtr 's in one class or something?
>
> Hope somebody can help, cheers, -Harry
Since I don't see much code then I can guess that maybe one of your
Glib::RefPtrs is NULL.
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]