From d4e06bb4d3b624e99d75d36fb69b2316b1b828c0 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 8 Jun 2014 00:55:11 -0400 Subject: Checked Windows RECT usage and fixed wrong ones. --- area_windows.go | 1 + 1 file changed, 1 insertion(+) (limited to 'area_windows.go') 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 -- cgit v1.2.3