<doc>
  <legacy_id>1520</legacy_id>
  <name>revRotatePoly</name>
  <type>command</type>
  <syntax>
    <example>revRotatePoly <i>graphicReference</i>,<i>angleInDegrees</i></example>
  </syntax>
  <library>Common library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Appearance &amp; Positioning</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <property tag="angle">angle Property</property>
    <command tag="flip">flip Command</command>
    <command tag="rotate">rotate Command</command>
    <keyword tag="select">select Keyword</keyword>
  </references>
  <history>
    <introduced version="1.1.1">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Rotates a <keyword tag="graphic">graphic</keyword> by a specified angle.</summary>
  <examples>
    <example>revRotatePoly the long ID of graphic "My Curve",45 <code><i>-- rotates 45 degrees</i></code></example>
    <example>revRotatePoly "graphic" &amp;&amp; it, 10 * theStartAngle</example>
    <example>revRotatePoly the name of graphic 3 of stack "Draw", field "Rotate by"</example>
  </examples>
  <description>
    <p>Use the <b>revRotatePoly</b> <glossary tag="command">command</glossary> to rotate a line, curve, or irregular polygon <keyword tag="graphic">graphic</keyword>.</p><p/><p><b>Parameters:</b></p><p>The <i>graphicReference</i> is any <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a <href tag="reference/object_reference.rev">reference</href> to a <keyword tag="graphic">graphic</keyword> whose <property tag="style">style</property> <glossary tag="property">property</glossary> is set to "line", "curve", or "polygon".</p><p/><p><code/><img src="202653"/> <b>Important!</b><code/> The <b>revRotatePoly</b> <glossary tag="command">command</glossary> does not accept direct graphic references. For example, the following <glossary tag="statement">statement</glossary> causes an error message:</p><p/><p><code>  revRotatePoly graphic "My Graphic",45 </code>-- <code/><b>CAN'T USE THIS FORM</b><code/></p><p/><p>Instead, use a form that evaluates to a graphic reference, like this:</p><p/><p><code>  revRotatePoly the name of graphic "My Graphic",90 </code><code><i>-- use this form</i></code></p><p><code>  revRotatePoly ("field" &amp;&amp; quote &amp; "My Field" &amp; quote),22 </code><code><i>-- or this</i></code></p><p/><p>The <i>angleInDegrees</i> is a number, or an <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a number.</p><p/><p><b>Comments:</b></p><p>If the <i>angleInDegrees</i> is positive, the image rotates counterclockwise. If the <i>angleInDegrees</i> is negative, the image rotates clockwise.</p><p/><p><code/><b>Note:</b><code/> When included in a <glossary tag="standalone application">standalone application</glossary>, the <glossary tag="Common library">Common library</glossary> is implemented as a hidden <command tag="group">group</command> and made available when the <command tag="group">group</command> receives its first <message tag="openBackground">openBackground</message> message. During the first part of the <glossary tag="application">application's</glossary> startup process, before this <keyword tag="message box">message</keyword> is sent, the <b>revRotatePoly</b> <glossary tag="command">command</glossary> is not yet available. This may affect attempts to use this <glossary tag="command">command</glossary> in <message tag="startup">startup</message>, <message tag="preOpenStack">preOpenStack</message>, <message tag="openStack">openStack</message>, or <message tag="preOpenCard">preOpenCard</message> <glossary tag="handler">handlers</glossary> in the <glossary tag="main stack">main stack</glossary>. Once the <glossary tag="application">application</glossary> has finished starting up, the <command tag="start using">library</command> is available and the <b>revRotatePoly</b> <glossary tag="command">command</glossary> can be used in any <glossary tag="handler">handler</glossary>.</p>
  </description>
</doc>