CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ArgbColor Class Reference

#include <DbArgbColor.h>

Public Member Functions

 ArgbColor ()
 
 ArgbColor (ColorModelHSL color)
 
 ArgbColor (ODCOLORREF color)
 
void setColor (const ColorModelHSL &color)
 
ColorModelHSL color () const
 
ArgbColor gradientRgb (const ArgbColor &endColor, const double ratio) const
 
ArgbColor gradientRgb (const ColorModelHSL &endColor, const double ratio) const
 
void fromCOLORREF (ODCOLORREF)
 
ODCOLORREF toCOLORREF () const
 

Static Public Member Functions

static ArgbColor COLORREFToArgb (ODCOLORREF color)
 

Detailed Description

This class represents the color for point cloud entities.

Corresponding C++ library: AcDbPointCloudObj

<group OdDbPointCloud_Classes>

Definition at line 78 of file DbArgbColor.h.

Constructor & Destructor Documentation

◆ ArgbColor() [1/3]

ArgbColor::ArgbColor ( )

Default constructor.

◆ ArgbColor() [2/3]

ArgbColor::ArgbColor ( ColorModelHSL  color)

Constructor. Creates an ArgbColor object from an HSL color.

Parameters
color[in] Color to be set to a new object.

◆ ArgbColor() [3/3]

ArgbColor::ArgbColor ( ODCOLORREF  color)

Constructor. Creates an ArgbColor object from color reference passed in.

Parameters
color[in] Color reference.

Member Function Documentation

◆ color()

ColorModelHSL ArgbColor::color ( ) const

Returns the current HSL color set to this ArgbColor object.

◆ COLORREFToArgb()

static ArgbColor ArgbColor::COLORREFToArgb ( ODCOLORREF  color)
static

Casts color from COLORREF to ArgbColor using a special constructor.

Parameters
color[in] Input color as ODCOLORREF.
Returns
Same color as ArgbColor.

◆ fromCOLORREF()

void ArgbColor::fromCOLORREF ( ODCOLORREF  )

Converts ODCOLORREF to HSL color.

Parameters
color[in] Color as ODCOLORREF.
Remarks
The conversion is complete by retrieving RGB values from ODCOLORREF and then they are transformed into HSL using special formulas.

◆ gradientRgb() [1/2]

ArgbColor ArgbColor::gradientRgb ( const ArgbColor endColor,
const double  ratio 
) const

Creates a gradient from current color to endColor at a given rate.

Parameters
endColor[in] Color to which a gradient will fade.
ratio[in] Parameter which defines how quickly a gradient fades.

◆ gradientRgb() [2/2]

ArgbColor ArgbColor::gradientRgb ( const ColorModelHSL endColor,
const double  ratio 
) const

Creates a gradient from current color to endColor at a given rate.

Parameters
endColor[in] HSL color to which a gradient will fade.
ratio[in] Parameter which defines how quickly a gradient fades.

◆ setColor()

void ArgbColor::setColor ( const ColorModelHSL color)

Sets a color to this ArgbColor object.

Parameters
color[in] New HSL color to be set.

◆ toCOLORREF()

ODCOLORREF ArgbColor::toCOLORREF ( ) const

Converts HSL color to ODCOLORREF.

Remarks
The conversion is complete by using special formulas that convert HSL to RGB, and ODCOLORREF is assembled from RGB.

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