CFx SDK Documentation
2022 SP0
|
#include <GiPalette.h>
Classes | |
struct | PalEntry |
Public Member Functions | |
OdGiPalette () | |
ODCOLORREF | color (OdUInt32 nColor) const |
OdInt32 | entryHelper (OdUInt32 nColor) const |
void | setColor (OdUInt32 nColor, ODCOLORREF color) |
void | setEntryHelper (OdUInt32 nColor, OdInt32 entryHelper) |
const OdGiColorCube * | colorCube () const |
void | setColorCube (const OdGiColorCube &colorCube) |
void | resetColorCube () |
const OdGiGrayRamp * | grayRamp () const |
void | setGrayRamp (const OdGiGrayRamp &grayRamp) |
void | resetGrayRamp () |
bool | install (const OdGiColorCube &cb) |
bool | install (const OdGiGrayRamp &gr) |
bool | install (const OdGiPalette &pal2) |
OdInt32 | closestMatch (ODCOLORREF cref, bool bThroughPal=false) const |
OdInt32 | firstAvailableBlock (OdInt32 blockSize) const |
bool | isEqualTo (const OdGiPalette &pal2) const |
bool | remove (const OdGiPalette &pal2) |
void | clear () |
Protected Types | |
typedef OdArray< PalEntry, OdMemoryAllocator< PalEntry > > | PalEntryArray |
Protected Member Functions | |
void | initPalette () |
void | resetColorCube (OdGiColorCube *pColorCube) |
void | resetGrayRamp (OdGiGrayRamp *pGrayRamp) |
void | setColor (OdInt32 nColor, ODCOLORREF color) |
Protected Attributes | |
PalEntryArray | m_palette |
OdSharedPtr< OdGiColorCube > | m_pColorCube |
OdSharedPtr< OdGiGrayRamp > | m_pGrayRamp |
This class represents 256 colors palette. Corresponding C++ library: TD_Gi <group OdGi_Classes>
Definition at line 240 of file GiPalette.h.
|
protected |
Definition at line 248 of file GiPalette.h.
|
inline |
Definition at line 254 of file GiPalette.h.
void OdGiPalette::clear | ( | ) |
Clear palette.
OdInt32 OdGiPalette::closestMatch | ( | ODCOLORREF | cref, |
bool | bThroughPal = false |
||
) | const |
Compute closest palette color index.
cref | [in] Input color. |
bThroughPal | [in] Skip usage of linked color cube and gray ramp in calculations. |
|
inline |
Returns palette color.
nColor | [in] Color index. |
Definition at line 264 of file GiPalette.h.
|
inline |
Returns color cube linked with this palette.
Definition at line 299 of file GiPalette.h.
Returns palette entry helper.
nColor | [in] Color index. |
Definition at line 272 of file GiPalette.h.
Find start index of first available free block in palette.
blockSize | [in] Size of free block for search. |
|
inline |
Returns gray ramp linked with this palette.
Definition at line 321 of file GiPalette.h.
|
protected |
bool OdGiPalette::install | ( | const OdGiColorCube & | cb | ) |
Setup palette for specified color cube.
cb | [in] Input color cube. |
bool OdGiPalette::install | ( | const OdGiGrayRamp & | gr | ) |
Setup palette for specified gray ramp.
gr | [in] Input gray ramp. |
bool OdGiPalette::install | ( | const OdGiPalette & | pal2 | ) |
Setup palette as a clone of another palette.
pal2 | [in] Input palette. |
bool OdGiPalette::isEqualTo | ( | const OdGiPalette & | pal2 | ) | const |
Check does this palette is equal with another one.
pal2 | [in] Palette for check. |
bool OdGiPalette::remove | ( | const OdGiPalette & | pal2 | ) |
Remove equal sub-palette from current palette.
pal2 | [in] Palette for remove. |
|
inline |
Reset linkage of color cube with this palette.
Definition at line 313 of file GiPalette.h.
|
protected |
|
inline |
Reset linkage of gray ramp with this palette.
Definition at line 335 of file GiPalette.h.
|
protected |
|
protected |
|
inline |
Sets palette color.
nColor | [in] Color index. |
color | [in] Input color. |
Definition at line 282 of file GiPalette.h.
|
inline |
Link color cube with this palette.
Definition at line 306 of file GiPalette.h.
Sets palette entry helper.
nColor | [in] Color index. |
entryHelper | [in] New palette entry helper value. |
Definition at line 291 of file GiPalette.h.
|
inline |
Link gray ramp with this palette.
Definition at line 328 of file GiPalette.h.
|
protected |
Definition at line 250 of file GiPalette.h.
|
protected |
Definition at line 251 of file GiPalette.h.
|
protected |
Definition at line 252 of file GiPalette.h.