# GETFILLMASK (W*S)

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

## Module

USE IFQWIN

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).

## Example

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

Parent topic: Graphics Library Routines

## See Also

ELLIPSE
FLOODFILLRGB
PIE
POLYGON
RECTANGLE
SETFILLMASK