CFx SDK Documentation  2022 SP0
Public Types | Public Member Functions | List of all members
OdCmTransparency Class Reference

#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 ()
 
OdCmTransparencyoperator= (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
 

Detailed Description

<group OdCm_Classes>

This class implements the Transparency object, which provides the transparency information about OdGiDrawable objects.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_overview.html, Overview of Classes that Implement Color and Transparency>

<link cm_transparency_method.html, Methods of the Transparency Definition>

Definition at line 1616 of file CmColorBase.h.

Member Enumeration Documentation

◆ transparencyMethod

Enumerator
kByLayer 
kByBlock 
kByAlpha 
kErrorValue 

Definition at line 1621 of file CmColorBase.h.

Constructor & Destructor Documentation

◆ OdCmTransparency() [1/5]

OdCmTransparency::OdCmTransparency ( )
inline
Remarks
The default transparency method is kByLayer.

Definition at line 1632 of file CmColorBase.h.

◆ OdCmTransparency() [2/5]

OdCmTransparency::OdCmTransparency ( transparencyMethod  method)
inline

Definition at line 1633 of file CmColorBase.h.

◆ OdCmTransparency() [3/5]

OdCmTransparency::OdCmTransparency ( OdUInt8  alpha)
inline

Definition at line 1634 of file CmColorBase.h.

◆ OdCmTransparency() [4/5]

OdCmTransparency::OdCmTransparency ( double  alphaPercent)
inline

Definition at line 1635 of file CmColorBase.h.

◆ OdCmTransparency() [5/5]

OdCmTransparency::OdCmTransparency ( const OdCmTransparency transparency)
inline

Definition at line 1636 of file CmColorBase.h.

◆ ~OdCmTransparency()

OdCmTransparency::~OdCmTransparency ( )
inline

Definition at line 1638 of file CmColorBase.h.

Member Function Documentation

◆ alpha()

OdUInt8 OdCmTransparency::alpha ( ) const
inline

Returns the alpha value in range 0 to 255 of the transparency object.

Remarks
An alpha value defines the degree of transparency. Alpha == 0 means totally clarity. Alpha == 255 means totally opaque.
See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_alpha.html, Transparency Functionality as an Alpha-value>

Definition at line 1703 of file CmColorBase.h.

◆ alphaPercent()

double OdCmTransparency::alphaPercent ( ) const
inline

Returns the alpha value in range 0.0 to 1.0 of the transparency object.

Remarks
An alpha value defines the degree of transparency. Alpha == 0.0 means totally clarity. Alpha == 1.0 means totally opaque.
See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_alpha.html, Transparency Functionality as an Alpha-value>

Definition at line 1749 of file CmColorBase.h.

◆ dwgIn()

void OdCmTransparency::dwgIn ( OdDbDwgFiler pFiler)

Reads the .dwg file format data of this object from the specified file.

Parameters
pFiler[in] Pointer to the filer from which the data are to be read.

◆ dwgOut()

void OdCmTransparency::dwgOut ( OdDbDwgFiler pFiler) const

Writes the .dwg file format data of this object to the specified filer.

Parameters
pFiler[in] Pointer to the filer to which the data are to be written.

◆ isByAlpha()

bool OdCmTransparency::isByAlpha ( ) const
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.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_method.html, Methods of the Transparency Definition>

Definition at line 1816 of file CmColorBase.h.

◆ isByBlock()

bool OdCmTransparency::isByBlock ( ) const
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.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_method.html, Methods of the Transparency Definition>

Definition at line 1828 of file CmColorBase.h.

◆ isByLayer()

bool OdCmTransparency::isByLayer ( ) const
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.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_method.html, Methods of the Transparency Definition>

Definition at line 1840 of file CmColorBase.h.

◆ isClear()

bool OdCmTransparency::isClear ( ) const
inline

Checks whether the transparency method is byAlpha and object is totally clarity for the transparency object. It returns true if and only if the transparency method is set to kByAlpha and Alpha == 0, otherwise it returns false.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_method.html, Methods of the Transparency Definition>

<link cm_transparency_alpha.html, Transparency Functionality as an Alpha-value>

Definition at line 1867 of file CmColorBase.h.

◆ isInvalid()

bool OdCmTransparency::isInvalid ( ) const
inline

Checks whether the transparency method is error value for the transparency object and returns true if and only if the transparency method is set to kErrorValuer, otherwise it returns false.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_method.html, Methods of the Transparency Definition>

Definition at line 1852 of file CmColorBase.h.

◆ isSolid()

bool OdCmTransparency::isSolid ( ) const
inline

Checks whether the transparency method is byAlpha and object is totally opaque for the transparency object. It returns true if and only if the transparency method is set to kByAlpha and Alpha == 255, otherwise it returns false.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_method.html, Methods of the Transparency Definition>

<link cm_transparency_alpha.html, Transparency Functionality as an Alpha-value>

Definition at line 1882 of file CmColorBase.h.

◆ method()

transparencyMethod OdCmTransparency::method ( ) const
inline

Returns the transparency method of the transparency object as a value of the transparencyMethod enumeration.

Remarks
The transparency method can be a one of the following:

Value Description kByLayer 0 Transparency is specified by the layer object to which the object is resided. kByBlock 1 Transparency is specified by the block object in which the object is contained. kByAlpha 2 Transparency is specified by an Alpha-value.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_method.html, Methods of the Transparency Definition>

Definition at line 1774 of file CmColorBase.h.

◆ ODRX_HEAP_OPERATORS()

OdCmTransparency::ODRX_HEAP_OPERATORS ( )

◆ operator!=()

bool OdCmTransparency::operator!= ( const OdCmTransparency transparency) const
inline

Compares two transparency objects as integer values and returns true when their values are not equal, or false when their values are equal.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_integer.html, Transparency Functionality as an Integer-value>

Definition at line 1666 of file CmColorBase.h.

◆ operator=()

OdCmTransparency& OdCmTransparency::operator= ( const OdCmTransparency transparency)
inline

Definition at line 1640 of file CmColorBase.h.

◆ operator==()

bool OdCmTransparency::operator== ( const OdCmTransparency transparency) const
inline

Compares two transparency objects as integer values and returns true when their values are equal, or false when their values are not equal.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_integer.html, Transparency Functionality as an Integer-value>

Definition at line 1653 of file CmColorBase.h.

◆ serializeIn()

void OdCmTransparency::serializeIn ( OdUInt32  transparency)
inline

Sets the transparency method and transparency components as an integer value for the transparency object.

Parameters
transparency[in] A packed 32-bits integer value that specifies the transparency method and transparency components.
See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_method.html, Methods of the Transparency Definition>

<link cm_transparency_integer.html, Transparency Functionality as an Integer-value>

Definition at line 1911 of file CmColorBase.h.

◆ serializeOut()

OdUInt32 OdCmTransparency::serializeOut ( ) const
inline

Returns the packed 32-bits integer value that stores the transparency method and transparency components.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_method.html, Methods of the Transparency Definition>

<link cm_transparency_integer.html, Transparency Functionality as an Integer-value>

Definition at line 1896 of file CmColorBase.h.

◆ setAlpha()

void OdCmTransparency::setAlpha ( OdUInt8  alpha)
inline

Sets the alpha value and switches the transparency method to kByAlpha for the transparency object.

Parameters
alpha[in] Alpha as an integer value in range 0 to 255.
Remarks
An alpha value defines the degree of transparency. Alpha == 0 means totally clarity. Alpha == 255 means totally opaque.
See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_alpha.html, Transparency Functionality as an Alpha-value>

Definition at line 1684 of file CmColorBase.h.

◆ setAlphaPercent()

void OdCmTransparency::setAlphaPercent ( double  alphaPercent)
inline

Sets the alpha value in percent and switches the transparency method to kByAlpha for the transparency object.

Parameters
alphaPercent[in] Alpha as a double value in range 0.0 (=0) to 1.0 (=255).
Remarks
An alpha value defines the degree of transparency. Alpha == 0.0 means totally clarity. Alpha == 1.0 means totally opaque.
See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_alpha.html, Transparency Functionality as an Alpha-value>

Definition at line 1725 of file CmColorBase.h.

◆ setMethod()

void OdCmTransparency::setMethod ( transparencyMethod  method)
inline

Sets the transparency method for the transparency object.

Parameters
method[in] Transparency method as the transparencyMethod enumeration.
Remarks
The transparency method can be a one of the following:

Value Description kByLayer 0 Transparency is specified by the layer object to which the object is resided. kByBlock 1 Transparency is specified by the block object in which the object is contained. kByAlpha 2 Transparency is specified by an Alpha-value.

See also
<link cm_transparency_sample.html, Example of Working with Transparency>
<link cm_transparency_method.html, Methods of the Transparency Definition>

Definition at line 1800 of file CmColorBase.h.


The documentation for this class was generated from the following file: