diff --git a/imdraw/imdraw.go b/imdraw/imdraw.go index 3a69537..3f678db 100644 --- a/imdraw/imdraw.go +++ b/imdraw/imdraw.go @@ -433,9 +433,13 @@ func (imd *IMDraw) outlineEllipseArc(radius pixel.Vec, low, high, thickness floa func (imd *IMDraw) polyline(thickness float64, closed bool) { points := imd.getAndClearPoints() - if len(points) < 2 { + if len(points) == 0 { return } + if len(points) == 1 { + // one point special case + points = append(points, points[0]) + } // first point j, i := 0, 1