MIRA
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
RGBA Class Referenceabstract

Color in RGBA color space. More...

#include <image/Color.h>

Inheritance diagram for RGBA:
Inheritance graph
[legend]

Public Member Functions

 RGBA (float ir, float ig, float ib, float ia)
 Constructs RGBA color R,G,B and A: range from 0.0 to 1.0. More...
 
 RGBA ()
 Default constructor that creates a black color. More...
 
 RGBA (const RGBA &other)
 copy constructor More...
 
 RGBA (const RGB &other, float ia=1.0f)
 Constructs RGBA color from RGB color and alpha value (that is 1.0f per default). More...
 
template<typename Reflector >
void reflect (Reflector &r)
 
virtual operator cv::Scalar () const
 converts color to cv::Scalar Converts color to cv::Scalar by first converting to RGB and then creating a 4 channel cv::Scalar(B,G,R,255); More...
 
virtual Color::RGB toRGB () const
 no conversion is done here, because it is already RGB More...
 
bool isInRange () const
 Returns true, if all rgb components are within valid ranges, i.e. More...
 
Class const & getClass () const
 call the virtual internalGetClass(). More...
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Public Attributes

float a
 
float r
 
float g
 
float b
 

Protected Member Functions

virtual Class const & internalGetClass () const =0
 

Detailed Description

Color in RGBA color space.

Constructor & Destructor Documentation

◆ RGBA() [1/4]

RGBA ( float  ir,
float  ig,
float  ib,
float  ia 
)
inline

Constructs RGBA color R,G,B and A: range from 0.0 to 1.0.

◆ RGBA() [2/4]

RGBA ( )
inline

Default constructor that creates a black color.

◆ RGBA() [3/4]

RGBA ( const RGBA other)
inline

copy constructor

◆ RGBA() [4/4]

RGBA ( const RGB other,
float  ia = 1.0f 
)
inline

Constructs RGBA color from RGB color and alpha value (that is 1.0f per default).

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ operator cv::Scalar()

virtual operator cv::Scalar ( ) const
inlinevirtual

converts color to cv::Scalar Converts color to cv::Scalar by first converting to RGB and then creating a 4 channel cv::Scalar(B,G,R,255);

cast operator to cv::Scalar converts color to OpenCV BGRA format by scaling range to 0..255 and setting alpha channel to 255

Reimplemented from ColorBase.

◆ toRGB()

virtual Color::RGB toRGB ( ) const
inlinevirtualinherited

no conversion is done here, because it is already RGB

Implements ColorBase.

◆ isInRange()

bool isInRange ( ) const
inlineinherited

Returns true, if all rgb components are within valid ranges, i.e.

between 0.0 and 1.0.

◆ getClass()

Class const& getClass ( ) const
inlineinherited

call the virtual internalGetClass().

◆ CLASS()

static PseudoClass const& CLASS ( )
inlinestaticinherited

◆ internalGetClass()

virtual Class const& internalGetClass ( ) const
protectedpure virtualinherited

Member Data Documentation

◆ a

float a

◆ r

float r
inherited

◆ g

float g
inherited

◆ b

float b
inherited

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