Subject: Gdk::Drawable::draw_image problem please help



You should do all the drawings on a Gdk::Pixmap (an offscreen drawable) 
and then copy its contents to the Gdk::Window of, say, the drawingarea 
in the "on_expose_event" callback, e.g.

bool MyDrawingArea::on_expose_event(GdkEventExpose *event)
{
	get_window()->draw_drawable
	(
		get_style()->get_fg_gc(get_state()),
  		pixmap,
		event->area.x, event->area.y,
		event->area.x, event->area.y,
		event->area.width, event->area.height
	);
	
	return false;
}

Best regard,
smso




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