MGL_rotatePalette

Rotates the palette values for a device context.

Declaration

void MGLAPI MGL_rotatePalette(
    MGLDC *dc,
    int numColors,
    int startIndex,
    int direction)

Prototype In

mgraph.h

Parameters

dc

Device context containing palette

numColors

Number of colors to rotate

startIndex

Starting index for colors to rotate

direction

Direction to rotate the palette entries

 

Description

This function rotates the palette values in the device context in the specified direction. Note that this routine does not effect the currently active hardware palette, and you must call MGL_realizePalette in order to make the program the rotated palette to the hardware.

Supported directions of rotation are enumerated in MGL_palRotateType.

When the direction specified is MGL_ROTATE_UP, the first entry in the palette is moved to the last position in the palette, and all the remaining entries are moved one position up in the array. If the direction specified is MGL_ROTATE_DOWN, the last entry is moved into the first entry of the palette, and the remaining entries are all moved one position down in the array.

See Also

MGL_setPalette, MGL_getPalette, MGL_fadePalette

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