From cf2e9fdfaf818c16474a78856e20db6a3d8a4959 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Fri, 19 Feb 2016 20:46:19 -0500 Subject: [PATCH] fix --- README.md | 3 +-- context.go | 2 +- examples/circle.go | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2e8d9a3..8dd6cdb 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,7 @@ func main() { dc := gg.NewContext(1000, 1000) dc.DrawCircle(500, 500, 400) dc.SetRGB(0, 0, 0) - dc.SetLineWidth(10) - dc.Stroke() + dc.Fill() dc.SavePNG("out.png") } ``` diff --git a/context.go b/context.go index cb524c1..1d25e46 100644 --- a/context.go +++ b/context.go @@ -269,7 +269,7 @@ func (dc *Context) DrawRectangle(x, y, w, h float64) { func (dc *Context) DrawEllipticalArc(x, y, rx, ry, angle1, angle2 float64) { const n = 16 - for i := 0; i <= n; i++ { + for i := 0; i < n; i++ { p1 := float64(i+0) / n p2 := float64(i+1) / n a1 := angle1 + (angle2-angle1)*p1 diff --git a/examples/circle.go b/examples/circle.go index 9f7a2d5..5debf66 100644 --- a/examples/circle.go +++ b/examples/circle.go @@ -6,7 +6,6 @@ func main() { dc := gg.NewContext(1000, 1000) dc.DrawCircle(500, 500, 400) dc.SetRGB(0, 0, 0) - dc.SetLineWidth(10) - dc.Stroke() + dc.Fill() dc.SavePNG("out.png") }