Subject: Gdk::Drawable::draw_image problem please help
- From: smso graduate hku hk
- To: gtkmm-list gnome org
- Subject: Subject: Gdk::Drawable::draw_image problem please help
- Date: Fri, 6 Mar 2009 02:51:39 +0800
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]