 |
OpendTect
6.6
|
Go to the documentation of this file.
29 Color(
unsigned char r_=255,
unsigned char g_=255,
30 unsigned char b_=255,
unsigned char t_=0 );
36 unsigned char r()
const;
37 unsigned char g()
const;
38 unsigned char b()
const;
39 unsigned char t()
const;
40 float rF()
const {
return getFloat( r() ); }
41 float gF()
const {
return getFloat( g() ); }
42 float bF()
const {
return getFloat( b() ); }
43 float tF()
const {
return getFloat( t() ); }
47 unsigned int rgb()
const;
50 void set(
unsigned char r_,
unsigned char g_,
51 unsigned char b_,
unsigned char t_=0 );
53 float average()
const {
return ((
float) r()+g()+b())/3.0f; }
58 {
return lighter( -fac ); }
65 void setHSV(
unsigned char h,
unsigned char s,
unsigned char v);
66 void getHSV(
unsigned char&,
unsigned char&,
67 unsigned char&)
const;
70 int transpopt=0)
const;
77 bool use(
const char*);
static Color val()
Definition: color.h:123
static void convertFromStr(const BufferStringSet &, TypeSet< Color > &)
static Color Yellow()
Definition: color.h:91
static float getFloat(unsigned char)
FixedString Color()
Definition: keystrs.h:45
static Color Anthracite()
Definition: color.h:81
static Color NoColor()
Definition: color.h:79
static Color Black()
Definition: color.h:82
Set of BufferString objects.
Definition: bufstringset.h:26
const char * getDescription() const
static int nrStdDrawColors()
#define mExpClass(module)
Definition: commondefs.h:177
void setHSV(unsigned char h, unsigned char s, unsigned char v)
Color lighter(float fac) const
float bF() const
Definition: color.h:42
float gF() const
Definition: color.h:41
static Color Green()
Definition: color.h:85
Color(unsigned char r_=255, unsigned char g_=255, unsigned char b_=255, unsigned char t_=0)
float getRelLuminance() const
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:81
static Color Red()
Definition: color.h:89
static unsigned char getUChar(float v)
void set(unsigned char r_, unsigned char g_, unsigned char b_, unsigned char t_=0)
Undefined Color.
Definition: color.h:121
void setTransparency(unsigned char t_)
static Color Orange()
Definition: color.h:87
const char * getStdStr(bool withhash=true, int transpopt=0) const
float tF() const
Definition: color.h:43
static Color LightGrey()
Definition: color.h:86
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:90
#define mClass(module)
Definition: commondefs.h:181
static bool isUfd(Color &)
Definition: color.h:125
Color darker(float fac) const
Definition: color.h:57
void fill(BufferString &) const
static Color Peach()
Definition: color.h:88
unsigned int col_
Definition: color.h:109
static void setUdf(Color &)
Definition: color.h:126
float average() const
Definition: color.h:53
Color complementaryColor() const
static Color Blue()
Definition: color.h:83
void setTransparencyF(float tf)
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
static bool hasUdf()
Definition: color.h:124
void setStdStr(const char *)
e.g. "#00ff32"
void getHSV(unsigned char &, unsigned char &, unsigned char &) const
float rF() const
Definition: color.h:40
float contrast(const Color &) const
TypeSet< Color > complimentaryColors(int) const
Templatized undefined and initialisation (i.e. null) values.
Definition: color.h:113
bool fromDescription(const char *)
const char * largeUserInfoString() const
static Color stdDrawColor(int)
Color(unsigned int rgbval)
void setRgb(unsigned int rgb_)
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer,...
Definition: color.h:26
static void convertToStr(const TypeSet< Color > &, BufferStringSet &)
static Color White()
Definition: color.h:90
static Color DgbColor()
Definition: color.h:84
static const BufferStringSet & descriptions()
static Color interpolate(const Color &, const Color &, float frac=0.5)
static const TypeSet< Color > & descriptionCenters()
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021