GETFILLMASK

Graphics Subroutine: Returns the current pattern used to fill shapes.

Module: USE DFLIB

Syntax

CALL GETFILLMASK (mask)

mask
(Output) INTEGER(1). One-dimensional array of length 8.

There are 8 bytes in mask, and each of the 8 bits in each byte represents a pixel, creating an 8x8 pattern. The first element (byte) of mask becomes the top 8 bits of the pattern, and the eighth element (byte) of mask becomes the bottom 8 bits.

During a fill operation, pixels with a bit value of 1 are set to the current graphics color, while pixels with a bit value of 0 are unchanged. The current graphics color is set with SETCOLORRGB or SETCOLOR. The 8-byte mask is replicated over the entire fill area. If no fill mask is set (with SETFILLMASK), or if the mask is all ones, solid current color is used in fill operations.

The fill mask controls the fill pattern for graphics routines (FLOODFILLRGB, PIE, ELLIPSE, POLYGON, and RECTANGLE).

Compatibility

STANDARD GRAPHICS QUICKWIN GRAPHICS LIB

See Also: ELLIPSE, FLOODFILLRGB, PIE, POLYGON, RECTANGLE, SETFILLMASK

Example

!  Build as QuickWin or Standard Graphics
USE DFLIB
INTEGER(1) style(8). array(8)
INTEGER(2) i
style = 0
style(1) = #F
style(3) = #F
style(5) = #F
style(7) = #F
CALL SETFILLMASK (style)
...
CALL GETFILLMASK (array)
WRITE (*, *) 'Fill mask in bits: '
DO i = 1, 8
  WRITE (*, '(B8)') array(i)
END DO
END