Changes the points associated with the specified path element.
- macOS 10.0+
A C-style array containing up to three
NSPointdata types. This parameter must contain the correct number of points for the path element at the specified index. Move, close path, and line segment commands require one point. Curve operations require three points.
The index of the path element you want to modify.
You can use this method to change the points associated with a path quickly and without recreating the path. You cannot use this method to change the type of the path element.
The following example shows you how you would modify the point associated with a line path element. The path created by this example results in a path with two elements. The first path element specifies a move to point (0, 0) while the second creates a line to point (100, 100). It then changes the line to go only to the point (50,50) using this method: