init(rect:)
Creates and returns a new Bézier path object with a rectangular path.
Declaration
convenience init(rect: CGRect)Parameters
- rect:
The rectangle describing the path to create.
Return Value
A new path object with the rectangular path.
Discussion
This method creates a closed subpath by starting at the origin of rect and adding line segments in a clockwise direction (relative to the default coordinate system).