CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Functions
ColorMapping.h File Reference
#include "OdPlatform.h"

Go to the source code of this file.

Functions

bool odcmIsBackgroundLight (ODCOLORREF backgroung)
 
FIRSTDLL_EXPORT const ODCOLORREFodcmAcadDarkPalette ()
 
FIRSTDLL_EXPORT const ODCOLORREFodcmAcadLightPalette ()
 
FIRSTDLL_EXPORT const ODCOLORREFodcmAcadPlotPalette ()
 
FIRSTDLL_EXPORT const ODCOLORREFodcmAcadPalette (ODCOLORREF backgr)
 
FIRSTDLL_EXPORT const ODCOLORREFodcmAcadDynamicPalette (ODCOLORREF backgr)
 
FIRSTDLL_EXPORT ODCOLORREF odcmLookupRGB (int index, const ODCOLORREF *pPalette)
 
FIRSTDLL_EXPORT int odcmLookupACI (ODCOLORREF rgb, const ODCOLORREF *pPalette)
 

Function Documentation

◆ odcmAcadDarkPalette()

FIRSTDLL_EXPORT const ODCOLORREF * odcmAcadDarkPalette ( )

Gets the palette for a dark background.

Returns
The palette for the dark background.

◆ odcmAcadDynamicPalette()

FIRSTDLL_EXPORT const ODCOLORREF * odcmAcadDynamicPalette ( ODCOLORREF  backgr)

Gets the palette for a given background.

Returns
The palette for the given background.

◆ odcmAcadLightPalette()

FIRSTDLL_EXPORT const ODCOLORREF * odcmAcadLightPalette ( )

Gets the palette for a light background.

Returns
The palette for the light background.

◆ odcmAcadPalette()

FIRSTDLL_EXPORT const ODCOLORREF * odcmAcadPalette ( ODCOLORREF  backgr)

Gets the palette for a given background.

Returns
The palette for the given background.

◆ odcmAcadPlotPalette()

FIRSTDLL_EXPORT const ODCOLORREF * odcmAcadPlotPalette ( )

Gets the palette for printing.

Returns
The palette for printing.

◆ odcmIsBackgroundLight()

bool odcmIsBackgroundLight ( ODCOLORREF  backgroung)
inline

Checks whether the background is light.

Parameters
backgroung[in] The background as an ODCOLORREF value.
Returns
The true value if the background is light, or false if the background is dark.
Remarks
Returns true if Red < 128 && Green < 128 && Blue < 128. Returns false if Red > 127 || Green > 127 || Blue > 127.

Definition at line 40 of file ColorMapping.h.

◆ odcmLookupACI()

FIRSTDLL_EXPORT int odcmLookupACI ( ODCOLORREF  rgb,
const ODCOLORREF pPalette 
)

Gets the color index for a given RGB.

Parameters
rgb[in] RGB to perform mapping.
pPalette[in] Palette to perform mapping.
Returns
Color index for the given RGB.

◆ odcmLookupRGB()

FIRSTDLL_EXPORT ODCOLORREF odcmLookupRGB ( int  index,
const ODCOLORREF pPalette 
)

Gets the RGB values for a given color index.

Parameters
pPalette[in] Palette to perform mapping.
Returns
RGB valued for the given color index.