This commit is contained in:
Michael Fogleman 2016-02-19 20:46:19 -05:00
parent a2934a183c
commit cf2e9fdfaf
3 changed files with 3 additions and 5 deletions

View File

@ -19,8 +19,7 @@ func main() {
dc := gg.NewContext(1000, 1000) dc := gg.NewContext(1000, 1000)
dc.DrawCircle(500, 500, 400) dc.DrawCircle(500, 500, 400)
dc.SetRGB(0, 0, 0) dc.SetRGB(0, 0, 0)
dc.SetLineWidth(10) dc.Fill()
dc.Stroke()
dc.SavePNG("out.png") dc.SavePNG("out.png")
} }
``` ```

View File

@ -269,7 +269,7 @@ func (dc *Context) DrawRectangle(x, y, w, h float64) {
func (dc *Context) DrawEllipticalArc(x, y, rx, ry, angle1, angle2 float64) { func (dc *Context) DrawEllipticalArc(x, y, rx, ry, angle1, angle2 float64) {
const n = 16 const n = 16
for i := 0; i <= n; i++ { for i := 0; i < n; i++ {
p1 := float64(i+0) / n p1 := float64(i+0) / n
p2 := float64(i+1) / n p2 := float64(i+1) / n
a1 := angle1 + (angle2-angle1)*p1 a1 := angle1 + (angle2-angle1)*p1

View File

@ -6,7 +6,6 @@ func main() {
dc := gg.NewContext(1000, 1000) dc := gg.NewContext(1000, 1000)
dc.DrawCircle(500, 500, 400) dc.DrawCircle(500, 500, 400)
dc.SetRGB(0, 0, 0) dc.SetRGB(0, 0, 0)
dc.SetLineWidth(10) dc.Fill()
dc.Stroke()
dc.SavePNG("out.png") dc.SavePNG("out.png")
} }