modify example
This commit is contained in:
parent
30e5a2c42c
commit
8c6e2f2102
1 changed files with 2 additions and 3 deletions
|
@ -421,10 +421,9 @@ func TestStar() {
|
||||||
for i := 0.0 ; i < 360; i = i + 10 {// Go from 0 to 360 degrees in 10 degree steps
|
for i := 0.0 ; i < 360; i = i + 10 {// Go from 0 to 360 degrees in 10 degree steps
|
||||||
gc.BeginPath() // Start a new path
|
gc.BeginPath() // Start a new path
|
||||||
gc.Save() // Keep rotations temporary
|
gc.Save() // Keep rotations temporary
|
||||||
gc.Translate(144, 144)
|
gc.MoveTo(144, 144)
|
||||||
gc.Rotate(i * (math.Pi / 180.0)) // Rotate by degrees on stack from 'for'
|
gc.Rotate(i * (math.Pi / 180.0)) // Rotate by degrees on stack from 'for'
|
||||||
gc.MoveTo(0, 0)
|
gc.RLineTo(72, 0)
|
||||||
gc.LineTo(72, 0)
|
|
||||||
gc.Stroke()
|
gc.Stroke()
|
||||||
gc.Restore() // Get back the unrotated state
|
gc.Restore() // Get back the unrotated state
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue