Good Practice: always use BeginPath
This commit is contained in:
parent
c41aa97d30
commit
50aafedab4
|
@ -57,7 +57,8 @@ func main() {
|
||||||
gc.SetLineWidth(5)
|
gc.SetLineWidth(5)
|
||||||
|
|
||||||
// Draw a closed shape
|
// Draw a closed shape
|
||||||
gc.MoveTo(10, 10) // should always be called first for a new path
|
gc.BeginPath() // Initialize a new path
|
||||||
|
gc.MoveTo(10, 10) // Move to a position to start the new path
|
||||||
gc.LineTo(100, 50)
|
gc.LineTo(100, 50)
|
||||||
gc.QuadCurveTo(100, 10, 10, 10)
|
gc.QuadCurveTo(100, 10, 10, 10)
|
||||||
gc.Close()
|
gc.Close()
|
||||||
|
|
Loading…
Reference in New Issue