MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Structure encapsulating RGBA values. More...
#include <mdsRGBA.h>
Public Types | |
typedef mds::sys::tUInt8 | tComponent |
Single RGBA component type. | |
typedef mds::sys::tUInt32 | tRGBA |
RGBA represented as unsigned long. | |
Public Member Functions | |
const tComponent & | a () const |
Returns reference to the alpha component. | |
tComponent & | a () |
const tComponent & | b () const |
Returns reference to the blue component. | |
tComponent & | b () |
CRGBA () | |
Default constructor. | |
CRGBA (tComponent Red, tComponent Green, tComponent Blue, tComponent Alpha=255) | |
Constructor. | |
CRGBA (tRGBA Value) | |
Constructor. | |
CRGBA (const CRGBA &v) | |
Copy constructor. | |
const tComponent & | g () const |
Returns reference to the green component. | |
tComponent & | g () |
const tComponent & | getAlpha () const |
Returns reference to the alpha component. | |
tComponent & | getAlpha () |
const tComponent & | getBlue () const |
Returns reference to the blue component. | |
tComponent & | getBlue () |
const tComponent & | getGreen () const |
Returns reference to the green component. | |
tComponent & | getGreen () |
const tComponent & | getRed () const |
Returns reference to the red component. | |
tComponent & | getRed () |
const tRGBA & | getRGBA () const |
Returns reference to the all RGBA components. | |
tRGBA & | getRGBA () |
CRGBA & | operator= (CRGBA v) |
Assignment operators. | |
CRGBA & | operator= (tRGBA v) |
const tComponent & | r () const |
Returns reference to the red component. | |
tComponent & | r () |
const tRGBA & | rgba () const |
Returns reference to the all RGBA components. | |
tRGBA & | rgba () |
CRGBA & | set (tComponent Red, tComponent Green, tComponent Blue, tComponent Alpha=255) |
Changes component values. | |
CRGBA & | setAlpha (tComponent Alpha) |
CRGBA & | setBlue (tComponent Blue) |
CRGBA & | setGreen (tComponent Green) |
CRGBA & | setRed (tComponent Red) |
Changes component value. | |
Protected Attributes | |
union { | |
tComponent m_Components [4] | |
Separated RGBA components. | |
tRGBA m_rgba | |
RGBa represented as a one unsigned long value. | |
}; | |
RGBA components. | |
Friends | |
bool | operator!= (const CRGBA &l, const CRGBA &r) |
bool | operator== (const CRGBA &l, const CRGBA &r) |
Comparison operator. |
Structure encapsulating RGBA values.
typedef mds::sys::tUInt8 mds::img::CRGBA::tComponent |
Single RGBA component type.
typedef mds::sys::tUInt32 mds::img::CRGBA::tRGBA |
RGBA represented as unsigned long.
Default constructor.
mds::img::CRGBA::CRGBA | ( | tComponent | Red, |
tComponent | Green, | ||
tComponent | Blue, | ||
tComponent | Alpha = 255 |
||
) |
Constructor.
mds::img::CRGBA::CRGBA | ( | tRGBA | Value | ) |
Constructor.
mds::img::CRGBA::CRGBA | ( | const CRGBA & | v | ) |
Copy constructor.
const tComponent& mds::img::CRGBA::a | ( | ) | const |
Returns reference to the alpha component.
const tComponent& mds::img::CRGBA::b | ( | ) | const |
Returns reference to the blue component.
const tComponent& mds::img::CRGBA::g | ( | ) | const |
Returns reference to the green component.
const tComponent& mds::img::CRGBA::getAlpha | ( | ) | const |
Returns reference to the alpha component.
const tComponent& mds::img::CRGBA::getBlue | ( | ) | const |
Returns reference to the blue component.
const tComponent& mds::img::CRGBA::getGreen | ( | ) | const |
Returns reference to the green component.
const tComponent& mds::img::CRGBA::getRed | ( | ) | const |
Returns reference to the red component.
const tRGBA& mds::img::CRGBA::getRGBA | ( | ) | const |
Returns reference to the all RGBA components.
Reimplemented in mds::img::CRGBPixel, and mds::img::CColor.
const tComponent& mds::img::CRGBA::r | ( | ) | const |
Returns reference to the red component.
const tRGBA& mds::img::CRGBA::rgba | ( | ) | const |
Returns reference to the all RGBA components.
CRGBA& mds::img::CRGBA::set | ( | tComponent | Red, |
tComponent | Green, | ||
tComponent | Blue, | ||
tComponent | Alpha = 255 |
||
) |
Changes component values.
CRGBA& mds::img::CRGBA::setAlpha | ( | tComponent | Alpha | ) |
CRGBA& mds::img::CRGBA::setBlue | ( | tComponent | Blue | ) |
CRGBA& mds::img::CRGBA::setGreen | ( | tComponent | Green | ) |
CRGBA& mds::img::CRGBA::setRed | ( | tComponent | Red | ) |
Changes component value.
union { ... } [protected] |
RGBA components.
Separated RGBA components.
RGBa represented as a one unsigned long value.