LibreOffice Module basegfx (master) 1
Public Member Functions | Static Public Member Functions | List of all members
basegfx::BColor Class Reference

Base Color class with three double values. More...

#include <bcolor.hxx>

Inheritance diagram for basegfx::BColor:
[legend]
Collaboration diagram for basegfx::BColor:
[legend]

Public Member Functions

 BColor ()
 Create a Color with red, green and blue components from [0.0 to 1.0]. More...
 
 BColor (double fRed, double fGreen, double fBlue)
 Create a 3D Color. More...
 
 BColor (double fLuminosity)
 Create a 3D Color. More...
 
 BColor (const ::basegfx::B3DTuple &rTuple)
 constructor with tuple to allow copy-constructing from B3DTuple-based classes More...
 
double getRed () const
 
double getGreen () const
 
double getBlue () const
 
void setRed (double fNew)
 
void setGreen (double fNew)
 
void setBlue (double fNew)
 
BColoroperator*= (const BColor &rPnt)
 *=operator to allow usage from BColor, too More...
 
BColoroperator*= (double t)
 *=operator to allow usage from BColor, too More...
 
BColoroperator= (const ::basegfx::B3DTuple &rVec)
 assignment operator to allow assigning the results of B3DTuple calculations More...
 
double luminance () const
 
double getDistanceRed (const BColor &rColor) const
 
double getDistanceGreen (const BColor &rColor) const
 
double getDistanceBlue (const BColor &rColor) const
 
double getDistance (const BColor &rColor) const
 
double getMaximumDistance (const BColor &rColor) const
 
BColorclamp ()
 
void invert ()
 
- Public Member Functions inherited from basegfx::B3DTuple
 B3DTuple ()
 Create a 3D Tuple. More...
 
 B3DTuple (double fX, double fY, double fZ)
 Create a 3D Tuple. More...
 
const double & operator[] (int nPos) const
 Array-access to 3D Tuple. More...
 
double & operator[] (int nPos)
 Array-access to 3D Tuple. More...
 
bool equalZero () const
 
bool equal (const B3DTuple &rTup) const
 
B3DTuple operator- (void) const
 
bool operator== (const B3DTuple &rTup) const
 
bool operator!= (const B3DTuple &rTup) const
 
void correctValues (const double fCompareValue=0.0)
 
- Public Member Functions inherited from basegfx::Tuple3D< double >
 Tuple3D (double x, double y, double z)
 Create a 3D Tuple. More...
 
double getX () const
 Get X-Coordinate of 3D Tuple. More...
 
double getY () const
 Get Y-Coordinate of 3D Tuple. More...
 
double getZ () const
 Get Z-Coordinate of 3D Tuple. More...
 
void setX (double fX)
 Set X-Coordinate of 3D Tuple. More...
 
void setY (double fY)
 Set Y-Coordinate of 3D Tuple. More...
 
void setZ (double fZ)
 Set Z-Coordinate of 3D Tuple. More...
 
Tuple3Doperator+= (const Tuple3D &rTup)
 
Tuple3Doperator-= (const Tuple3D &rTup)
 
Tuple3Doperator/= (const Tuple3D &rTup)
 
Tuple3Doperator/= (double t)
 
Tuple3Doperator*= (const Tuple3D &rTup)
 
Tuple3Doperator*= (double t)
 
bool operator== (const Tuple3D &rTup) const
 
bool operator!= (const Tuple3D &rTup) const
 

Static Public Member Functions

static const BColorgetEmptyBColor ()
 
- Static Public Member Functions inherited from basegfx::B3DTuple
static const B3DTuplegetEmptyTuple ()
 

Additional Inherited Members

- Public Attributes inherited from basegfx::Tuple3D< double >
double mnX
 
double mnY
 
double mnZ
 
double mfX
 
double mfY
 
double mfZ
 
- Protected Attributes inherited from basegfx::Tuple3D< double >
union {
   struct {
      TYPE   mnX
 
      TYPE   mnY
 
      TYPE   mnZ
 
   } 
 
   struct {
      TYPE   mfX
 
      TYPE   mfY
 
      TYPE   mfZ
 
   } 
 
}; 
 

Detailed Description

Base Color class with three double values.

This class derives all operators and common handling for a 3D data class from B3DTuple. All necessary extensions which are special for colors will be added here.

See also
B3DTuple

Definition at line 40 of file bcolor.hxx.

