Supported Browsers Home   
GA_colorCursor Previous   
GA_colorCursorRGB Next   
Type Definitions Up   

GA_colorCursor256

Declaration

typedef struct {
    N_uint8     ColorData[4096];
    N_uint8     ANDMask[512];
    GA_palette  Palette[256];
    N_uint32    HotX;
    N_uint32    HotY;
    } GA_colorCursor256

Prototype In

snap/graphics.h

Description

Hardware 256-color cursor structure. This structure defines a color hardware cursor that is downloaded to the hardware. The cursor is defined as a 64x64 image with an AND mask and color data. The definition of the AND mask, cursor data and the pixels that will appear on the screen is as follows:

AND Color   Result
0   0       Transparent (color from screen memory)
0   not 0   Invert (complement of color from screen memory)
1   xx      Cursor color data

Hence if the AND mask is a zero the color data should be either 00 to make the pixel transparent or not 0 to make it the inversion of the screen pixel.

The color data is passed down to the driver as 8-bit packed color index values, along with a 256-color lookup table containing the real 24-bit RGB color values for the cursor image. It is up to the calling application to translate and quantise cursor images of higher color depths down to the format supported by the hardware.

The HotX and HotY members define the hot spot for the cursor, which is the location where the logical mouse pointer is located in the cursor image. When you click the mouse, the pixel under the hot-spot is the pixel selected.

Members

ColorData

Cursor color data as a 64x64 array of packed 8-bit pixels

ANDMask

Cursor AND mask

Palette

256-color palette for cursor image

HotX

Cursor X coordinate hot spot

HotY

Cursor Y coordinate hot spot

 

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com