40 explicit vtkColor3(
const T& scalar) : vtkTuple<T, 3>(scalar)
44 explicit vtkColor3(
const T* init) : vtkTuple<T, 3>(init)
48 vtkColor3(
const T& red,
const T& green,
const T& blue)
51 this->Data[1] = green;
57 void Set(
const T& red,
const T& green,
const T& blue)
60 this->Data[1] = green;
66 void SetRed(
const T& red) { this->Data[0] = red; }
69 const T&
GetRed()
const {
return this->Data[0]; }
72 void SetGreen(
const T& green) { this->Data[1] = green; }
75 const T&
GetGreen()
const {
return this->Data[1]; }
78 void SetBlue(
const T& blue) { this->Data[2] = blue; }
81 const T&
GetBlue()
const {
return this->Data[2]; }
84 VTK_LEGACY(
const T&
Red()
const);
87 VTK_LEGACY(
const T&
Green()
const);
91 VTK_LEGACY(
const T&
Blue()
const);
105 explicit vtkColor4(
const T& scalar) : vtkTuple<T, 4>(scalar)
109 explicit vtkColor4(
const T* init) : vtkTuple<T, 4>(init)
113 vtkColor4(
const T& red,
const T& green,
const T& blue,
const T& alpha)
116 this->Data[1] = green;
117 this->Data[2] = blue;
118 this->Data[3] = alpha;
123 void Set(
const T& red,
const T& green,
const T& blue)
126 this->Data[1] = green;
127 this->Data[2] = blue;
133 void Set(
const T& red,
const T& green,
const T& blue,
const T& alpha)
136 this->Data[1] = green;
137 this->Data[2] = blue;
138 this->Data[3] = alpha;
143 void SetRed(
const T& red) { this->Data[0] = red; }
146 const T&
GetRed()
const {
return this->Data[0]; }
149 void SetGreen(
const T& green) { this->Data[1] = green; }
152 const T&
GetGreen()
const {
return this->Data[1]; }
155 void SetBlue(
const T& blue) { this->Data[2] = blue; }
158 const T&
GetBlue()
const {
return this->Data[2]; }
161 void SetAlpha(
const T& alpha) { this->Data[3] = alpha; }
164 const T&
GetAlpha()
const {
return this->Data[3]; }
167 VTK_LEGACY(
const T&
Red()
const);
170 VTK_LEGACY(
const T&
Green()
const);
173 VTK_LEGACY(
const T&
Blue()
const);
177 VTK_LEGACY(
const T&
Alpha()
const);
198 unsigned int hex =
static_cast<unsigned int>(hexSigned);
199 this->Data[2] = hex & 0xff;
201 this->Data[1] = hex & 0xff;
203 this->Data[0] = hex & 0xff;
243 unsigned int hex =
static_cast<unsigned int>(hexSigned);
244 this->Data[3] = hex & 0xff;
246 this->Data[2] = hex & 0xff;
248 this->Data[1] = hex & 0xff;
250 this->Data[0] = hex & 0xff;
255 unsigned char b,
unsigned char a = 255)
256 :
vtkColor4<unsigned char>(r, g, b, a) {}
258 vtkColor4<unsigned char>(c[0], c[1], c[2], 255) {}
281 #ifndef VTK_LEGACY_REMOVE
286 return this->GetRed();
293 return this->GetGreen();
300 return this->GetBlue();
307 return this->GetRed();
314 return this->GetGreen();
321 return this->GetBlue();
328 return this->GetAlpha();
330 #endif // VTK_LEGACY_REMOVE
332 #endif // __vtkColor_h
const T & GetGreen() const
vtkColor3f(const float *init)
void SetAlpha(const T &alpha)
vtkColor3(const T &scalar)
const T & GetAlpha() const
vtkColor4ub(const vtkColor3ub &c)
vtkColor3(const T &red, const T &green, const T &blue)
void Set(const T &red, const T &green, const T &blue, const T &alpha)
void SetGreen(const T &green)
vtkColor3d(const double *init)
const T & GetBlue() const
void SetBlue(const T &blue)
vtkColor3ub(int hexSigned)
vtkColor4ub(const unsigned char *init)
vtkColor3ub(unsigned char r, unsigned char g, unsigned char b)
vtkColor4ub(unsigned char scalar)
vtkColor3d(double scalar)
void SetGreen(const T &green)
void SetRed(const T &red)
void SetRed(const T &red)
void Set(const T &red, const T &green, const T &blue)
vtkColor3d(double r, double g, double b)
vtkColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
vtkColor3ub(const unsigned char *init)
vtkColor4d(double r, double g, double b, double a=1.0)
void Set(const T &red, const T &green, const T &blue)
vtkColor3ub(unsigned char scalar)
vtkColor4f(const float *init)
vtkColor4(const T &scalar)
vtkColor4ub(int hexSigned)
void SetBlue(const T &blue)
const T & GetBlue() const
vtkColor4(const T &red, const T &green, const T &blue, const T &alpha)
vtkColor4f(float r, float g, float b, float a=1.0)
vtkColor4d(const double *init)
const T & GetGreen() const
vtkColor3f(float r, float g, float b)
vtkColor4d(double scalar)