# File gtk/sample/gtk-demo/drawingarea.rb, line 158 def scribble_expose_event(widget, event) # We use the 'foreground GC' for the widget since it already exists, # but honestly any GC would work. The only thing to worry about # is whether the GC has an inappropriate clip region set. widget.window.draw_drawable(widget.style.fg_gc(widget.state), @pixmap, # Only copy the area that was exposed. event.area.x, event.area.y, event.area.x, event.area.y, event.area.width, event.area.height) return false end