MCPcopy Create free account
hub / github.com/Kitware/VTK / vtkColor4ub

Class vtkColor4ub

Common/DataModel/vtkColor.h:253–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251};
252
253class vtkColor4ub : public vtkColor4<unsigned char>
254{
255public:
256 vtkColor4ub() = default;
257 explicit vtkColor4ub(unsigned char scalar)
258 : vtkColor4<unsigned char>(scalar)
259 {
260 }
261 explicit vtkColor4ub(const unsigned char* init)
262 : vtkColor4<unsigned char>(init)
263 {
264 }
265
266 ///@{
267 /**
268 * Construct a color from a hexadecimal representation such as 0x0000FFAA
269 * (opaque blue).
270 */
271 explicit vtkColor4ub(int hexSigned)
272 {
273 unsigned int hex = static_cast<unsigned int>(hexSigned);
274 this->Data[3] = hex & 0xff;
275 hex >>= 8;
276 this->Data[2] = hex & 0xff;
277 hex >>= 8;
278 this->Data[1] = hex & 0xff;
279 hex >>= 8;
280 this->Data[0] = hex & 0xff;
281 }
282 ///@}
283
284 vtkColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a = 255)
285 : vtkColor4<unsigned char>(r, g, b, a)
286 {
287 }
288 vtkColor4ub(const vtkColor3ub& c)
289 : vtkColor4<unsigned char>(c[0], c[1], c[2], 255)
290 {
291 }
292};
293
294class vtkColor4f : public vtkColor4<float>
295{

Callers 8

PaintMethod · 0.50
VertexColorMethod · 0.50
EdgeColorMethod · 0.50
SetColorFunction · 0.50
InitFunction · 0.50
TestHTMLColorToRGBAFunction · 0.50
testVectorMethod · 0.50
DensityMapSettingsMethod · 0.50

Calls

no outgoing calls

Tested by 2

TestHTMLColorToRGBAFunction · 0.40
testVectorMethod · 0.40