fix drawing non-closed lines in IMDraw
This commit is contained in:
parent
fc2a7a8afc
commit
ac61175aea
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue