fix
This commit is contained in:
parent
a2934a183c
commit
cf2e9fdfaf
@ -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")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -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
|
||||||
|
@ -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")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user