CFx SDK Documentation 2024 SP0
|
#include <GiPalette.h>
Classes | |
struct | Addressation |
Public Member Functions | |
OdGiPalette () | |
OdGiPalette (const OdGiPalette &obj) | |
OdGiPalette & | operator= (const OdGiPalette &obj) |
virtual OdRxObjectPtr | clone () const |
OdSmartPtr< OdGiPalette > | cloneIfNeed () const |
ODCOLORREF | color (OdInt32 nColor) const |
bool | entryActivity (OdInt32 nColor) const |
void | setColor (OdInt32 nColor, ODCOLORREF color) |
void | setEntryActivity (OdInt32 nColor, bool bActivity) |
const ODCOLORREF * | asArray () const |
const OdGiColorCube * | colorCube () const |
void | setColorCube (const OdGiColorCube *pColorCube) |
void | resetColorCube () |
const OdGiGrayRamp * | grayRamp () const |
void | setGrayRamp (const OdGiGrayRamp *pGrayRamp) |
void | resetGrayRamp () |
bool | install (const OdGiColorCube *pColorCube, bool bForceUpdate=false) |
bool | install (const OdGiGrayRamp *pGrayRamp, bool bForceUpdate=false) |
bool | install (const OdGiPalette *pPalette, bool bForceUpdate=false, const Addressation &address=Addressation()) |
bool | install (ODCOLORREF const *const pColors, bool bForceUpdate=false, const Addressation &address=Addressation()) |
OdInt32 | closestMatch (ODCOLORREF cref, bool bThroughPal=false) const |
OdInt32 | firstAvailableBlock (OdInt32 blockSize) const |
bool | isEqualTo (const OdGiPalette *pPalette, const Addressation &address=Addressation()) const |
bool | remove (const OdGiPalette *pPalette, bool bForceUpdate=false, const Addressation &address=Addressation()) |
void | clear () |
Public Member Functions inherited from OdStaticRxObject< OdRxObject > | |
void | addRef () |
void | release () |
Public Member Functions inherited from OdRxObject | |
ODRX_HEAP_OPERATORS () | |
OdRxObject () | |
virtual | ~OdRxObject () |
virtual OdRxObject * | queryX (const OdRxClass *pClass) const |
virtual OdRxObject * | x (const OdRxClass *pClass) const |
virtual OdRxClass * | isA () const |
virtual void | addRef ()=0 |
virtual void | release ()=0 |
virtual long | numRefs () const |
bool | isKindOf (const OdRxClass *pClass) const |
virtual OdRxObjectPtr | clone () const |
virtual void | copyFrom (const OdRxObject *pSource) |
virtual OdRx::Ordering | comparedTo (const OdRxObject *pOther) const |
virtual bool | isEqualTo (const OdRxObject *pOther) const |
Static Public Member Functions | |
static OdSmartPtr< OdGiPalette > | createDynamic () |
Static Public Member Functions inherited from OdRxObject | |
static OdRxObjectPtr | cast (const OdRxObject *pointer) |
static OdRxClass * | desc () |
Protected Member Functions | |
virtual bool | isDynamic () const |
void | initPalette () |
void | resetColorCube (const OdGiColorCube *pColorCube) |
void | resetGrayRamp (const OdGiGrayRamp *pGrayRamp) |
void | setColorImpl (OdInt32 nColor, ODCOLORREF color) |
Protected Attributes | |
ODCOLORREF | m_colors [256] |
OdUInt64 | m_activities [4] |
OdGiColorCubePtr | m_pColorCube |
OdGiGrayRampPtr | m_pGrayRamp |
This class represents 256 colors palette. Corresponding C++ library: TD_Gi <group OdGi_Classes>
Definition at line 262 of file GiPalette.h.
|
inline |
Definition at line 284 of file GiPalette.h.
OdGiPalette::OdGiPalette | ( | const OdGiPalette & | obj | ) |
|
inline |
Returns palette colors as array pointer.
Definition at line 335 of file GiPalette.h.
void OdGiPalette::clear | ( | ) |
Clear palette.
|
virtual |
Creates a clone of this object, and returns a pointer to the clone.
Reimplemented from OdRxObject.
|
inline |
Definition at line 294 of file GiPalette.h.
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 300 of file GiPalette.h.
|
inline |
Returns color cube linked with this palette.
Definition at line 343 of file GiPalette.h.
|
static |
|
inline |
Returns palette entry activity flag.
nColor | [in] Color index. |
Definition at line 308 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 365 of file GiPalette.h.
|
protected |
bool OdGiPalette::install | ( | const OdGiColorCube * | pColorCube, |
bool | bForceUpdate = false |
||
) |
Setup palette for specified color cube.
pColorCube | [in] Input color cube. |
bForceUpdate | [in] Update palette color even if it is already set. |
bool OdGiPalette::install | ( | const OdGiGrayRamp * | pGrayRamp, |
bool | bForceUpdate = false |
||
) |
Setup palette for specified gray ramp.
pGrayRamp | [in] Input gray ramp. |
bForceUpdate | [in] Update palette color even if it is already set. |
bool OdGiPalette::install | ( | const OdGiPalette * | pPalette, |
bool | bForceUpdate = false , |
||
const Addressation & | address = Addressation() |
||
) |
Setup palette as a clone of another palette.
pPalette | [in] Input palette. |
address | [in] Palette insertion offsets. |
bool OdGiPalette::install | ( | ODCOLORREF const *const | pColors, |
bool | bForceUpdate = false , |
||
const Addressation & | address = Addressation() |
||
) |
Setup palette from specified palette array.
pColors | [in] Array of palette colors. |
bForceUpdate | [in] Update palette color even if it is already set. |
address | [in] Palette insertion offsets. |
|
inlineprotectedvirtual |
Definition at line 282 of file GiPalette.h.
bool OdGiPalette::isEqualTo | ( | const OdGiPalette * | pPalette, |
const Addressation & | address = Addressation() |
||
) | const |
Check does this palette is equal with another one.
pPalette | [in] Palette for check. |
address | [in] Palette insertion offsets. |
OdGiPalette & OdGiPalette::operator= | ( | const OdGiPalette & | obj | ) |
bool OdGiPalette::remove | ( | const OdGiPalette * | pPalette, |
bool | bForceUpdate = false , |
||
const Addressation & | address = Addressation() |
||
) |
Remove equal sub-palette from current palette.
pPalette | [in] Palette for remove. |
address | [in] Palette insertion offsets. |
|
inline |
Reset linkage of color cube with this palette.
Definition at line 357 of file GiPalette.h.
|
protected |
|
inline |
Reset linkage of gray ramp with this palette.
Definition at line 379 of file GiPalette.h.
|
protected |
|
inline |
Sets palette color.
nColor | [in] Color index. |
color | [in] Input color. |
Definition at line 318 of file GiPalette.h.
|
inline |
Link color cube with this palette.
Definition at line 350 of file GiPalette.h.
|
inlineprotected |
Definition at line 446 of file GiPalette.h.
Sets palette entry activity flag.
nColor | [in] Color index. |
entryHelper | [in] New palette entry helper value. |
Definition at line 327 of file GiPalette.h.
|
inline |
Link gray ramp with this palette.
Definition at line 372 of file GiPalette.h.
|
protected |
Definition at line 266 of file GiPalette.h.
|
protected |
Definition at line 265 of file GiPalette.h.
|
protected |
Definition at line 267 of file GiPalette.h.
|
protected |
Definition at line 268 of file GiPalette.h.