From c97f757e6f0e106e5a46fce504d49f4ce8f7e7e5 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Thu, 8 Mar 2018 13:42:55 -0500 Subject: [PATCH] better DrawEllipticalArc behavior when dc.hasCurrent is true --- context.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/context.go b/context.go index 0ac2c4f..3d973b8 100644 --- a/context.go +++ b/context.go @@ -548,8 +548,12 @@ func (dc *Context) DrawEllipticalArc(x, y, rx, ry, angle1, angle2 float64) { y2 := y + ry*math.Sin(a2) cx := 2*x1 - x0/2 - x2/2 cy := 2*y1 - y0/2 - y2/2 - if i == 0 && !dc.hasCurrent { - dc.MoveTo(x0, y0) + if i == 0 { + if dc.hasCurrent { + dc.LineTo(x0, y0) + } else { + dc.MoveTo(x0, y0) + } } dc.QuadraticTo(cx, cy, x2, y2) }