Re: Draw multiple Gdk::Pixbuf to one DrawingArea?
- From: Harry Van Haaren <harryhaaren gmail com>
- To: Krzesimir Nowak <qdlacz gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Draw multiple Gdk::Pixbuf to one DrawingArea?
- Date: Tue, 21 Dec 2010 20:14:31 +0000
Hey Krzesimir,
Thanks for the reply... I don't think I changed any of the code.. but its working now :-)
Real noob mistake or something going on.. *blushes*, time for a break I think!
Cheers, -Harry
On Tue, Dec 21, 2010 at 5:42 PM, Krzesimir Nowak
<qdlacz gmail com> wrote:
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]