evCreate API 5.7 Help

Create Function

Creates a Bézier curve item in an Envision document currently opened in the Canvas Envision Creator app.

Create(points: [[[EvCoord2D|evcoord2d-type-alias.html]]][], zOrder?: [[[EvObjectZOrder|evobjectzorder-interface.html]]]): Promise<[[[EvItem|canvas-envision-document-items.html#object-items]]]>

Parameters

points: EvCoord2D[]

An array of EvCoord2D arrays, an array of 2D coordinates of points that define one or more segments of a Bézier curve item.

Bezier curve example with 7 segments and 28 points

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.

zOrder?: EvObjectZOrder

An EvObjectZOrder object that includes:

  • The layer item object of a layer in the current document where the given Bézier curve item should be added. The default value is the current layer on the current page.

  • The position of the given Bézier curve item in the stack of object items on the given layer. It is a zero-based index that is 0 for the topmost object item on the layer and increases by 1 for each following object item going down the stack. The default value is 0.

Return value

Promise<EvItem>

A Promise that, if fulfilled, resolves to an Object item object of the Bézier curve item successfully created in the current document.

01 May 2025