Cumulia Illustrator Rendering Engine v1.1.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
cil::Color4ub Class Referencefinal

The Color4ub class inherits from Color4, specilizing the template parameters to unsigned char for element type. More...

#include <color.h>

Inheritance diagram for cil::Color4ub:
cil::Color4< unsigned char > cil::Color< unsigned char > cil::Tuple< unsigned char > cil::Variant

Public Member Functions

 Color4ub ()
 Constructs a Color4ub object, and initializes it to (255, 255, 255, 255).
 
 Color4ub (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 Constructs a Color4ub object, and set its elements to paramters (r, g, b, a).
 
 Color4ub (const Color4ub &other)
 
 Color4ub (const Color4f &other)
 Constructs a Color4ub of (r, g, b, a) by copying the values of another Color4f object and multiplying these values by 255.0f (converting from float range 0.0-1.0 to unsigned char (ub) range 0-255 ).
 
 Color4ub (const Color3ub &other)
 
 Color4ub (const Color3f &other)
 Constructs a Color4ub of (r, g, b, a) by copying the (r, g, b) of another Color3ub object and setting the 'a' as 255.
 
- Public Member Functions inherited from cil::Color4< unsigned char >
 Color4 ()
 Contructs a Color4 object with 4 elements.
 
void set (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 Sets the (r, g, b, a) values of current Color4 object.
 
- Public Member Functions inherited from cil::Color< unsigned char >
 Color (int size)
 Constructs a Color object with a specified number of elements.
 
const unsigned char & operator[] (int index) const
 Provides read-only access to the element at a specific index(position) within the Color object.
 
unsigned char & operator[] (int index)
 Provides read-write access to the element at a specific index(position) within the Color object.
 
const unsigned char & operator[] (char key) const
 Provides read-only access to a element within the Color object using a character key.
 
unsigned char & operator[] (char key)
 Provides read-write access to a element within the Color object using a character key.
 
- Public Member Functions inherited from cil::Tuple< unsigned char >
 Tuple (int size)
 Constructs a Tuple object with a specified number of elements, and initialize all elements to 0.
 
virtual ~Tuple ()
 
int size () const
 Gets the number of elements of the Tuple.
 
unsigned char * data ()
 Gets the data array of the Tuple.
 
const unsigned char * data () const
 Gets the data array of the Tuple, and the data could not be modified upon which this function is called.
 
void setData (const unsigned char *data)
 Sets the data array of the Variant.
 
Tuple< unsigned char > & operator= (const Tuple &other)
 Copys the data of another Tuple to the one on which the operator is invoked.
 
bool operator== (const Tuple &other) const
 Compares the Tuple with another one, and returns true if they are equal, otherwise returns false.
 
bool operator!= (const Tuple &other) const
 Compares the Tuple with another one, and returns false if they are equal, otherwise returns true.
 
- Public Member Functions inherited from cil::Variant
 Variant ()
 
virtual ~Variant ()
 
const std::string & type () const
 

Additional Inherited Members

- Protected Attributes inherited from cil::Tuple< unsigned char >
unsigned char * m_data
 The data array of the Tuple.
 
int m_size
 The number of elements that the data array of the Tuple holds.
 
- Protected Attributes inherited from cil::Variant
std::string m_type
 

Detailed Description

The Color4ub class inherits from Color4, specilizing the template parameters to unsigned char for element type.

Constructor & Destructor Documentation

◆ Color4ub() [1/6]

cil::Color4ub::Color4ub ( )

Constructs a Color4ub object, and initializes it to (255, 255, 255, 255).

◆ Color4ub() [2/6]

cil::Color4ub::Color4ub ( unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a )

Constructs a Color4ub object, and set its elements to paramters (r, g, b, a).

◆ Color4ub() [3/6]

cil::Color4ub::Color4ub ( const Color4ub & other)

◆ Color4ub() [4/6]

cil::Color4ub::Color4ub ( const Color4f & other)

Constructs a Color4ub of (r, g, b, a) by copying the values of another Color4f object and multiplying these values by 255.0f (converting from float range 0.0-1.0 to unsigned char (ub) range 0-255 ).

◆ Color4ub() [5/6]

cil::Color4ub::Color4ub ( const Color3ub & other)

◆ Color4ub() [6/6]

cil::Color4ub::Color4ub ( const Color3f & other)

Constructs a Color4ub of (r, g, b, a) by copying the (r, g, b) of another Color3ub object and setting the 'a' as 255.