Palette operations
[GDI functions]

Functions


Function Documentation

HPALETTE GUIAPI CreatePalette ( GAL_Palette pal  ) 

Creates a logical palette.

This function creates a logical palette from a palette entry pal.

Parameters:
pal The Pointer to a GAL_Palette structure that contains information about the colors in the logical palette..
Returns:
Handle to the logical palette on success, otherwise 0.
See also:
GetPalette
void GUIAPI DestroyPalette ( HPALETTE  pal  ) 

Destroy a logical palette.

This function destroyes a logical palette pal.

Parameters:
pal The handle to the logical palette.
See also:
CreatePalette
HPALETTE GUIAPI GetDefaultPalette ( void   ) 

Gets the system default logical palette.

Returns:
Handle to the system default logical palette on success, otherwise 0.
See also:
GetPalette
RGBCOLOR GUIAPI GetNearestColor ( HDC  hdc,
Uint8  red,
Uint8  green,
Uint8  blue 
)

Gets the nearest color compliant to a DC for a spefici color.

This function gets the nearest color compliant to the DC hdc for the specific color (red, green, blue).

Parameters:
hdc The handle to the device context.
red The red component value of the color.
green The green component value of the color.
blue The blue component value of the color.
Returns:
The color of the nearest color.
See also:
GetNearestPaletteIndex
UINT GUIAPI GetNearestPaletteIndex ( HPALETTE  hpal,
Uint8  red,
Uint8  green,
Uint8  blue 
)

Gets the nearest palette index in the logical palette for a spefici color.

This function gets the nearest palette index in the logical palette hpal for the color (red, green, blue).

Parameters:
hpal The logical palette.
red The red component value of the color.
green The green component value of the color.
blue The blue component value of the color.
Returns:
The index of palette entry in the logical palette.
See also:
GetNearestColor
int GUIAPI GetPalette ( HDC  hdc,
int  start,
int  len,
GAL_Color cmap 
)

Gets palette entries of a DC.

This function gets some palette entries of the DC hdc.

Parameters:
hdc The device context.
start The start entry of palette to be retrieved.
len The length of entries to be retrieved.
cmap The buffer receives the palette entries.
Returns:
The number of entries retrieved from the logical palette.
See also:
SetPalette
int GUIAPI GetPaletteEntries ( HPALETTE  hpal,
int  start,
int  len,
GAL_Color cmap 
)

Gets palette entries of a logical palette.

This function gets some palette entries of the logical palette hpal.

Parameters:
hpal The logical palette.
start The start entry of palette to be retrieved.
len The length of entries to be retrieved.
cmap The buffer receives the palette entries.
Returns:
The number of entries retrieved from the logical palette.
See also:
GetPalette
BOOL GUIAPI RealizePalette ( HDC  hdc  ) 

This function maps palette entries from the current logical palette to the system palette.

RealizePalette modifies the palette for the device associated with the specified device context.

If the device context is a display DC, the physical palette for that device is modified. RealizePalette will return FALSE if the hdc does not have a settable palette.

If the device context is a memory DC, this function will return FALSE and do nothing.

Parameters:
hdc Handle to the device context into which a logical palette has been selected.
Returns:
TRUE on success, otherwise FALSE.
BOOL GUIAPI ResizePalette ( HPALETTE  hpal,
int  len 
)

Resizes a logical palette.

This function resizes a logical palette.

Parameters:
hpal The handle to the logical palette.
len The new size of the logical palette.
Returns:
TRUE for success, else returns FALSE.
See also:
CreatePalette
BOOL GUIAPI SelectPalette ( HDC  hdc,
HPALETTE  hpal,
BOOL  reserved 
)

Selects a palette for a DC.

This function the palette hpal to be the palette of the DC hdc.

Parameters:
hdc The device context.
hpal Handle to the palette.
reserved No use, reserved.
Returns:
TRUE on success, otherwise FALSE.
See also:
CreatePalette
BOOL GUIAPI SetColorfulPalette ( HDC  hdc  ) 

Sets a DC with colorfule palette.

This function sets the DC specified by hdc with colorful palette.

Parameters:
hdc The device context.
Returns:
TRUE on success, otherwise FALSE.
See also:
SetPalette
BOOL GUIAPI SetPalette ( HDC  hdc,
int  start,
int  len,
GAL_Color cmap 
)

Sets palette entries of a DC.

This function sets some palette entries of the DC hdc.

Parameters:
hdc The device context.
start The start entry of palette to be set.
len The length of entries to be set.
cmap Pointer to the palette entries.
Returns:
TRUE on success, otherwise FALSE.
See also:
GetPalette
int GUIAPI SetPaletteEntries ( HPALETTE  hpal,
int  start,
int  len,
GAL_Color cmap 
)

Sets palette entries of a logical palette.

This function sets some palette entries of the logical palette hpal.

Parameters:
hpal The logical palette.
start The start entry of palette to be set.
len The length of entries to be set.
cmap The buffer contains the palette entries.
Returns:
The number of entries set for the logical palette.
See also:
SetPalette
Generated on Thu Apr 7 15:58:37 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3