icon_t

Declaration

typedef struct {
int byteWidth;
uchar *andMask;
bitmap_t xorMask;
} icon_t

Prototype In

mgraph.h

Description

Structure representing a loaded icon. Icons are used by the MGL to display small, transparent bitmap images that can be of any dimension. The standard Windows .ICO files can store icons in 32x32 and 64x64 formats, although the MGL can load icons of any dimensions if you can find an editor that will allow you to create large icons.

Icons are always drawn by the MGL by first using the icon AND mask to punch a hole in the background of the display surface, and then the icon bitmap XOR mask is XOR'ed into the display surface. This method is compatible with the way that Microsoft Windows displays icons on the screen.

Members

byteWidth | Width of the monochrome AND mask in bytes. Must be consistent with the bitmap width in the xorMask structure.
andMask | Pointer to the AND mask information, which is stored contiguously in memory after the header block. The dimensions of the AND mask is defined by the dimensions of the xorMask bitmap image.
xorMask | Bitmap image header block, containing information about the mask used to draw the icon image. The actual bitmap surface and palette data is stored contiguously in memory after the header block.

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