From a4e5cdbeb87beabacbe2fb5fad9c1be8f93eee19 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Sun, 21 Feb 2016 16:34:28 -0500 Subject: [PATCH] fix some curve issues --- context.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/context.go b/context.go index 6ebd833..298f080 100644 --- a/context.go +++ b/context.go @@ -214,8 +214,14 @@ func (dc *Context) CubicTo(x1, y1, x2, y2, x3, y3 float64) { x2, y2 = dc.TransformPoint(x2, y2) x3, y3 = dc.TransformPoint(x3, y3) points := CubicBezier(x0, y0, x1, y1, x2, y2, x3, y3) + previous := dc.current.Fixed() for _, p := range points[1:] { f := p.Fixed() + if f == previous { + // TODO: this fixes some rendering issues but not all + continue + } + previous = f dc.strokePath.Add1(f) dc.fillPath.Add1(f) dc.current = p