evCreate API 5.7 Help

SetRadius Function

Changes the corner curvature of a given rounded rectangle item from an Envision document currently opened in the Canvas Envision Creator app according to given new corner radius lengths.

SetRadius(obj: [[[EvItem|canvas-envision-document-items.html#object-items]]], xRadius: number, yRadius?: number): Promise<void>

Parameters

obj: EvItem

An Object item object, a given rounded rectangle item from the Envision document currently opened in the Canvas Envision Creator app whose corner curvature should be changed according to the given new corner radius lengths.

If a given object item is not a rounded rectangle, the function throws an error.

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 given rounded rectangle item in length UoM global for the evCreate API.

Different xRadius and yRadius lengths 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 given 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.

Return value

Promise<void>

A Promise that, if fulfilled, resolves to void if the corner curvature of the given rounded rectangle item in the current document has been successfully changed according to the given new corner radius lengths.

01 May 2025