<doc>
  <legacy_id>2042</legacy_id>
  <name>brushPattern</name>
  <type>property</type>
  <syntax>
    <example>set the brushPattern to {<i>patternNumber </i>| <i>imageID</i>}</example>
  </syntax>
  <library></library>
  <objects>
    <global/>
  </objects>
  <synonyms>
    <synonym>pattern</synonym>
  </synonyms>
  <classification>
    <category>Developing with LiveCode</category>
    <category>Appearance &amp; Positioning</category>
  </classification>
  <references>
    <command tag="choose">choose Command</command>
    <property tag="penPattern">penPattern Property</property>
    <property tag="brushColor">brushColor Property</property>
    <keyword tag="oval">oval Keyword</keyword>
    <keyword tag="rectangle">rectangle Keyword</keyword>
    <keyword tag="roundRect">roundRect Keyword</keyword>
    <keyword tag="regular">regular Keyword</keyword>
    <keyword tag="polygon">polygon Keyword</keyword>
    <keyword tag="spray can">spray can Keyword</keyword>
    <keyword tag="bucket">bucket Keyword</keyword>
    <keyword tag="brush">brush Keyword</keyword>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Specifies the pattern used to paint with the Brush <function tag="tool">tool</function> and to fill shapes in an <keyword tag="image">image</keyword>.</summary>
  <examples>
    <example>set the brushPattern to 204</example>
  </examples>
  <description>
    <p>Use the <b>brushPattern</b> <glossary tag="property">property</glossary> to change the pattern used with the <keyword tag="bucket">bucket</keyword>, <keyword tag="spray can">spray can</keyword>, and <keyword tag="brush">brush</keyword> <glossary tag="paint tool">paint tools</glossary>, and for the interior of filled shapes.</p><p/><p><b>Value:</b></p><p>The <b>brushPattern</b> is a pattern specifier.</p><p/><p>A <i>patternNumber</i> is a built-in pattern number between 1 and 164. (These patterns correspond to LiveCode's built-in patterns 136 to 300.)</p><p/><p>An <i>imageID</i> is the ID of an <keyword tag="image">image</keyword> to use for a pattern. 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>brushPattern</b> is empty.</p><p/><p><b>Comments:</b></p><p>Pattern images can be color or black-and-white.</p><p/><p><code/><img src="202652"/> <b>Cross-platform note:</b><code/> To be used as a pattern on <glossary tag="Mac OS">Mac OS systems</glossary>, an <keyword tag="image">image</keyword> must be 128x128 <property tag="pixels">pixels</property> or less, and both its <property tag="height">height</property> and <property tag="width">width</property> must be a power of 2. To be used on <function tag="openStacks">Windows</function> and <glossary tag="Unix">Unix systems</glossary>, <property tag="height">height</property> and <property tag="width">width</property> must be divisible by 8. To be used as a fully cross-platform pattern, both an image's dimensions should be one of 8, 16, 32, 64, or 128.</p><p/><p>If the <b>brushPattern</b> has been set since the last time the <property tag="brushColor">brushColor</property> was set, the pattern is used instead of the color specified by <property tag="brushColor">brushColor</property>. In other words, the last-set <glossary tag="property">property</glossary> takes priority.</p>
  </description>
</doc>