Rotates a graphic by a specified angle.
# Metadata
Platforms: desktop, server OS: mac, windows, linux Introduced: 1.1.1 Security:
# Syntax
revRotatePoly graphicReference, angleInDegrees
# Params
- graphicReference : Any expression that evaluates to a reference to a graphic whose style property is set to "line", "curve", or "polygon" . - angleInDegrees : A number, or an expression that evaluates to a number.
# Examples
revRotatePoly the long ID of graphic "My Curve",45 -- rotates 45 degrees
revRotatePoly "graphic" && it, 10 * theStartAngle
revRotatePoly the name of graphic 3 of stack "Draw", field "Rotate by"
# Description
Use the revRotatePoly command to rotate a line, curve, or irregular polygon graphic.
>*Important:* The revRotatePoly command does not accept direct > graphic references. For example, the following statement causes an > error message:
revRotatePoly graphic "My Graphic",45 -- CAN'T USE THIS FORM
Instead, use a form that evaluates to a graphic reference, like this:
revRotatePoly the name of graphic "My Graphic",90 -- use this form revRotatePoly ("field" && quote & "My Field" & quote),22 -- or this
The angleInDegrees is a number, or an expression that evaluates to a number.
If the angleInDegrees is positive, the image rotates counterclockwise. If the angleInDegrees is negative, the image rotates clockwise.
>*Note:* When included in a standalone application, the Common library> is implemented as a hidden group and made available when > the group receives its first openBackground message. During the > first part of the application startup process, before > this message is sent, the revRotatePoly command is not yet > available. This may affect attempts to use this command in > startup, preOpenStack, openStack, or preOpenCard > handlers in the main stack. Once the application has > finished starting up, the library is available and the > revRotatePoly command can be used in any handler.
# Tags
ui,
# See
- **keyword:** select, graphic - **property:** angle - **message:** startup, openBackground, preOpenStack, openStack, preOpenCard - **command:** flip, rotate - **glossary:** command, evaluate, main stack, handler, message, group, standalone application, expression, statement, graphic, application - **library:** Common library, library