Skip to content

Commit

Permalink
better DrawEllipticalArc behavior when dc.hasCurrent is true
Browse files Browse the repository at this point in the history
  • Loading branch information
fogleman committed Mar 8, 2018
1 parent da3d086 commit c97f757
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit c97f757

Please sign in to comment.