Re: SV: drawables.



On Wed, 2006-06-21 at 10:30 +0200, Morten Bo Nielsen wrote:
> Now I do this (using libglade) - (InData is a class of my own making):
> 
> Gtk::DrawingArea *PolyDrawArea;
> xml_interface->get_widget( "PolyDrawArea", PolyDrawArea );
> 
> Glib::RefPtr<Gdk::Pixbuf> image = Gdk::Pixbuf::create_from_file(
> "nn.bmp" );
> PolyDrawArea->set_size_request( image->get_width(), image->get_height()
> );
> image->render_to_drawable( 	PolyDrawArea->get_window(), 
> 			PolyDrawArea->get_style()->get_black_gc(),
> 			0, 0, 0, 0, 
> 			image->get_width(), image->get_height(), 
> 			Gdk::RGB_DITHER_NONE, 0, 0);
> 
> 
> It works, but I get
> 
> (AcqTest.exe:3996): Gdk-CRITICAL **: gdk_draw_pixbuf: assertion
> 'GDK_IS_DRAWABLE (drawable)' failed
> 
> on the render_to_drawable() line.
> Any ideas?

you are drawing in an expose handler, yes?





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