fix drawing non-closed lines in IMDraw

This commit is contained in:
faiface 2017-04-21 01:17:29 +02:00
parent fc2a7a8afc
commit ac61175aea
1 changed files with 5 additions and 2 deletions

View File

@ -537,13 +537,16 @@ func (imd *IMDraw) polyline(thickness float64, closed bool) {
closing := false closing := false
if j >= len(points) { if j >= len(points) {
if !closed { /*if !closed {
break break
} }*/
j %= len(points) j %= len(points)
closing = true closing = true
} }
if k >= len(points) { if k >= len(points) {
if !closed {
break
}
k %= len(points) k %= len(points)
} }