Go to the documentation of this file.
17 MColor(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a);
21 unsigned char red()
const;
23 unsigned char blue()
const;
59 Color(
int r,
int g,
int b,
int a = 255);
94 void getRgb(
int* r,
int* g,
int* b,
int* a =
nullptr)
const;
95 void setRgb(
int r,
int g,
int b,
int a = 255);
97 void getRgbF(
double* r,
double* g,
double* b,
double* a =
nullptr)
const;
98 void setRgbF(
double r,
double g,
double b,
double a = 1.0);
108 void getHsv(
int* h,
int* s,
int* v,
int* a =
nullptr)
const;
109 void setHsv(
int h,
int s,
int v,
int a = 255);
111 void getHsvF(
double* h,
double* s,
double* v,
double* a =
nullptr)
const;
112 void setHsvF(
double h,
double s,
double v,
double a = 1.0);
124 void getCmyk(
int* c,
int* m,
int* y,
int* k,
int* a =
nullptr);
125 void setCmyk(
int c,
int m,
int y,
int k,
int a = 255);
127 void getCmykF(
double* c,
double* m,
double* y,
double* k,
double* a =
nullptr);
128 void setCmykF(
double c,
double m,
double y,
double k,
double a = 1.0);
159 static std::pair<unsigned int, unsigned int>
toCdwkColor(
const Color& color,
bool* isPrecise =
nullptr);
172 static void setLccColors(
const std::map<int, Base::Color>& colors,
const std::map<Base::Color, Base::String>& tooltips);
198 std::unique_ptr<CA_ColorP> _pimpl;
static const std::map< std::pair< unsigned int, unsigned int >, Base::Color > & getCdwkPalette()
Provides access to the cadwork palette.
void setAlphaF(double alpha)
MColor(const Base::Color &c)
static std::list< std::string > colorNames()
friend LX_BASE_EXPORT std::ostream & operator<<(std::ostream &o, const Base::Color &color)
Color(const Base::MColor &c)
static Color fromHsvF(double h, double s, double v, double a=1.0)
static std::pair< unsigned int, unsigned int > toCdwkColor(const Color &color, bool *isPrecise=nullptr)
Converts a Color to a cadwork color.
unsigned char green() const
unsigned char b
Definition: Color.h:28
Color & operator=(const Color &)
bool isMainLcc() const
Returns true if the color is intended to be used for main Lcc elements/components.
unsigned int rgba() const
@ Invalid
Definition: Color.h:51
static unsigned int maximumCdwkColorIntegerNumber()
Returns maximum number in cadwork palette. Classic cadwork palette has numbers [1-256].
void getCmykF(double *c, double *m, double *y, double *k, double *a=nullptr)
unsigned char g
Definition: Color.h:27
double saturationF() const
@ Rgb
Definition: Color.h:52
unsigned char red() const
unsigned char r
Definition: Color.h:26
void getRgb(int *r, int *g, int *b, int *a=nullptr) const
void setNamedColor(const std::string &name)
Color(const std::string &name)
Color lighter(int f=150) const
void setHsvF(double h, double s, double v, double a=1.0)
void setRgb(int r, int g, int b, int a=255)
unsigned char alpha() const
static Color fromRgb(int r, int g, int b, int a=255)
void getHsvF(double *h, double *s, double *v, double *a=nullptr) const
@ Hsv
Definition: Color.h:53
static Color fromCdwkColor(const unsigned int integerPart, const unsigned int decimalPart=0)
Converts a cadwork color to a Color.
unsigned char blue() const
void getHsv(int *h, int *s, int *v, int *a=nullptr) const
bool isLcc() const
Returns true if the color is intended to be used for Lcc elements/components.
Spec
Definition: Color.h:50
void setCmyk(int c, int m, int y, int k, int a=255)
void setBlueF(double blue)
bool operator!=(const Color &c) const
static Base::String getToolTip(const Base::Color &color)
Returns tooltip for given color.
static Color fromCmykF(double c, double m, double y, double k, double a=1.0)
unsigned char a
Definition: Color.h:29
void setGreenF(double green)
bool operator==(const Color &c) const
static Color fromRgbF(double r, double g, double b, double a=1.0)
void setRgbF(double r, double g, double b, double a=1.0)
LX_BASE_EXPORT std::ostream & operator<<(std::ostream &o, const Base::Color &color)
MColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
static void loadLccColors(const Base::String &filename, bool user=false)
Reloads Lcc colors from the file.
bool operator<(const Color &c) const
Color darker(int f=200) const
void getRgbF(double *r, double *g, double *b, double *a=nullptr) const
void setCmykF(double c, double m, double y, double k, double a=1.0)
friend std::size_t hash_value(const Color &b)
Definition: Color.h:179
Color light(int f=150) const
static unsigned int maximumDecimalPartNumber()
Returns maximum number that is available in decimal part.
bool operator!=(const MColor &c) const
Color convertTo(Spec colorSpec) const
void getCmyk(int *c, int *m, int *y, int *k, int *a=nullptr)
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:18
void setHsv(int h, int s, int v, int a=255)
Color dark(int f=200) const
bool operator==(const MColor &c) const
static Color fromCmyk(int c, int m, int y, int k, int a=255)
static void setLccColors(const std::map< int, Base::Color > &colors, const std::map< Base::Color, Base::String > &tooltips)
Sets Lcc colors from the map.
static Color fromHsv(int h, int s, int v, int a=255)
Definition: AbstractXMLReader.h:5
Color(int r, int g, int b, int a=255)