CFx SDK Documentation
2023 SP0
|
#include <CmColor.h>
Static Public Attributes | |
static TOOLKIT_EXPORT_STATIC const OdUInt16 | MaxColorIndex |
<group OdCm_Classes>
This class implements Color object that represents the unnamed and named colors specified by the byLayer, byBlock, byColor, byACI, byPen, Foreground, byDgnIndex, or None color methods.
The OdCmEntityColor class, the OdCmColorBase class
OdCmColor::OdCmColor | ( | ) |
OdCmColor::OdCmColor | ( | const OdCmColor & | color | ) |
OdCmColor::OdCmColor | ( | const OdCmColorBase & | color | ) |
OdCmColor::OdCmColor | ( | OdCmEntityColor::ColorMethod | color | ) |
OdCmColor::~OdCmColor | ( | ) |
void OdCmColor::audit | ( | OdDbAuditInfo * | pAuditInfo | ) |
Perform an audit operation on this object.
pAuditInfo | [in] Pointer to an AuditInfo object. |
|
virtual |
Returns the blue color component of the database color object as a value in range 0 to 255.
Implements OdCmColorBase.
|
virtual |
Returns the Book name of the database color object.
Implements OdCmColorBase.
|
virtual |
Returns the packed 32-bits integer value that stores the color method and color components of the database color object.
<link cm_color_integer.html, Color Functionality as an Integer-value>
Implements OdCmColorBase.
|
virtual |
Returns the color index (ACI) of the database color object.
Value Description kACIbyBlock 0 Sets the color method to byBlock. kACIRed 1 Red. kACIYellow 2 Yellow. kACIGreen 3 Green. kACICyan 4 Cyan. kACIBlue 5 Blue. kACIMagenta 6 Magenta. kACIforeground 7 Sets the color method to Foreground. .. 8-255 Defined by display device. kACIbyLayer 256 Sets the color method to byLayer. kACInone 257 Sets the color method to None.
<link cm_color_index.html, Color Functionality as an ACI-value>
Implements OdCmColorBase.
|
virtual |
Returns the color method of the database color object as a value of the ColorMethod enumeration.
Value Description kByLayer 0xC0 Color is specified by the layer object to which the object is resided. kByBlock 0xC1 Color is specified by the block object in which the object is contained. kByColor 0xC2 Color is specified by an RGB-value. kByACI 0xC3 Color is specified by an index (ACI) of a some color palette. kByPen 0xC4 Color is specified by an index into a pen color table. kForeground 0xC5 Color is foreground. kByDgnIndex 0xC7 Color is specified by an index into a dgn color table. kNone 0xC8 color is absent (object is clarity).
Implements OdCmColorBase.
|
virtual |
Returns the Color name of the database color object.
Implements OdCmColorBase.
|
virtual |
Returns the display color name of the database color object.
Implements OdCmColorBase.
void OdCmColor::dwgIn | ( | OdDbDwgFiler * | pFiler | ) |
Reads the .dwg file format data of this object from the specified file.
pFiler | [in] Pointer to the filer from which the data are to be read. |
void OdCmColor::dwgInAsTrueColor | ( | OdDbDwgFiler * | pFiler | ) |
DOM
void OdCmColor::dwgOut | ( | OdDbDwgFiler * | pFiler | ) | const |
Writes the .dwg file format data of this object to the specified filer.
pFiler | [in] Pointer to the filer to which the data are to be written. |
void OdCmColor::dwgOutAsTrueColor | ( | OdDbDwgFiler * | pFiler | ) | const |
DOM
void OdCmColor::dxfIn | ( | OdDbDxfFiler * | pFiler, |
int | groupCodeOffset = 0 |
||
) |
Reads the DXF format data of this object from the specified filer.
pFiler | [in] Pointer to the filer from which the data are to be read. |
groupCodeOffset | [in] Group code offset. |
void OdCmColor::dxfOut | ( | OdDbDxfFiler * | pFiler, |
int | groupCodeOffset = 0 |
||
) | const |
Writes the DXF format data of this object to the specified filer.
pFiler | [in] Pointer to the filer to which the data are to be written. |
groupCodeOffset | [in] Group code offset. |
OdCmEntityColor OdCmColor::entityColor | ( | ) | const |
Returns the OdCmEntityColor settings of the database color object.
OdString OdCmColor::getDescription | ( | ) | const |
Returns the description string of the database color object.
OdString OdCmColor::getDictionaryKey | ( | ) | const |
Returns a dictionary key based on the color name and book name of the database color object.
OdString OdCmColor::getExplanation | ( | ) | const |
Returns the explanation string of the database color object.
|
virtual |
Returns the green color component of the database color object as a value in range 0 to 255.
Implements OdCmColorBase.
|
virtual |
Checks whether the color method is byACI for the database color object and returns true if and only if the color method is set to kByACI, otherwise it returns false.
Implements OdCmColorBase.
|
virtual |
Checks whether the color method is byBlock for the database color object and returns true if and only if the color method is set to kByBlock or was set to kACIbyBlock, otherwise it returns false.
Implements OdCmColorBase.
|
virtual |
Checks whether the color method is byColor for the database color object and returns true if and only if the color method is set to kByColor, otherwise it returns false.
Implements OdCmColorBase.
|
virtual |
Checks whether the color method is byDgnIndex for the database color object and returns true if and only if the color method is set to kByDgnIndex, otherwise it returns false.
Implements OdCmColorBase.
|
virtual |
Checks whether the color method is byLayer for the database color object and returns true if and only if the color method is set to kByLayer or was set to kACIbyLayer, otherwise it returns false.
Implements OdCmColorBase.
|
virtual |
Checks whether the color method is Foreground for the database color object and returns true if and only if the color method is set to kForeground or was set to kACIforeground, otherwise it returns false.
Implements OdCmColorBase.
bool OdCmColor::isNone | ( | ) | const |
Checks whether the color method is None (invisible) for the database color object and returns true if and only if the color method is set to kNone or was set to kACInone, otherwise it returns false.
bool OdCmColor::operator!= | ( | const OdCmColor & | color | ) | const |
Compares two database color objects using their integer values together with their color names and returns true when their values are not equal, or false when their values are equal.
bool OdCmColor::operator!= | ( | const OdCmColorBase & | color | ) | const |
OdCmColor& OdCmColor::operator= | ( | const OdCmColorBase & | color | ) |
bool OdCmColor::operator== | ( | const OdCmColor & | color | ) | const |
Compares two database color objects using their integer values together with their color names and returns true when their values are equal, or false when their values are not equal.
bool OdCmColor::operator== | ( | const OdCmColorBase & | color | ) | const |
|
virtual |
Returns the red color component of the database color object as a value in range 0 to 255.
Implements OdCmColorBase.
Sets the blue color component for the database color object.
blue | [in] Blue component as an integer value in range 0 to 255. |
Implements OdCmColorBase.
Sets the color method and color components for the database color object as an integer value.
color | [in] A packed 32-bits integer value that specifies the color method and color components. |
<link cm_color_integer.html, Color Functionality as an Integer-value>
Implements OdCmColorBase.
Sets the color index (ACI) of a some color palette and sets the color method to byACI for the database color object.
colorIndex | [in] An integer value that is the index of the color in a some palette. |
Value Description kACIbyBlock 0 Sets the color method to byBlock. kACIRed 1 Red. kACIYellow 2 Yellow. kACIGreen 3 Green. kACICyan 4 Cyan. kACIBlue 5 Blue. kACIMagenta 6 Magenta. kACIforeground 7 Sets the color method to Foreground. .. 8-255 Defined by display device. kACIbyLayer 256 Sets the color method to byLayer. kACInone 257 Sets the color method to None.
<link cm_color_index.html, Color Functionality as an ACI-value>
Implements OdCmColorBase.
|
virtual |
Sets the color method the database color object using a value of the ColorMethod enumeration.
colorMethod | [in] color method as the ColorMethod enumeration. |
Value Description kByLayer 0xC0 Color is specified by the layer object to which the object is resided. kByBlock 0xC1 Color is specified by the block object in which the object is contained. kByColor 0xC2 Color is specified by an RGB-value. kByACI 0xC3 Color is specified by an index (ACI) of a some color palette. kByPen 0xC4 Color is specified by an index into a pen color table. kForeground 0xC5 Color is foreground. kByDgnIndex 0xC7 Color is specified by an index into a dgn color table. kNone 0xC8 color is absent (object is clarity).
Implements OdCmColorBase.
Sets the green color component for the database color object.
green | [in] Green component as an integer value in range 0 to 255. |
Implements OdCmColorBase.
|
virtual |
Converts to the named color and sets the color name and book name for the database color object.
colorName | [in] Color name as a string value. |
bookName | [in] Book name as a string value. |
<link cm_color_integer.html, Color Functionality as an Integer-value>
Implements OdCmColorBase.
bool OdCmColor::setNamesFromDictionaryKey | ( | const OdString & | dictionaryKey | ) |
Sets the book name and color name for the dictionary keyword.
dictionaryKey | [in] Dictionary keyword. |
Sets the red color component for the database color object.
red | [in] Red component as an integer value in range 0 to 255. |
Implements OdCmColorBase.
Sets the red, green, blue color components and the color method to byColor for the database color object.
red | [in] Red component as an integer value in range 0 to 255. |
green | [in] Green component as an integer value in range 0 to 255. |
blue | [in] Blue component as an integer value in range 0 to 255. |
<link cm_color_RGB.html, Color Functionality as an RGB-value>
Implements OdCmColorBase.
|
static |