|
OpenLexocad
27.1
|
#include <Color.h>
Public Types | |
| enum | Spec { Invalid, Rgb, Hsv, Cmyk } |
| enum | Origin { Unknown, Cadwork } |
Public Member Functions | |
| Color () | |
| Color (const Base::MColor &c) | |
| Color (int r, int g, int b, int a=255) | |
| Color (const std::string &name) | |
| Color (const char *name) | |
| Color (const Color &rhs) | |
| Color (Spec spec) | |
| ~Color () | |
| bool | isValid () const |
| std::string | name () const |
| void | setNamedColor (const std::string &name) |
| Spec | spec () const |
| void | setOrigin (Origin o) |
| Origin | origin () const |
| int | alpha () const |
| void | setAlpha (int alpha) |
| double | alphaF () const |
| void | setAlphaF (double alpha) |
| int | red () const |
| int | green () const |
| int | blue () const |
| void | setRed (int red) |
| void | setGreen (int green) |
| void | setBlue (int blue) |
| double | redF () const |
| double | greenF () const |
| double | blueF () const |
| void | setRedF (double red) |
| void | setGreenF (double green) |
| void | setBlueF (double blue) |
| void | getRgb (int *r, int *g, int *b, int *a=0) const |
| void | setRgb (int r, int g, int b, int a=255) |
| void | getRgbF (double *r, double *g, double *b, double *a=0) const |
| void | setRgbF (double r, double g, double b, double a=1.0) |
| int | hue () const |
| int | saturation () const |
| int | value () const |
| double | hueF () const |
| double | saturationF () const |
| double | valueF () const |
| void | getHsv (int *h, int *s, int *v, int *a=0) const |
| void | setHsv (int h, int s, int v, int a=255) |
| void | getHsvF (double *h, double *s, double *v, double *a=0) const |
| void | setHsvF (double h, double s, double v, double a=1.0) |
| int | cyan () const |
| int | magenta () const |
| int | yellow () const |
| int | black () const |
| double | cyanF () const |
| double | magentaF () const |
| double | yellowF () const |
| double | blackF () const |
| void | getCmyk (int *c, int *m, int *y, int *k, int *a=0) |
| void | setCmyk (int c, int m, int y, int k, int a=255) |
| void | getCmykF (double *c, double *m, double *y, double *k, double *a=0) |
| void | setCmykF (double c, double m, double y, double k, double a=1.0) |
| Color | toRgb () const |
| Color | toHsv () const |
| Color | toCmyk () const |
| Color | convertTo (Spec colorSpec) const |
| Color | light (int f=150) const |
| Color | lighter (int f=150) const |
| Color | dark (int f=200) const |
| Color | darker (int f=200) const |
| Color & | operator= (const Color &) |
| bool | isEqualIgnoreOrigin (const Color &c) const |
| bool | operator== (const Color &c) const |
| bool | operator!= (const Color &c) const |
| bool | operator< (const Color &c) const |
| bool | isLcc () const |
| Returns true if the color is intended to be used for Lcc elements/components (main or sub). More... | |
| bool | isMainLcc () const |
| Returns true if the color is intended to be used for main Lcc elements/components. More... | |
| bool | isLccSubColor () const |
| size_t | hash () const |
| Color | toCdwkOrigin () const |
| unsigned int | rgb () const |
| unsigned int | rgba () const |
Static Public Member Functions | |
| static std::list< std::string > | colorNames () |
| static Color | fromRgb (int r, int g, int b, int a=255) |
| static Color | fromRgbF (double r, double g, double b, double a=1.0) |
| static Color | fromHsv (int h, int s, int v, int a=255) |
| static Color | fromHsvF (double h, double s, double v, double a=1.0) |
| static Color | fromCmyk (int c, int m, int y, int k, int a=255) |
| static Color | fromCmykF (double c, double m, double y, double k, double a=1.0) |
| static int | toCdwkColor (const Color &color, bool *isPrecise=NULL) |
| Converts a Color to a cadwork color. More... | |
| static Color | fromCdwkColor (const int index) |
| Converts a cadwork color to a Color. More... | |
| static int | maximumCdwkColorNumber () |
| Returns maximum number (not index!, index = number-1) in cadwork palette. Classic cadwork palette has numbers [1-256]. More... | |
Friends | |
| std::size_t | hash_value (const Color &b) |
| LX_BASE_EXPORT std::ostream & | operator<< (std::ostream &o, const Base::Color &color) |
| enum Base::Color::Origin |
| enum Base::Color::Spec |
| Base::Color::Color | ( | ) |
| Base::Color::Color | ( | const Base::MColor & | c | ) |
| Base::Color::Color | ( | int | r, |
| int | g, | ||
| int | b, | ||
| int | a = 255 |
||
| ) |
| Base::Color::Color | ( | const std::string & | name | ) |
| Base::Color::Color | ( | const char * | name | ) |
| Base::Color::Color | ( | const Color & | rhs | ) |
| Base::Color::Color | ( | Spec | spec | ) |
| Base::Color::~Color | ( | ) |
| int Base::Color::alpha | ( | ) | const |
| double Base::Color::alphaF | ( | ) | const |
| int Base::Color::black | ( | ) | const |
| double Base::Color::blackF | ( | ) | const |
| int Base::Color::blue | ( | ) | const |
| double Base::Color::blueF | ( | ) | const |
|
static |
| int Base::Color::cyan | ( | ) | const |
| double Base::Color::cyanF | ( | ) | const |
| Color Base::Color::dark | ( | int | f = 200 | ) | const |
| Color Base::Color::darker | ( | int | f = 200 | ) | const |
|
static |
Converts a cadwork color to a Color.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void Base::Color::getCmyk | ( | int * | c, |
| int * | m, | ||
| int * | y, | ||
| int * | k, | ||
| int * | a = 0 |
||
| ) |
| void Base::Color::getCmykF | ( | double * | c, |
| double * | m, | ||
| double * | y, | ||
| double * | k, | ||
| double * | a = 0 |
||
| ) |
| void Base::Color::getHsv | ( | int * | h, |
| int * | s, | ||
| int * | v, | ||
| int * | a = 0 |
||
| ) | const |
| void Base::Color::getHsvF | ( | double * | h, |
| double * | s, | ||
| double * | v, | ||
| double * | a = 0 |
||
| ) | const |
| void Base::Color::getRgb | ( | int * | r, |
| int * | g, | ||
| int * | b, | ||
| int * | a = 0 |
||
| ) | const |
| void Base::Color::getRgbF | ( | double * | r, |
| double * | g, | ||
| double * | b, | ||
| double * | a = 0 |
||
| ) | const |
| int Base::Color::green | ( | ) | const |
| double Base::Color::greenF | ( | ) | const |
| size_t Base::Color::hash | ( | ) | const |
| int Base::Color::hue | ( | ) | const |
| double Base::Color::hueF | ( | ) | const |
| bool Base::Color::isEqualIgnoreOrigin | ( | const Color & | c | ) | const |
| bool Base::Color::isLcc | ( | ) | const |
Returns true if the color is intended to be used for Lcc elements/components (main or sub).
| bool Base::Color::isLccSubColor | ( | ) | const |
Returns true if the color is intended to be used for Lcc Sub- elements/components (not the real App::SubElements, but sub-chapter of another Lcc component).
| bool Base::Color::isMainLcc | ( | ) | const |
Returns true if the color is intended to be used for main Lcc elements/components.
| bool Base::Color::isValid | ( | ) | const |
| Color Base::Color::light | ( | int | f = 150 | ) | const |
| Color Base::Color::lighter | ( | int | f = 150 | ) | const |
| int Base::Color::magenta | ( | ) | const |
| double Base::Color::magentaF | ( | ) | const |
|
static |
Returns maximum number (not index!, index = number-1) in cadwork palette. Classic cadwork palette has numbers [1-256].
| std::string Base::Color::name | ( | ) | const |
| bool Base::Color::operator!= | ( | const Color & | c | ) | const |
| bool Base::Color::operator< | ( | const Color & | c | ) | const |
| bool Base::Color::operator== | ( | const Color & | c | ) | const |
| Origin Base::Color::origin | ( | ) | const |
| int Base::Color::red | ( | ) | const |
| double Base::Color::redF | ( | ) | const |
| unsigned int Base::Color::rgb | ( | ) | const |
| unsigned int Base::Color::rgba | ( | ) | const |
| int Base::Color::saturation | ( | ) | const |
| double Base::Color::saturationF | ( | ) | const |
| void Base::Color::setAlpha | ( | int | alpha | ) |
| void Base::Color::setAlphaF | ( | double | alpha | ) |
| void Base::Color::setBlue | ( | int | blue | ) |
| void Base::Color::setBlueF | ( | double | blue | ) |
| void Base::Color::setCmyk | ( | int | c, |
| int | m, | ||
| int | y, | ||
| int | k, | ||
| int | a = 255 |
||
| ) |
| void Base::Color::setCmykF | ( | double | c, |
| double | m, | ||
| double | y, | ||
| double | k, | ||
| double | a = 1.0 |
||
| ) |
| void Base::Color::setGreen | ( | int | green | ) |
| void Base::Color::setGreenF | ( | double | green | ) |
| void Base::Color::setHsv | ( | int | h, |
| int | s, | ||
| int | v, | ||
| int | a = 255 |
||
| ) |
| void Base::Color::setHsvF | ( | double | h, |
| double | s, | ||
| double | v, | ||
| double | a = 1.0 |
||
| ) |
| void Base::Color::setNamedColor | ( | const std::string & | name | ) |
| void Base::Color::setOrigin | ( | Origin | o | ) |
| void Base::Color::setRed | ( | int | red | ) |
| void Base::Color::setRedF | ( | double | red | ) |
| void Base::Color::setRgb | ( | int | r, |
| int | g, | ||
| int | b, | ||
| int | a = 255 |
||
| ) |
| void Base::Color::setRgbF | ( | double | r, |
| double | g, | ||
| double | b, | ||
| double | a = 1.0 |
||
| ) |
| Spec Base::Color::spec | ( | ) | const |
|
static |
Converts a Color to a cadwork color.
| Color Base::Color::toCdwkOrigin | ( | ) | const |
| Color Base::Color::toCmyk | ( | ) | const |
| Color Base::Color::toHsv | ( | ) | const |
| Color Base::Color::toRgb | ( | ) | const |
| int Base::Color::value | ( | ) | const |
| double Base::Color::valueF | ( | ) | const |
| int Base::Color::yellow | ( | ) | const |
| double Base::Color::yellowF | ( | ) | const |
|
friend |
|
friend |