30 Color(
unsigned char r_=255,
unsigned char g_=255,
31 unsigned char b_=255,
unsigned char t_=0 );
32 Color(
unsigned int rgbval );
37 unsigned char r()
const;
38 unsigned char g()
const;
39 unsigned char b()
const;
40 unsigned char t()
const;
41 float rF()
const {
return getFloat( r() ); }
42 float gF()
const {
return getFloat( g() ); }
43 float bF()
const {
return getFloat( b() ); }
44 float tF()
const {
return getFloat( t() ); }
46 bool isVisible()
const;
48 unsigned int rgb()
const;
51 void set(
unsigned char r_,
unsigned char g_,
52 unsigned char b_,
unsigned char t_=0 );
54 float average()
const {
return ((
float) r()+g()+b())/3.0f; }
55 Color complementaryColor()
const;
56 Color lighter(
float fac)
const;
58 {
return lighter( -fac ); }
60 void setRgb(
unsigned int rgb_ );
61 void setTransparency(
unsigned char t_ );
62 void setTransparencyF(
float tf );
63 void setHSV(
unsigned char h,
unsigned char s,
unsigned char v);
64 void getHSV(
unsigned char&,
unsigned char&,
65 unsigned char&)
const;
66 void setStdStr(
const char*);
67 const char* getStdStr(
bool withhash=
true,
68 int transpopt=0)
const;
73 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);
91 static int nrStdDrawColors();
92 static Color stdDrawColor(
int);
94 const char* largeUserInfoString()
const;
95 const char* getDescription()
const;
96 bool fromDescription(
const char*);
118 static bool isUfd(Color& col) {
return false; }
#define mExpClass(module)
Definition: commondefs.h:160
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
static bool hasUdf()
Definition: color.h:117
Templatized undefined and initialisation (i.e. null) values.
Definition: color.h:106
static Color Green()
Definition: color.h:80
static Color val()
Definition: color.h:116
float gF() const
Definition: color.h:42
static Color Red()
Definition: color.h:84
float average() const
Definition: color.h:54
void fill(uiStringSet &) const
Set of BufferString objects.
Definition: bufstringset.h:28
static bool isUfd(Color &col)
Definition: color.h:118
unsigned int col_
Definition: color.h:102
FixedString Color()
Definition: keystrs.h:46
float bF() const
Definition: color.h:43
float rF() const
Definition: color.h:41
void use(const uiStringSet &)
float tF() const
Definition: color.h:44
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
static Color LightGrey()
Definition: color.h:81
static Color DgbColor()
Definition: color.h:79
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:40
static Color Orange()
Definition: color.h:82
Color darker(float fac) const
Definition: color.h:57
static Color Blue()
Definition: color.h:78
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
static Color Peach()
Definition: color.h:83
#define mClass(module)
Definition: commondefs.h:164
static Color Yellow()
Definition: color.h:86
static void setUdf(Color &col)
Definition: color.h:119
static Color NoColor()
Definition: color.h:75
static Color Black()
Definition: color.h:77
Templatized undefined values.
Definition: undefval.h:51