Good Practice: always use BeginPath
This commit is contained in:
parent
c41aa97d30
commit
50aafedab4
1 changed files with 2 additions and 1 deletions
|
@ -57,7 +57,8 @@ func main() {
|
|||
gc.SetLineWidth(5)
|
||||
|
||||
// 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.QuadCurveTo(100, 10, 10, 10)
|
||||
gc.Close()
|
||||
|
|
Loading…
Reference in a new issue