Good Practice: always use BeginPath

This commit is contained in:
llgcode 2018-01-08 17:55:31 +01:00 committed by GitHub
parent c41aa97d30
commit 50aafedab4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()