#include <ColorScale.h>
Public Methods | |
| Color () | |
| Color (real c) | |
| Color (real rr, double gg, double bb) | |
| Color (const Color &c) | |
| void | operator= (const Color &c) |
| void | setColor (const Color &c) |
| void | setColor (real rr, real gg, real bb) |
| void | setColor (real c) |
| void | print (Os out) |
| void | scan (Is in) |
| bool | isBlack () |
| bool | isGray () |
Public Attributes | |
| real | r |
| real | g |
| real | b |
NAME: Color - Definition of a color
DESCRIPTION:
The "Color" struct contains a (r,g,b) color, and basic functions.
|
|
The default constructor "Color()" creates a color object with default color black (r=g=b=0). In addition, the constructor "Color(float intensity)" creates a color object with specified intensity (r=g=b=intensity), and "Color(float r, float g, float b)" creates a color object with a specified RGB color. Moreover, there is a copy constructor "Color(Color&)". |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
returns true if the color is black (r=g=b=0), otherwise it returns false. |
|
|
returns true if the current color is a gray level (r=g=b), otherwise it returns false. |
|
|
sets color equal to the right-hand side color. |
|
|
|
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
sets a specified color based on the RGB value, or on another "Color" object. A special version accepts a single intensity value as input, resulting in a gray level. |
|
|
|
|
|
|
|
|
|