| Home
| Previous
| Next
| Up

colorRGBA_cursor_t

Declaration

typedef struct {
ulong bitsPerPixel;
uchar colorData[16384];
ulong xHotSpot;
ulong yHotSpot;
} colorRGBA_cursor_t

Prototype In

mgraph.h

Description

Hardware 32-bit RGBA alpha blended cursor structure. This structure defines a color hardware cursor that is downloaded to the hardware. The cursor is defined as a 64x64 32-bit RGBA image with alpha channel. The alpha channel data is used to define the transparency level for the bitmap, with 0 being fully transparent and 255 being full opaque. Since the color bitmap data is alpha blended, the is no AND mask for the cursor image.

Structure representing a 32-bit RGBA alpha blended color mouse cursor. The cursor is defined as a 64x64 32-bit RGBA image with alpha channel. The alpha channel data is used to define the transparency level for the bitmap, with 0 being fully transparent and 255 being full opaque. Since the color bitmap data is alpha blended, the is no AND mask for the cursor image.

The xHotSpot and yHotSpot 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.

Note that Microsoft Windows cursors stored on disk are generally 32x32 in size, and the MGL will convert them during loading to the 64x64 internal format. The MGL does however support loading 64x64 cursors, but you may need to manually create these yourself as Windows resource editors appear to be hard coded to use 32x32 cursors.

Members

bitsPerPixel | Indicates the number of bits per pixel for cursor (32 in this case)
colorData | Cursor color data as a 64x64 array of packed 32-bit pixels
xHotSpot | x coordinate of the mouse hotspot location. The mouse hotspot location is used to properly align the mouse cursor image to the actual mouse cursor position on the screen
yHotSpot | y coordinate of the mouse hotspot location

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