Global Function
Declaration
func pathVertex(x: Double, y: Double)
Parameters
| x, y | Coordinates of the point. |
Returns
-
Description
Define a new point (x,y position) for a path. Start the path with pathBegin(), and finish the path with pathEnd()
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