defpattern(3G) defpattern(3G)
defpattern - defines patterns
void defpattern(n, size, mask)
short n, size;
unsigned short mask[];
n expects the constant that you want to use as an identifier for the
pattern described by mask. This constant is used as an index into
a table of patterns. By default, pattern 0 is a 16X16 solid
pattern that cannot be changed.
size expects the size of the pattern: 16, 32, or 64 for a 16x16-,
32x32-, or 64x64-bit pattern, respectively.
mask expects an array of 16-bit integers that form the actual bit
pattern. The system stores the pattern in a pattern table at
index n. The pattern is described from left to right and bottom
to top, just as characters are described in a raster font.
defpattern allows you to define an arbitrary pattern and assign it an
identifier. You can later reference this pattern in other routines via
its identifier. Patterns are available to all windows when using
multiple windows.
Patterns affect the filling of polygons, including rectangles, arcs, and
circles, as well as polygons specified with individual vertices. They
also affect the filling of the window when clear(3g) is called. Patterns
have no effect on the scan conversion of points, lines, or characters, or
on pixel write or copy operations.
When a pattern is active (see setpattern), it is effectively replicated
across the entire screen, with the edges of pattern tiles aligned to the
left and bottom edges of the screen. Bit 15 of each 16-bit description
word is leftmost, and words are assembled left to right, then bottom to
top, to form each pattern square. Pixels on the screen that correspond
to zeros in the pattern remain unmodified during scan conversion of
polygons. No changes are made to any bitplane bank of a protected pixel.
deflinestyle, defrasterfont, getpattern, setpattern
This routine is available only in immediate mode.
Some machines do not support 64x64 patterns. Call
getgdesc(GD_PATSIZE_64) to determine the availability of 64x64 patterns.
Page 1
defpattern(3G) defpattern(3G)
There is a performance penalty on the Personal Iris for non-solid
patterns.
When defpattern is used to modify the current pattern, the new pattern
becomes current only when setpattern is called again.
PPPPaaaaggggeeee 2222 [ Back ]
|