Constructor & Destructor Documentation

◆ BColor() [1/4]

basegfx::BColor::BColor ( )
inline

Create a Color with red, green and blue components from [0.0 to 1.0].

The color is initialized to (0.0, 0.0, 0.0)

Definition at line 47 of file bcolor.hxx.

◆ BColor() [2/4]

basegfx::BColor::BColor ( double  fRed,
double  fGreen,
double  fBlue 
)
inline

Create a 3D Color.

Parameters
fRed
fGreen
fBlueThese parameters are used to initialize the red, green and blue intensities of the color

Definition at line 57 of file bcolor.hxx.

◆ BColor() [3/4]

basegfx::BColor::BColor ( double  fLuminosity)
inlineexplicit

Create a 3D Color.

Parameters
fLuminosityThe parameter is used to initialize the red, green and blue intensities of the color

Definition at line 66 of file bcolor.hxx.

◆ BColor() [4/4]

basegfx::BColor::BColor ( const ::basegfx::B3DTuple rTuple)
inline

constructor with tuple to allow copy-constructing from B3DTuple-based classes

Definition at line 73 of file bcolor.hxx.

Member Function Documentation

◆ clamp()

BColor & basegfx::BColor::clamp ( )
inline

Definition at line 153 of file bcolor.hxx.

References mfX, and mfY.

◆ getBlue()

double basegfx::BColor::getBlue ( ) const
inline

◆ getDistance()

double basegfx::BColor::getDistance ( const BColor rColor) const
inline

Definition at line 133 of file bcolor.hxx.

◆ getDistanceBlue()

double basegfx::BColor::getDistanceBlue ( const BColor rColor) const
inline

Definition at line 131 of file bcolor.hxx.

References getBlue(), and getBlue().

◆ getDistanceGreen()

double basegfx::BColor::getDistanceGreen ( const BColor rColor) const
inline

Definition at line 130 of file bcolor.hxx.

References getGreen(), and getGreen().

◆ getDistanceRed()

double basegfx::BColor::getDistanceRed ( const BColor rColor) const
inline

Definition at line 129 of file bcolor.hxx.

References getRed(), and getRed().

◆ getEmptyBColor()

static const BColor & basegfx::BColor::getEmptyBColor ( )
inlinestatic

Definition at line 168 of file bcolor.hxx.

References basegfx::B3DTuple::getEmptyTuple().

Referenced by ImplB3DPolygon::insert().

◆ getGreen()

double basegfx::BColor::getGreen ( ) const
inline

◆ getMaximumDistance()

double basegfx::BColor::getMaximumDistance ( const BColor rColor) const
inline

Definition at line 142 of file bcolor.hxx.

◆ getRed()

double basegfx::BColor::getRed ( ) const
inline

◆ invert()

void basegfx::BColor::invert ( )
inline

Definition at line 161 of file bcolor.hxx.

References mfX, and mfY.

◆ luminance()

double basegfx::BColor::luminance ( ) const
inline

Definition at line 119 of file bcolor.hxx.

References mfX, and mfY.

◆ operator*=() [1/2]

BColor & basegfx::BColor::operator*= ( const BColor rPnt)
inline

*=operator to allow usage from BColor, too

Definition at line 89 of file bcolor.hxx.

References mfX, basegfx::Tuple3D< TYPE >::mfX, mfY, basegfx::Tuple3D< TYPE >::mfY, and basegfx::Tuple3D< TYPE >::mfZ.

◆ operator*=() [2/2]

BColor & basegfx::BColor::operator*= ( double  t)
inline

*=operator to allow usage from BColor, too

Definition at line 99 of file bcolor.hxx.

References mfX, mfY, and t.

◆ operator=()

BColor & basegfx::BColor::operator= ( const ::basegfx::B3DTuple rVec)
inline

assignment operator to allow assigning the results of B3DTuple calculations

Definition at line 110 of file bcolor.hxx.

References mfX, and mfY.

◆ setBlue()

void basegfx::BColor::setBlue ( double  fNew)
inline

Definition at line 85 of file bcolor.hxx.

◆ setGreen()

void basegfx::BColor::setGreen ( double  fNew)
inline

Definition at line 84 of file bcolor.hxx.

References mfY.

◆ setRed()

void basegfx::BColor::setRed ( double  fNew)
inline

Definition at line 83 of file bcolor.hxx.

References mfX.


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