Class to represent red-green-blue-alpha colours stored with 8-bit resolution. More...
#include <rgb.h>
Public Member Functions | |
ByteRGBA () | |
Null constructor. NB There are no default values. | |
ByteRGBA (const RGBA< uchar > &c) | |
Copy constructor. | |
ByteRGBA (uchar vr, uchar vg, uchar vb, uchar va) | |
Componentwise initialization. | |
ByteRGBA (const RGBA< float > &c) | |
Construct ByteRGBA from float RGBAs. More... | |
std::ostream & | write (std::ostream &) const |
const std::string | format_comma () const |
![]() | |
RGBA () | |
Null constructor. | |
RGBA (const RGBA &c) | |
Copy constructor. | |
RGBA (ucharvr, ucharvg, ucharvb, ucharva) | |
Initialise from separate components. | |
void | operator+= (const RGBA &v) |
Colour addition. | |
void | operator-= (const RGBA &v) |
Colour subtraction. | |
Additional Inherited Members | |
![]() | |
uchar | r |
Colour component. | |
uchar | g |
uchar | b |
uchar | a |
Class to represent red-green-blue-alpha colours stored with 8-bit resolution.
|
inlineexplicit |
Construct ByteRGBA from float RGBAs.
Components in the range [0.0,1.0] are scaled to [0,255].