SetPoints Function
Replaces all the segments of a given Bézier curve item from an Envision document currently opened in the Canvas Envision Creator app with given new segments.
Parameters
obj: EvItemAn Object item object, a Bézier curve item from the Envision document currently opened in the Canvas Envision Creator app whose segments should be replaced.
If a given object item is not a Bézier curve, the function throws an error.
points: EvCoord2D[]An array of
EvCoord2Darrays, an array of 2D coordinates of points that define one or more new segments of the given Bézier curve item.
Each segment of a Bézier curve is defined by four points specified in the following order:
Starting point
Weight point 1
Weight point 2
Endpoint
A weight point defines how far the segment is pulled in its direction.
If the Bézier curve includes multiple segments, the following rules must be met:
The total number of the points must be divisible by 4.
The coordinates must be the same for:
The endpoint of a given segment.
The starting point of the segment following the given segment.
Return value
Promise<void>A Promise that, if fulfilled, resolves to
voidif the given new segments have successfully replaced the existing old segments of the given Bézier curve.