evCreate API 5.7 Help

Create Function

Creates a new rounded rectangle item in an Envision document currently opened in the Canvas Envision Creator app.

Create( bounds: [[[EvRect|evrect-interface.html]]], xRadius?: number, yRadius?: number, zOrder?: [[[EvObjectZOrder|evobjectzorder-interface.html]]] ): Promise<[[[EvItem|canvas-envision-document-items.html#object-items]]]>

Parameters

bounds: EvRect

An EvRect object, the position and size of the bounding box of the new rounded rectangle item. The bounding box size defines the dimensions of the rounded rectangle shape.

xRadius?: number

A number, the length of a semi-axis of the ellipse that defines the rectangle corner curvature along the horizontal axis of the bounding box of the new rounded rectangle item in length UoM global for the evCreate API.

The default value is 20.

Different xRadius and yRadius values produce round and oval rectangle corners

yRadius?: number

A number, the length of a semi-axis of the ellipse that defines the rectangle corner curvature along the vertical axis of the bounding box of the new rounded rectangle item in length UoM global for the evCreate API.

The default value is the number equal to the one given in the xRadius parameter.

zOrder?: EvObjectZOrder

An EvObjectZOrder object that includes:

  • The layer item object of a layer in the current document where the new rounded rectangle item should be added. The default value is the current layer on the current page.

  • The position of the new rounded rectangle 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 new rounded rectangle item successfully created in the current document.

01 May 2025