modify example

This commit is contained in:
legoff.laurent 2010-11-26 15:14:38 +00:00
parent 30e5a2c42c
commit 8c6e2f2102

View file

@ -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
} }