summaryrefslogtreecommitdiff
path: root/area_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'area_windows.go')
-rw-r--r--area_windows.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/area_windows.go b/area_windows.go
index 5f41790..235a5a3 100644
--- a/area_windows.go
+++ b/area_windows.go
@@ -77,6 +77,7 @@ func paintArea(s *sysData) {
hscroll, vscroll := getScrollPos(s.hwnd)
+ // both Windows RECT and Go image.Rect are point..point, so the following is correct
cliprect := image.Rect(int(xrect.left), int(xrect.top), int(xrect.right), int(xrect.bottom))
cliprect = cliprect.Add(image.Pt(int(hscroll), int(vscroll))) // adjust by scroll position
// make sure the cliprect doesn't fall outside the size of the Area