diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-29 19:02:09 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-29 19:02:09 -0400 |
| commit | efdd60375ab3048919bde2d5f410b92626a6a712 (patch) | |
| tree | 0ea30f1113217bcf6111dc0ce015f2d43388b86a /area_unix.go | |
| parent | 652797bd3e3c374620f75aa2bea2ee3534396ab8 (diff) | |
Documented that the clip area in AreaHandler.Paint() more properly and indicate that it is cleared on each AreaHandler.Paint() call; (try to) implement that on Windows (GTK+ does it for us; noted that as well).
Diffstat (limited to 'area_unix.go')
| -rw-r--r-- | area_unix.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/area_unix.go b/area_unix.go index 08dd48d..0155bdc 100644 --- a/area_unix.go +++ b/area_unix.go @@ -48,6 +48,7 @@ func our_area_draw_callback(widget *C.GtkWidget, cr *C.cairo_t, data C.gpointer) s := (*sysData)(unsafe.Pointer(data)) // thanks to desrt in irc.gimp.net/#gtk+ C.cairo_clip_extents(cr, &x, &y, &w, &h) + // we do not need to clear the cliprect; GtkDrawingArea did it for us beforehand cliprect := image.Rect(int(x), int(y), int(w), int(h)) // the cliprect can actually fall outside the size of the Area; clip it by intersecting the two rectangles C.gtk_widget_get_size_request(widget, &maxwid, &maxht) |
