Specifies the pattern used for painting with the paint tools.
# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:
# Syntax
set the penPattern to {patternNumber | imageID | empty}
# Examples
set the penPattern to empty
set the penPattern to 1013
# Description
Use the penPattern property to change the pattern used with the pencil, line, and curve paint tools, and for the borders of shapes.
Pattern images can be color or black-and-white.
>*Cross-platform note:* To be used as a pattern on > Mac OS, an image must be 128x128 pixels or less, > and both its height and width must be a power of 2. To be used on > Windows and Unix, height and width 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.
If the penColor has been set since the last time the penPattern was set, the color is used instead of the pattern specified by penPattern. In other words, the last-set property takes priority.
# Tags
ui,
# See
- **keyword:** image, line, curve, pencil - **property:** width, height, pixels, foregroundPattern, penColor, brushPattern - **command:** choose - **function:** stacks - **glossary:** property, Windows, paint tool, Mac OS, Unix, current stack