<doc>
  <legacy_id>1777</legacy_id>
  <name>rectangle</name>
  <type>property</type>
  <syntax>
    <example>set the rectangle of <i>object</i> to <i>left</i>,<i>top</i>,<i>right</i>,<i>bottom</i></example>
    <example>get the [effective] rectangle of <i>object</i></example>
  </syntax>
  <library></library>
  <objects>
    <stack/>
    <card/>
    <group/>
    <field/>
    <button/>
    <graphic/>
    <scrollbar/>
    <player/>
    <image/>
  </objects>
  <synonyms>
    <synonym>rect</synonym>
  </synonyms>
  <classification>
    <category>Appearance &amp; Positioning</category>
  </classification>
  <references>
    <command tag="export snapshot">export snapshot Command</command>
    <command tag="crop">crop Command</command>
    <command tag="revChangeWindowSize">revChangeWindowSize Command</command>
    <message tag="moveStack">moveStack Message</message>
    <property tag="margins">margins Property</property>
    <property tag="backSize">backSize Property</property>
    <property tag="orientation">orientation Property</property>
    <property tag="bottom">bottom Property</property>
    <property tag="topRight">topRight Property</property>
    <property tag="windowManagerPlace">windowManagerPlace Property</property>
    <property tag="liveResizing">liveResizing Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
    <changed version="6.0"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Specifies the area within which an <glossary tag="object">object</glossary> is drawn.</summary>
  <examples>
    <example>set the rectangle of button "Tangle" to 20,20,45,200</example>
    <example>set the rectangle of group 1 to the rectangle of this card</example>
  </examples>
  <description>
    <p>Use the <b>rectangle</b> <glossary tag="property">property</glossary> to find out how far an <glossary tag="object">object</glossary> extends, to move it, or to resize it.</p><p/><p><b>Value:</b></p><p>The <b>rectangle</b> of an <glossary tag="object">object</glossary> consists of four <glossary tag="integer">integers</glossary> separated by commas.</p><p/><p><b>Comments:</b></p><p>The four items of an object's <b>rectangle</b> describe the <glossary tag="object">object's</glossary> left, top, right, and bottom edges:</p><p/><p>* The <i>left</i> is the number of <property tag="pixels">pixels</property> between the left edge of the <glossary tag="stack window">stack window</glossary> and the leftmost pixel of the <glossary tag="object">object</glossary>.</p><p/><p>* The <i>top</i> is the number of <property tag="pixels">pixels</property> between the top edge of the <glossary tag="stack window">stack window</glossary> and the topmost pixel of the <glossary tag="object">object</glossary>.</p><p/><p>* The <i>right</i> is the horizontal distance in <property tag="pixels">pixels</property> between the left edge of the <glossary tag="stack window">stack window</glossary> and the rightmost pixel of the <glossary tag="object">object</glossary>.</p><p/><p>* The <i>bottom</i> is the vertical distance in <property tag="pixels">pixels</property> between the top edge of the <glossary tag="stack window">stack window</glossary> and the bottommost pixel of the <glossary tag="object">object</glossary>.</p><p/><p><code/><b>Note:</b><code/> The sides of an <glossary tag="object">object's</glossary> <b>rectangle</b> specify the lines between <property tag="pixels">pixels</property>, not the <property tag="pixels">pixels</property> themselves. For example, if an <glossary tag="object">object's</glossary> <b>rectangle</b> is "0,0,2,2", the <glossary tag="object">object</glossary> includes four <property tag="pixels">pixels</property>, starting at the top left corner of the <keyword tag="card">card</keyword>. In the case of a line or curve <keyword tag="graphic">graphic</keyword>, the <glossary tag="graphic">graphic's</glossary> <b>rectangle</b> encloses all the <property tag="pixels">pixels</property> in the <glossary tag="graphic">graphic's</glossary> <property tag="points">points</property> <glossary tag="property">property</glossary> without touching any of them.</p><p/><p>If the object is a stack, its <b>rectangle</b> is relative to the left and top of the screen, rather than the left and top of the <glossary tag="stack window">stack window</glossary>.</p><p/><p>The first two items of a card's <b>rectangle</b> are always zero. The third <keyword tag="item">item</keyword> is the <property tag="height">height</property> of the <keyword tag="card">card</keyword>, and the fourth is the <property tag="width">width</property> of the <keyword tag="card">card</keyword>.</p><p/><p><code/><b>Note:</b><code/> The <b>rectangle</b> of a <keyword tag="graphic">graphic</keyword> is drawn around all its <property tag="points">points</property> without touching them. (Usually, this makes no difference, but in some circumstances where you need to place a <glossary tag="graphic">graphic's</glossary> <glossary tag="vertex">vertex</glossary> precisely with respect to another <glossary tag="object">object's</glossary> <b>rectangle</b>, you may need to take this into account.)</p><p/><p>If you specify the <b>effective</b> <glossary tag="keyword">keyword</glossary>, the rectangle includes the outline added by the <property tag="showFocusBorder">showFocusBorder</property> <glossary tag="property">property</glossary>. It also includes the heavy outline added to the <property tag="defaultButton">defaultButton</property>. If the <property tag="showFocusBorder">showFocusBorder</property> of the <i>object</i> is false, or the <i>object</i> is not currently <glossary tag="focus">focused</glossary>, the<code> effective rectangle </code>is the same as the<code> rectangle</code>.</p><p/><p><b>Note:</b>As of version 6.0 the effective rect property of stacks returns the rect of the given stack with its decorations and
frame taken into account. The effective rect of a stack can also be set. Here, the rect of the frame of the stack will be set appropriately before setting the rect of the stack.</p><p><b>Changes:</b></p><p>The use of the <b>effective</b> <glossary tag="keyword">keyword</glossary> with the <b>rectangle</b> <glossary tag="property">property</glossary> was introduced in version 1.1. In previous versions, the <b>rectangle</b> of the <property tag="defaultButton">defaultButton</property> included the heavy outline.</p>
  </description>
</doc>