This method sets the shape of the pointer, the hot spot of the pointer, and the colors to use for the cursor if the cursor is multicolored. The GDI calls GPE::MovePointer separately to move or hide the cursor.
SCODE GPE::SetPointerShape( GPESurf *pMask, GPESurf *pColorSurf,
int xHot, int yHot, int cx, int cy );
The pMask parameter points to a 1-bpp surface with a width of cx and a height of (2·cy). The top half defines the AND mask for the pointer while the lower half defines the XOR mask. Taken together, these masks provide 2 bits of information for each pixel of the pointer image. The following truth table shows display results 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. |
These masks provide for a black-and-white image while enabling transparency and inversion of pointer pixels.
If pColorSurf is not NULL, use the colors for the corresponding pixels of the color surface instead of the XOR mask value for pixels where the AND mask value is 0.