#include <pixel.h>
Inheritance diagram for Plot::RGBPixel< Component >:
Definition at line 72 of file pixel.h.
Public Methods | |
self | operator+= (const self &B) |
Unary addition. | |
self & | operator *= (const Bounded::LargeFloat m) |
Multiplicative scaling. | |
Constructors and destructors | |
RGBPixel () | |
Default constructor; pixel remains transparent. | |
RGBPixel (FComponent value) | |
Constructor taking a single greyscale value (required by some matrix types). | |
RGBPixel (FComponent red, FComponent green, FComponent blue, bool visible=true) | |
Constructor taking floating-point RGB triple. | |
RGBPixel (const self &other) | |
Copy constructor. | |
template<class OComponent, class OHComponent> | RGBPixel (const HSVPixel< OComponent, OHComponent > &O) |
Constructor for an RGBPixel from an HSVPixel. | |
Access functions for the components of the pixel | |
Bounded::Magnitude | red () const |
Returns the red component on a scale [0.0,1.0]. | |
Bounded::Magnitude | green () const |
Returns the green component on a scale [0.0,1.0]. | |
Bounded::Magnitude | blue () const |
Returns the blue component on a scale [0.0,1.0]. | |
Functions written in terms of the public access functions | |
std::ostream & | put (std::ostream &s) const |
Writes a readable representation to a stream. | |
self | operator+ (const self &o) |
Binary addition of RGBPixel values. | |
template<class OutputType> void | write_binary (std::ostream &s, OutputType max_val) const |
Writes raw data to a binary file. |
|
Constructor taking a single greyscale value (required by some matrix types). The pixel remains transparent, although it's unclear (no pun intended) if that's appropriate. |
|
Constructor for an RGBPixel from an HSVPixel. Algorithm is from _Computer_Graphics_, 2nd Ed., Foley et al, 1990, except Hue modified to lie in [0,1] instead of [0,360]. |
|
Writes raw data to a binary file. You must ensure that the max_val is of the type you want the output to use. Definition at line 137 of file pixel.h. References Plot::RGBPixel< Component >::blue(), Plot::RGBPixel< Component >::green(), and Plot::RGBPixel< Component >::red(). |