From 05a7355a7f31bce27548fd89703caac426f10eab Mon Sep 17 00:00:00 2001 From: Thomas Friedel Date: Mon, 30 Apr 2018 11:34:33 +0200 Subject: [PATCH] fixed closed paths --- paths.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paths.go b/paths.go index 2bdf6ef..40fafa9 100644 --- a/paths.go +++ b/paths.go @@ -281,8 +281,9 @@ func (cv *Canvas) ClosePath() { } } cv.LineTo(cv.linePath[closeIdx].pos[0], cv.linePath[closeIdx].pos[1]) - cv.linePath[len(cv.linePath)-1].next = cv.linePath[closeIdx].tf - cv.polyPath[len(cv.polyPath)-1].next = cv.polyPath[closeIdx].tf + cv.linePath[len(cv.linePath)-1].next = cv.linePath[closeIdx].next + cv.linePath[len(cv.linePath)-1].flags |= pathAttach + cv.polyPath[len(cv.polyPath)-1].next = cv.polyPath[closeIdx].next } // Stroke uses the current StrokeStyle to draw the path