MGL_mapToPalette

Map the colors of a memory device context to match a new palette.

Declaration

void MGLAPI MGL_mapToPalette(
MGLDC *dc,
palette_t *pal)

Prototype In

mgraph.h

Parameters

dc | Memory device context to map (8 bits per pixel only)
pal | New palette to map to

Description

This function maps the pixels of an 8 bits per pixel memory device context to the specified palette, and then sets the palette for the device context to the new palette. This function actually translates every pixel in the device context's surface to the new palette, by looking for the entry in the new palette that is the closest to color of the original pixel in the old palette (the one currently active before this routine was called).

See Also

MGL_setPalette

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