summaryrefslogtreecommitdiff
path: root/area_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-03 12:54:13 -0400
committerPietro Gagliardi <[email protected]>2014-06-03 12:54:13 -0400
commit9a86659c37b1e66e1f83b4dc48b2ba610e671b3d (patch)
tree92c5f1bb36b6346784ee77065c23889521ad0035 /area_unix.go
parentad4ea927b888973d2f87238482420342051f8a06 (diff)
Removed TODOs about device coordinates in the GTK+ backend; that has been resolved.
Diffstat (limited to 'area_unix.go')
-rw-r--r--area_unix.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/area_unix.go b/area_unix.go
index 9da50fd..c142769 100644
--- a/area_unix.go
+++ b/area_unix.go
@@ -55,7 +55,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+
- // TODO these are in "user coordinates"; is that what we want?
+ // these are in user coordinates, which match what coordinates we want by default, even out of a draw event handler (thanks johncc3, mclasen, and Company in irc.gimp.net/#gtk+)
C.cairo_clip_extents(cr, &x0, &y0, &x1, &y1)
// we do not need to clear the cliprect; GtkDrawingArea did it for us beforehand
cliprect := image.Rect(int(x0), int(y0), int(x1), int(y1))
@@ -84,7 +84,6 @@ func our_area_draw_callback(widget *C.GtkWidget, cr *C.cairo_t, data C.gpointer)
0, 0) // origin of the surface
// that just set the brush that cairo uses: we have to actually draw now
// (via https://developer.gnome.org/gtkmm-tutorial/stable/sec-draw-images.html.en)
- // TODO see above about user coordinates; if we do change to device coordinates the following line will need to change or be added to
C.cairo_rectangle(cr, x0, y0, x1, y1) // breaking the nrom here since we have the coordinates as a C double already
C.cairo_fill(cr)
C.cairo_surface_destroy(surface) // free surface