25 #ifndef __ColourRGB_hh__
26 #define __ColourRGB_hh__
27 #include <Base/Debug/Error.hh>
33 template <
class StorageType>
42 explicit ColourRGB(
const StorageType& red,
const StorageType& green,
43 const StorageType& blue)
52 { BIASASSERT(i>=0&&i<3);
return Data_[i]; }
55 { BIASASSERT(i>=0&&i<3);
return Data_[i]; }
90 return ColourRGB((StorageType)255,(StorageType)255,(StorageType)255);
93 return ColourRGB((StorageType)255,(StorageType)0,(StorageType)0);
96 return ColourRGB((StorageType)0,(StorageType)255,(StorageType)0);
99 return ColourRGB((StorageType)0,(StorageType)0,(StorageType)255);
102 return ColourRGB((StorageType)255,(StorageType)255,(StorageType)0);
105 return ColourRGB((StorageType)255,(StorageType)0,(StorageType)255);
108 return ColourRGB((StorageType)0,(StorageType)255,(StorageType)255);
111 return ColourRGB((StorageType)0,(StorageType)0,(StorageType)0);
114 return ColourRGB((StorageType)25.5,(StorageType)25.5,(StorageType)25.5);
117 return ColourRGB((StorageType)51,(StorageType)51,(StorageType)51);
120 return ColourRGB((StorageType)76.5,(StorageType)76.5,(StorageType)76.5);
123 return ColourRGB((StorageType)102,(StorageType)102,(StorageType)102);
126 return ColourRGB((StorageType)127.5,(StorageType)127.5,(StorageType)127.5);
129 return ColourRGB((StorageType)153,(StorageType)153,(StorageType)153);
132 return ColourRGB((StorageType)178.5,(StorageType)178.5,(StorageType)178.5);
135 return ColourRGB((StorageType)204,(StorageType)204,(StorageType)204);
138 return ColourRGB((StorageType)229.5,(StorageType)229.5,(StorageType)229.5);
141 BIASWARN(
"undef color");
142 return ColourRGB((StorageType)255,(StorageType)255,(StorageType)255);
150 #define COLOR_RED BIAS::ColourRGB<unsigned char>(255,0,0)
151 #define COLOR_GREEN BIAS::ColourRGB<unsigned char>(0,255,0)
152 #define COLOR_BLUE BIAS::ColourRGB<unsigned char>(0,0,255)
153 #define COLOR_WHITE BIAS::ColourRGB<unsigned char>(255,255,255)
154 #define COLOR_GREY50 BIAS::ColourRGB<unsigned char>(128, 128, 128)
155 #define COLOR_BLACK BIAS::ColourRGB<unsigned char>(0,0,0)
156 #define COLOR_MAGENTA BIAS::ColourRGB<unsigned char>(255, 0, 255)
157 #define COLOR_CYAN BIAS::ColourRGB<unsigned char>(255, 255, 0)
158 #define COLOR_YELLOW BIAS::ColourRGB<unsigned char>(0, 255, 255)
162 #endif // __ColourRGB_hh__
interface class used to ease handover in function calls
const StorageType * GetData() const
static ColourRGB PreDefinedColor(int colorIdx)
StorageType & operator[](const int i)
const StorageType & operator[](const int i) const
ColourRGB & operator=(const ColourRGB &col)
ColourRGB(const StorageType col[3])
ColourRGB(const StorageType &red, const StorageType &green, const StorageType &blue)
ColourRGB(const ColourRGB &col)