ATTR_PEN_PATTERN

Type: Control attribute
Description: Determines the pattern used to fill interior areas of shapes.

The value is an 8-byte unsigned character array representing a repeating 8-by-8 grid of pixels through which filling operations are filtered. A pixel of value 1 means that the pen fill color is used for that pixel. A pixel value of 0 means that black is used for that pixel.

Hint: To make a pixel value of 0 mean "screen color" instead of "black", do the following: First, set ATTR_PEN_PATTERN to the complement of the pattern you wish to use. Then, set ATTR_PEN_MODE to VAL_AND_MODE, set ATTR_PEN_FILL_COLOR to VAL_WHITE, and use a canvas draw function to fill the area. Then, set ATTR_PEN_PATTERN to the desired pattern, change the ATTR_PEN_MODE to VAL_OR_MODE, change the ATTR_PEN_FILL_COLOR to the desired pattern color, and draw again.

Control Types: Canvases.
Data Type: unsigned char[8]
Default Value: The solid pattern (each byte of the array is 0xFF).