modify example

This commit is contained in:
legoff.laurent 2010-11-26 15:14:38 +00:00
parent 30e5a2c42c
commit 8c6e2f2102
1 changed files with 2 additions and 3 deletions

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
gc.BeginPath() // Start a new path
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.MoveTo(0, 0)
gc.LineTo(72, 0)
gc.RLineTo(72, 0)
gc.Stroke()
gc.Restore() // Get back the unrotated state
}