28 Color(
unsigned char r_=255,
unsigned char g_=255,
29 unsigned char b_=255,
unsigned char t_=0 );
30 Color(
unsigned int rgbval );
35 unsigned char r()
const;
36 unsigned char g()
const;
37 unsigned char b()
const;
38 unsigned char t()
const;
39 float rF()
const {
return getFloat( r() ); }
40 float gF()
const {
return getFloat( g() ); }
41 float bF()
const {
return getFloat( b() ); }
42 float tF()
const {
return getFloat( t() ); }
44 bool isVisible()
const;
46 unsigned int rgb()
const;
49 void set(
unsigned char r_,
unsigned char g_,
50 unsigned char b_,
unsigned char t_=0 );
52 float average()
const {
return ((
float) r()+g()+b())/3.0f; }
53 Color complementaryColor()
const;
54 Color lighter(
float fac)
const;
56 {
return lighter( -fac ); }
57 static Color between(Color,Color,
float relpos=0.5f);
59 void setRgb(
unsigned int rgb_ );
60 void setTransparency(
unsigned char t_ );
61 void setTransparencyF(
float tf );
62 void setHSV(
unsigned char h,
unsigned char s,
unsigned char v);
63 void getHSV(
unsigned char&,
unsigned char&,
64 unsigned char&)
const;
65 void setStdStr(
const char*);
67 int transpopt=0)
const;
72 bool use(
const char*);
84 static Color
Red() {
return Color(255,0,0,0); }
88 static unsigned char getUChar(
float v );
89 static float getFloat(
unsigned char);
92 static int nrStdDrawColors();
93 static Color stdDrawColor(
int);
94 static Color stdDrawColor(
const char*);
100 bool fromDescription(
const char*);
101 static Color getColorFromDescription(
const char*);
123 static bool isUfd(Color& col) {
return false; }
#define mExpClass(module)
Definition: commondefs.h:157
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
static bool hasUdf()
Definition: color.h:122
Templatized undefined and initialisation (i.e. null) values.
Definition: color.h:113
static Color Green()
Definition: color.h:79
static Color val()
Definition: color.h:121
float gF() const
Definition: color.h:40
static Color Red()
Definition: color.h:84
float average() const
Definition: color.h:52
void fill(uiStringSet &) const
Set of BufferString objects.
Definition: bufstringset.h:25
static bool isUfd(Color &col)
Definition: color.h:123
unsigned int col_
Definition: color.h:109
static Color Pink()
Definition: color.h:83
FixedString Color()
Definition: keystrs.h:44
float bF() const
Definition: color.h:41
float rF() const
Definition: color.h:39
void use(const uiStringSet &)
float tF() const
Definition: color.h:42
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:60
static Color LightGrey()
Definition: color.h:80
static Color DgbColor()
Definition: color.h:78
static Color White()
Definition: color.h:85
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
static Color Orange()
Definition: color.h:81
Color darker(float fac) const
Definition: color.h:55
static Color Blue()
Definition: color.h:77
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:24
static Color Peach()
Definition: color.h:82
#define mClass(module)
Definition: commondefs.h:161
static Color Yellow()
Definition: color.h:86
static void setUdf(Color &col)
Definition: color.h:124
static Color NoColor()
Definition: color.h:74
static Color Black()
Definition: color.h:76
Templatized undefined values.
Definition: undefval.h:49