CFx SDK Documentation 2024 SP0
|
#include <CmColorBase.h>
Public Types | |
enum | transparencyMethod { kByLayer = 0 , kByBlock = 1 , kByAlpha = 2 , kErrorValue = 3 } |
Public Member Functions | |
ODRX_HEAP_OPERATORS () | |
OdCmTransparency () | |
OdCmTransparency (transparencyMethod method) | |
OdCmTransparency (OdUInt8 alpha) | |
OdCmTransparency (double alphaPercent) | |
OdCmTransparency (const OdCmTransparency &transparency) | |
~OdCmTransparency () | |
OdCmTransparency & | operator= (const OdCmTransparency &transparency) |
bool | operator== (const OdCmTransparency &transparency) const |
bool | operator!= (const OdCmTransparency &transparency) const |
void | setAlpha (OdUInt8 alpha) |
OdUInt8 | alpha () const |
void | setAlphaPercent (double alphaPercent) |
double | alphaPercent () const |
transparencyMethod | method () const |
void | setMethod (transparencyMethod method) |
bool | isByAlpha () const |
bool | isByBlock () const |
bool | isByLayer () const |
bool | isInvalid () const |
bool | isClear () const |
bool | isSolid () const |
OdUInt32 | serializeOut () const |
void | serializeIn (OdUInt32 transparency) |
void | dwgIn (OdDbDwgFiler *pFiler) |
void | dwgOut (OdDbDwgFiler *pFiler) const |
<group OdCm_Classes>
This class implements a transparency object, which provides the transparency information about OdGiDrawable objects.
<exref target="https://docs.opendesign.com/td/cm_overview.html">Overview of Classes that Implement Color and Transparency</exref>
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
Definition at line 1658 of file CmColorBase.h.
Represents the transparency method.
Enumerator | |
---|---|
kByLayer | |
kByBlock | |
kByAlpha | |
kErrorValue |
Definition at line 1671 of file CmColorBase.h.
|
inline |
Creates a transparency object with default properties.
Definition at line 1684 of file CmColorBase.h.
|
inline |
Creates a transparency object and sets the specified transparency method for it.
method | [in] Transparency method. |
Definition at line 1694 of file CmColorBase.h.
|
inline |
Creates a transparency object and sets its transparency property using a specified alpha value.
alpha | [in] An alpha value of transparency as an integer value in the range from 0 to 255. |
Definition at line 1709 of file CmColorBase.h.
|
inline |
Creates a transparency object and sets its transparency property using a specified alpha value as a percentage.
alphaPercent | [in] An alpha value of transparency in percent as a double value in the range from 0.0 to 1.0. |
Definition at line 1724 of file CmColorBase.h.
|
inline |
Creates a copy of an existing transparency object.
transparency | [in] The transparency object to be copied. |
Definition at line 1730 of file CmColorBase.h.
|
inline |
Definition at line 1734 of file CmColorBase.h.
|
inline |
Returns the alpha value in the range from 0 to 255 of the transparency object.
<exref target="https://docs.opendesign.com/td/cm_transparency_alpha.html">Transparency Functionality as an Alpha-value</exref>
Definition at line 1804 of file CmColorBase.h.
|
inline |
Returns the alpha value in the range from 0.0 to 1.0 of the transparency object.
<exref target="https://docs.opendesign.com/td/cm_transparency_alpha.html">Transparency Functionality as an Alpha-value</exref>
Definition at line 1849 of file CmColorBase.h.
void OdCmTransparency::dwgIn | ( | OdDbDwgFiler * | pFiler | ) |
Reads from the specified .dwg filer data for this object.
pFiler | [in] Pointer to the filer that the data is to be read from. |
void OdCmTransparency::dwgOut | ( | OdDbDwgFiler * | pFiler | ) | const |
Writes to the specified .dwg filer data of this object.
pFiler | [in] Pointer to the filer that the data is to be written to. |
|
inline |
Checks whether the transparency method is byAlpha for the transparency object and returns true if and only if the transparency method is set to kByAlpha, otherwise it returns false.
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
Definition at line 1913 of file CmColorBase.h.
|
inline |
Checks whether the transparency method is byBlock for the transparency object and returns true if and only if the transparency method is set to kByBlock, otherwise it returns false.
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
Definition at line 1925 of file CmColorBase.h.
|
inline |
Checks whether the transparency method is byLayer for the transparency object and returns true if and only if the transparency method is set to kByLayer, otherwise it returns false.
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
Definition at line 1937 of file CmColorBase.h.
|
inline |
Checks whether the transparency method is byAlpha and the transparency is set to full for this transparency object. It returns true if and only if the transparency method is set to kByAlpha and Alpha = 0, otherwise it returns false.
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
<exref target="https://docs.opendesign.com/td/cm_transparency_alpha.html">Transparency Functionality as an Alpha-value</exref>
Definition at line 1964 of file CmColorBase.h.
|
inline |
Checks whether the transparency method is an error value for the transparency object and returns true if and only if the transparency method is set to kErrorValue, otherwise it returns false.
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
Definition at line 1949 of file CmColorBase.h.
|
inline |
Checks whether the transparency method is byAlpha and the opacity is set to full for this transparency object. It returns true if and only if the transparency method is set to kByAlpha and Alpha = 255, otherwise it returns false.
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
<exref target="https://docs.opendesign.com/td/cm_transparency_alpha.html">Transparency Functionality as an Alpha-value</exref>
Definition at line 1979 of file CmColorBase.h.
|
inline |
Returns the transparency method of the transparency object as a value of the transparencyMethod enumeration.
Name Value Description kByLayer 0 Transparency is specified by the layer object that the object is assigned to. kByBlock 1 Transparency is specified by the block object that the object is contained in. kByAlpha 2 Transparency is specified by an alpha value.
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
Definition at line 1872 of file CmColorBase.h.
OdCmTransparency::ODRX_HEAP_OPERATORS | ( | ) |
|
inline |
Compares two transparency objects as integer values, and returns true when their values are not equal or false when their values are equal.
<exref target="https://docs.opendesign.com/td/cm_transparency_integer.html">Transparency Functionality as an Integer-value</exref>
Definition at line 1769 of file CmColorBase.h.
|
inline |
Copies a transparency object specified on the right of the operator to the transparency object specified on the left.
<exref target="https://docs.opendesign.com/td/cm_transparency_integer.html">Transparency Functionality as an Integer-value</exref>
Definition at line 1745 of file CmColorBase.h.
|
inline |
Compares two transparency objects as integer values, and returns true when their values are equal or false when their values are not equal.
<exref target="https://docs.opendesign.com/td/cm_transparency_integer.html">Transparency Functionality as an Integer-value</exref>
Definition at line 1757 of file CmColorBase.h.
Sets the transparency method and transparency components as an integer value for the transparency object.
transparency | [in] A packed 32-bit integer value that specifies the transparency method and transparency components. |
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
<exref target="https://docs.opendesign.com/td/cm_transparency_integer.html">Transparency Functionality as an Integer-value</exref>
Definition at line 2008 of file CmColorBase.h.
|
inline |
Returns the packed 32-bit integer value that stores the transparency method and transparency components.
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
<exref target="https://docs.opendesign.com/td/cm_transparency_integer.html">Transparency Functionality as an Integer-value</exref>
Definition at line 1992 of file CmColorBase.h.
Sets the alpha value and switches the transparency method to kByAlpha for the transparency object.
alpha | [in] Alpha value as an integer value in the range 0 to 255. |
<exref target="https://docs.opendesign.com/td/cm_transparency_alpha.html">Transparency Functionality as an Alpha-value</exref>
Definition at line 1786 of file CmColorBase.h.
|
inline |
Sets the alpha value as a percentage and switches the transparency method to kByAlpha for the transparency object.
alphaPercent | [in] Alpha as a double value in the range from 0.0 to 1.0. |
<exref target="https://docs.opendesign.com/td/cm_transparency_alpha.html">Transparency Functionality as an Alpha-value</exref>
Definition at line 1826 of file CmColorBase.h.
|
inline |
Sets the transparency method for the transparency object.
method | [in] Transparency method as the transparencyMethod enumeration. |
Name Value Description kByLayer 0 Transparency is specified by the layer object that the object is assigned to. kByBlock 1 Transparency is specified by the block object that the object is contained in. kByAlpha 2 Transparency is specified by an alpha value.
<exref target="https://docs.opendesign.com/td/cm_transparency_method.html">Methods of the Transparency Definition</exref>
Definition at line 1897 of file CmColorBase.h.