Global Function
Declaration
func pathAddCurve(to: CGPoint, control1: CGPoint, control2: CGPoint)
Parameters
| to | A CGPoint that specifies the curve end point. |
| control1 | A CGPoint that specifies the first control point. The first control point defines the curve tangent from the start point of the curve (current point on path). |
| control2 | A CGPoint that specifies the second control point. The second control point defines the curve tangent into the end point. |
Returns
-
Description
Draw a Bezier curve in the view, with the specified end point and control points.
Examples
// 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
pathBegin
pathVertex
pathClose
pathEnd