<doc>
  <legacy_id>1561</legacy_id>
  <name>windowShape</name>
  <type>property</type>
  <syntax>
    <example>set the windowShape of stack to {imageID | 0}</example>
  </syntax>
  <library></library>
  <objects>
    <stack/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Windows &amp; Dialog Boxes</category>
  </classification>
  <references>
    <property tag="decorations">decorations Property</property>
    <property tag="iconic">iconic Property</property>
    <property tag="maskData">maskData Property</property>
    <property tag="style">style Property</property>
  </references>
  <history>
    <introduced version="2.0">Added.</introduced>
    <changed version="2.6"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
  </classes>
  <security>
  </security>
  <summary>Specifies an <keyword tag="image">image</keyword> whose mask is used as the shape of the window.</summary>
  <examples>
    <example>set the windowShape of this stack to 974</example>
  </examples>
  <description>
    <p>Use the <b>windowShape</b> <glossary tag="property">property</glossary> to display a special-purpose window shape.</p><p/><p><b>Value:</b></p><p>The <b>windowShape</b> of a <object tag="stack">stack</object> is the <property tag="ID">ID</property> of an <keyword tag="image">image</keyword> whose <glossary tag="mask">mask</glossary> will be used as the window shape. LiveCode looks for the specified <keyword tag="image">image</keyword> first in the <glossary tag="current stack">current stack</glossary>, then in other open <function tag="stacks">stacks</function>.</p><p/><p>By default, the <b>windowShape</b> <glossary tag="property">property</glossary> of newly created <function tag="stacks">stacks</function> is set to zero.</p><p/><p><b>Comments:</b></p><p>If the image has a 1-bit transparency mask, the shape of this mask is used to clip the window: the mask is superimposed on the window, and any pixels that fall outside the mask are not displayed. For example, if you set a stack's <b>windowShape</b> to an <keyword tag="image">image</keyword> whose <glossary tag="mask">mask</glossary> is a rectangle with rounded corners, the window is shown with rounded corners, and the parts of the <object tag="stack">stack</object> in the corners are hidden.</p><p/><p>If the image has a full alpha-mask and the running platform supports the feature (currently Windows 2000 and later, and MacOS X) then the alpha-mask of the window will be set to that of the image. This will result in the transparency of each pixel in the window being determined by the corresponding pixel in the alpha-mask of the image. Any pixel more transparent than a system-specific threshold value will be treated as fully transparent with regards to mouse-clicks and other events.</p><p/><p>For 1-bit masks, the window needs to be re-created whenever the windowShape property is set making it unsuitable for animation. However, alpha-masked windows suffer no such limitation and it is possible to set the windowShape property successively to such images without any flicker.</p><p/><p><img src="202653"/> <b>Important!</b> The border and <glossary tag="title bar">title bar</glossary> of a <object tag="stack">stack</object> are not shown if the <glossary tag="stack">stack's </glossary> <b>windowShape</b> is set. This means you will need to provide methods of dragging and closing the window if you want the user to be able to do these tasks.</p><p/><p>To revert to the normal window shape, set the <b>windowShape</b> to zero.</p><p/><p><b>Changes:</b></p><p>The ability to use images with full (&gt; 1-bit) alpha masks was introduced in version 2.6.</p>
  </description>
</doc>