#include <Color.hpp>
The color can be defined using a variety of constructors.
Definition at line 44 of file Color.hpp.
Public Member Functions | |
| Color (void) | |
| Color default is black. | |
| Color (int rgbDef) | |
| Color initialized using a single value in three bytes, 0xRRGGBB. | |
| Color (int red, int green, int blue) | |
| Color initialized using 3 integers describing (from 0-255) the red, green, and blue components of the color. | |
| Color (const std::string &colorName) | |
| Color initialized using a single string. | |
| bool | operator== (const Color &rhs) const |
| Operator ==. | |
| bool | operator!= (const Color &rhs) const |
| Operator !=. | |
| void | setToString (const std::string &str) |
| Uses a string to set the value of the color. | |
| int | getRGB (void) const |
| Returns a int that can be manipulated to display the hex equivalent of a color. | |
| void | getRGBTriplet (short &red, short &green, short &blue) const |
| Sets input shorts to their appropriate color value (0-255). | |
| void | getRGBTripletFractional (double &red, double &green, double &blue) const |
| Sets input doubles to their appropriate color value (0-1). | |
| void | setRGBTriplet (short red, short green, short blue) |
| Sets the color to the appropriate color value given by input variables. | |
| void | setRGBTripletFractional (double red, double green, double blue) |
| Sets the color to the appropriate color value given by input variables. | |
| int | dist (const Color &o) const |
| Get the distance between the two Colors. | |
| Color | interpolate (double dist, const Color &o) const |
| Interpolate between two colors. | |
| bool | isClear (void) const |
| Used to determine if this color is clear. | |
Static Public Attributes | |
| const int | RED = 0xFF0000 |
| FF0000 | |
| const int | ORANGE = 0xFFA500 |
| FFA500 | |
| const int | YELLOW = 0xFFFF00 |
| FFFF00 | |
| const int | GREEN = 0x00FF00 |
| 00FF00 | |
| const int | BLUE = 0x0000FF |
| 0000FF | |
| const int | VIOLET = 0xEE82EE |
| EE82EE | |
| const int | WHITE = 0xFFFFFF |
| FFFFFF | |
| const int | BROWN = 0xA5252A |
| A5252A | |
| const int | BLACK = 0x000000 |
| 000000 | |
| const int | GREY = 0xBEBEBE |
| BEBEBE | |
| const int | GRAY = 0xBEBEBE |
| BEBEBE | |
| const int | PINK = 0xFFC0CB |
| FFC0CB | |
| const int | CYAN = 0x00FFFF |
| 00FFFF | |
| const int | OLIVE = 0x6B8E23 |
| 6BBE23 | |
| const int | KHAKI = 0xBDB76B |
| BDB76B | |
| const int | SKY_BLUE = 0x87CEEB |
| 87CEEB | |
| const int | TURQUOISE = 0x40E0D0 |
| 40E0D0 | |
| const int | CHARTREUSE = 0x7FFF00 |
| 7FFF00 | |
| const int | MAGENTA = 0xFF00FF |
| FF00FF | |
| const int | MAROON = 0xB03060 |
| B03060 | |
| const int | BURNT_ORANGE = 0xCD5500 |
| CD5500 | |
| const int | CARDINAL = 0x9C0001 |
| 9C0001 | |
| const int | NAVY = 0x000080 |
| 000080 | |
| const int | FOREST_GREEN = 0x228B22 |
| 228B22 | |
| const int | DARK_PURPLE = 0x800080 |
| 800080 | |
| const int | CLEAR = -1 |
| This constant can be used to declare something as "invisible." Its primary use is for creating a type of line that shall only be displayed as points using a marker. | |
Protected Attributes | |
| int | rgb |
| Color as an RGB value. | |
|
|
Color default is black.
|
|
|
Color initialized using a single value in three bytes, 0xRRGGBB. The first byte is red, the next is green, the last is blue. For example, 0x00FF00 is pure green. |
|
||||||||||||||||
|
Color initialized using 3 integers describing (from 0-255) the red, green, and blue components of the color.
|
|
|
Color initialized using a single string.
|
|
|
Get the distance between the two Colors.
Definition at line 230 of file Color.hpp. References gpstk::abs(), and getRGBTriplet(). |
|
|
Returns a int that can be manipulated to display the hex equivalent of a color.
Definition at line 192 of file Color.hpp. Referenced by PSImageBase::bitmap(), PNG::ctos(), SVGImage::text(), and Marker::uniqueName(). |
|
||||||||||||||||
|
Sets input shorts to their appropriate color value (0-255).
Referenced by dist(). |
|
||||||||||||||||
|
Sets input doubles to their appropriate color value (0-1). Where 1 is equivalent to 255 or the max amount of that color.
Referenced by PSImageBase::line(), and PSImageBase::text(). |
|
||||||||||||
|
Interpolate between two colors.
|
|
|
Used to determine if this color is clear.
Definition at line 247 of file Color.hpp. Referenced by SeriesList::drawInFrame(). |
|
|
Operator !=.
Definition at line 157 of file Color.hpp. References rgb. |
|
|
Operator ==.
Definition at line 154 of file Color.hpp. References rgb. |
|
||||||||||||||||
|
Sets the color to the appropriate color value given by input variables.
|
|
||||||||||||||||
|
Sets the color to the appropriate color value given by input variables.
|
|
|
Uses a string to set the value of the color. Here are the values
|
|
|
This constant can be used to declare something as "invisible." Its primary use is for creating a type of line that shall only be displayed as points using a marker. Thus these points are each separated, not connected by a line. |
|
|
Color as an RGB value.
Definition at line 252 of file Color.hpp. Referenced by operator!=(), and operator==(). |
1.3.9.1