Drawing Monochrome Pointers

There are two parts to a monochrome bitmap; the first part defines the AND mask for the pointer while the second part defines the XOR mask. Taken together, these masks provide two bits of information for each pixel of the pointer image. The following truth table determines what should be drawn on the display for different values in the AND and XOR masks:

AND mask value

XOR mask value

Result displayed on screen

0

0

Black.

0

1

White.

1

0

Transparent, pixel is unchanged

1

1

Inverts the pixel color

This supplies a black and white image while allowing for transparency and inversion of the pixels that make up the pointer.