fixed closed paths

This commit is contained in:
Thomas Friedel 2018-04-30 11:34:33 +02:00
parent 3a51ce9843
commit 05a7355a7f

View file

@ -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