RotateTo Function
Rotates the bounding box of a given object item from an Envision document currently opened in the Canvas Envision Creator app to a given angle around a pivot point given on the bounding box of this object item.
Parameters
obj: EvItemAn Object item object, an object item from the Envision document currently opened in the Canvas Envision Creator app whose bounding box should be rotated to the given angle around the given pivot point.
angle: numberA
number, an angle in the angle unit of measure (UoM) global for the entire evCreate API to which the given object item's bounding box should be rotated. Positive numbers rotate it clockwise, and negative numbers rotate it counterclockwise.pivot?: EvPivotPointA member of the
EvPivotPointenumeration, a pivot point on the bounding box of the given object item.The default value for a new object item is
"center".The given pivot point is stored for the object item for future rotations of this object item. If no pivot point is given during the following rotations of the object item, the pivot point given for this object item in the past is used.
Return value
Promise<void>A Promise that, if fulfilled, resolves to
voidif the given object item's bounding box has been successfully rotated.
Discussion
The given object item is rotated relative to its original position without rotations—the bounding box without transformations. If the object item has been already rotated and has a bounding box with a rotation transformation, that existing rotation is removed first, and then the object item is rotated to the new angle—a new bounding box with the given rotation transformation is created.
To learn the global angle UoM, use the GetCurrentOptions(): Promise<EvCreateApiOptions> function. To set it, use the ConfigureOptions(opt: EvCreateApiOptions): Promise<EvCreateApiOptions> function.