MGL_fadePalette

Fades the values for a color palette.

Declaration

ibool MGLAPI MGL_fadePalette(
    MGLDC *dc,
    palette_t *fullIntensity,
    int numColors,
    int startIndex,
    uchar intensity)

Prototype In

mgraph.h

Parameters

dc

Device context with palette to fade

fullIntensity

Pointer to full intensity palette to fade from

numColors

Number of colors in palette to fade

startIndex

Starting index of first color to fade

intensity

Intensity for the final output palette (0 - 255)

 

Return Value

True if the entire output palette is black, false if not.

Description

This routine will take the values from a full intensity palette_t structure, fade the values and store them into a device context palette. The actual hardware palette will not be programmed at this stage, so you will then need to make a call to MGL_realizePalette to make the changes visible.

The intensity value is a number between 0 and 255 that defines the intensity of the output values. An intensity of 255 will produce the same output values as the input values. An intensity of 128 will product values in the output palette that are half the intensity of the input palette and an intensity of 0 produces an all black palette.

If the entire output palette is black, then the routine will return true, otherwise it will return false.

See Also

MGL_setPalette, MGL_getPalette, MGL_rotatePalette, MGL_realizePalette

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