Global Function
Declaration
func pathBegin()
Parameters
| None. |
Returns
-
Description
Use pathBegin and pathEnd to create a shape using a series of points.
Examples
// Create a line with 3 points
pathBegin()
pathVertex(x: 50.0, y: 50.0)
pathVertex(x: 125.0, y: 100.0)
pathVertex(x: 50.0, y: 150.0)
pathEnd()
// Create a bezier curve
pathBegin()
pathVertex(x: 150.0, y: 50.0)
pathAddCurve(to: CGPoint(x: 300, y: 180), control1: CGPoint(x: 230, y: 50), control2: CGPoint(x: 300, y: 100))
pathEnd()Related
pathVertex
pathAddCurve
pathClose
pathEnd