revRotatePoly

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
revRotatePoly <graphicReference>, <angleInDegrees>
Summary

Rotates a graphic by a specified angle.

Introduced1.1.1
OSmac, windows, linux
Platformsdesktop, server
Parameters
NameTypeDescription
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.

Example
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"
RelatedKeyword: 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
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 Commonlibrary is implemented as a hidden group and made available when the group receives its first openBackground message. During the first part of the application's 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.

Tagsui