VTK-m  2.1
Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
vtkm::rendering::Color Class Reference

Representation of a color. More...

#include <Color.h>

Public Member Functions

 Color ()
 Create a black color. More...
 
 Color (vtkm::Float32 r_, vtkm::Float32 g_, vtkm::Float32 b_, vtkm::Float32 a_=1.f)
 Create a color with specified RGBA values. More...
 
 Color (const vtkm::Vec4f_32 &components)
 Create a color with specified RGBA values. More...
 
void SetComponentFromByte (vtkm::Int32 i, vtkm::UInt8 v)
 Set the color value from 8 bit RGBA components. More...
 
vtkm::UInt8 GetComponentAsByte (int i)
 
void GetRGBA (vtkm::UInt8 &r, vtkm::UInt8 &g, vtkm::UInt8 &b, vtkm::UInt8 &a)
 
vtkm::Float64 RawBrightness ()
 

Public Attributes

vtkm::Vec4f_32 Components
 

Static Public Attributes

static Color white
 
static Color black
 
static Color red
 
static Color green
 
static Color blue
 
static Color cyan
 
static Color magenta
 
static Color yellow
 
static Color gray10
 
static Color gray20
 
static Color gray30
 
static Color gray40
 
static Color gray50
 
static Color gray60
 
static Color gray70
 
static Color gray80
 
static Color gray90
 

Friends

std::ostream & operator<< (std::ostream &out, const Color &c)
 

Detailed Description

Representation of a color.

The color is defined as red, green, and blue intensities as well as an alpha representation of transparency (RGBA). The class provides mechanisms to retrieve the color as 8-bit integers or floating point values in the range [0, 1].

Constructor & Destructor Documentation

◆ Color() [1/3]

vtkm::rendering::Color::Color ( )
inline

Create a black color.

◆ Color() [2/3]

vtkm::rendering::Color::Color ( vtkm::Float32  r_,
vtkm::Float32  g_,
vtkm::Float32  b_,
vtkm::Float32  a_ = 1.f 
)
inline

Create a color with specified RGBA values.

The values are floating point and in the range [0, 1].

◆ Color() [3/3]

vtkm::rendering::Color::Color ( const vtkm::Vec4f_32 components)
inline

Create a color with specified RGBA values.

The values are floating point and in the range [0, 1].

Member Function Documentation

◆ GetComponentAsByte()

vtkm::UInt8 vtkm::rendering::Color::GetComponentAsByte ( int  i)
inline

◆ GetRGBA()

void vtkm::rendering::Color::GetRGBA ( vtkm::UInt8 r,
vtkm::UInt8 g,
vtkm::UInt8 b,
vtkm::UInt8 a 
)
inline

◆ RawBrightness()

vtkm::Float64 vtkm::rendering::Color::RawBrightness ( )
inline

◆ SetComponentFromByte()

void vtkm::rendering::Color::SetComponentFromByte ( vtkm::Int32  i,
vtkm::UInt8  v 
)
inline

Set the color value from 8 bit RGBA components.

The components are packed together into a 32-bit (4-byte) values.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Color c 
)
friend

Member Data Documentation

◆ black

Color vtkm::rendering::Color::black
static

◆ blue

Color vtkm::rendering::Color::blue
static

◆ Components

vtkm::Vec4f_32 vtkm::rendering::Color::Components

◆ cyan

Color vtkm::rendering::Color::cyan
static

◆ gray10

Color vtkm::rendering::Color::gray10
static

◆ gray20

Color vtkm::rendering::Color::gray20
static

◆ gray30

Color vtkm::rendering::Color::gray30
static

◆ gray40

Color vtkm::rendering::Color::gray40
static

◆ gray50

Color vtkm::rendering::Color::gray50
static

◆ gray60

Color vtkm::rendering::Color::gray60
static

◆ gray70

Color vtkm::rendering::Color::gray70
static

◆ gray80

Color vtkm::rendering::Color::gray80
static

◆ gray90

Color vtkm::rendering::Color::gray90
static

◆ green

Color vtkm::rendering::Color::green
static

◆ magenta

Color vtkm::rendering::Color::magenta
static

◆ red

Color vtkm::rendering::Color::red
static

◆ white

Color vtkm::rendering::Color::white
static

◆ yellow

Color vtkm::rendering::Color::yellow
static

The documentation for this class was generated from the following file: