defpat(3G)
defpat - defines patterns
Showing IRIX 6.5.30 (default release). Unchanged since IRIX 6.5.
NAME defpat - defines patterns FORTRAN 77 SPECIFICATION subroutine defpat(n, size, mask) integer*4 n, size integer*2 mask((size*size)/16) PARAMETERS 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. DESCRIPTION defpat 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 setpat) 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. SEE ALSO deflin, defras, getpat, setpat NOTES This routine is available only in immediate mode. Some machines do not support 64x64 patterns. Call getgde(GDPATS) to determine the availability of 64x64 patterns. There is a performance penalty on the Personal Iris for non-solid patterns. When defpat is used to modify the current pattern, the new pattern becomes current only when setpat is called again.