Public Types |
Public Member Functions |
Public Attributes |
Static Private Attributes |
List of all members
mn::math::basic_color< T > Class Template Reference
A class for RGBA Color handling. More...
#include <mn_color.hpp>
Public Types | |
using | value_type = T |
using | pointer = T * |
using | self_type = basic_color< T > |
Public Member Functions | |
basic_color (void) | |
Construct a new basic color object. More... | |
basic_color (value_type _r, value_type _g, value_type _b, value_type _a) | |
Construct a new basic color object. More... | |
basic_color (value_type _r, value_type _g, value_type _b) | |
Construct a new basic color object. More... | |
basic_color (value_type *com) | |
Construct a new basic color object. More... | |
basic_color (const int _r, const int _g, const int _b) | |
Construct a new basic color object. More... | |
basic_color (const int _r, const int _g, const int _b, const int _a) | |
Construct a new basic color object. More... | |
basic_color (const int *pComponent) | |
Construct a new basic color object. More... | |
basic_color (const int c) | |
Construct a new basic color object. More... | |
self_type & | operator= (const self_type &c) |
self_type & | operator+= (const self_type &c) |
self_type & | operator-= (const self_type &c) |
self_type & | operator*= (const self_type &c) |
self_type & | operator*= (const value_type f) |
self_type & | operator/= (const self_type &c) |
self_type & | operator/= (const value_type f) |
virtual mn::string | to_string () |
operator unsigned long () | |
operator T* () | |
Public Attributes | |
union { | |
struct { | |
value_type | r |
The red value More... | |
value_type | g |
The green value More... | |
value_type | b |
The blue value More... | |
value_type | a |
The alpha value More... | |
} | |
struct { | |
value_type | red |
The red value More... | |
value_type | green |
The green value More... | |
value_type | blue |
The blue value More... | |
value_type | alpha |
The alpha value More... | |
} | |
value_type | c [4] |
}; | |
Static Private Attributes | |
static constexpr double | colorcon = 0.003921568627450980392156862745098 |
Detailed Description
template<typename T>
class mn::math::basic_color< T >
A class for RGBA Color handling.
- Template Parameters
-
T The value of the color value
Member Typedef Documentation
◆ pointer
template<typename T >
using mn::math::basic_color< T >::pointer = T* |
◆ self_type
template<typename T >
using mn::math::basic_color< T >::self_type = basic_color<T> |
◆ value_type
template<typename T >
using mn::math::basic_color< T >::value_type = T |
Constructor & Destructor Documentation
◆ basic_color() [1/8]
template<typename T >
|
inline |
Construct a new basic color object.
◆ basic_color() [2/8]
template<typename T >
|
inline |
Construct a new basic color object.
- Parameters
-
_r The red vaule _g The green vaule _b The blue vaule _a The alpha vaule
◆ basic_color() [3/8]
template<typename T >
|
inline |
Construct a new basic color object.
- Parameters
-
_r The red vaule _g The green vaule _b The blue vaule
◆ basic_color() [4/8]
template<typename T >
|
inline |
Construct a new basic color object.
- Parameters
-
com a array of the rgba color
◆ basic_color() [5/8]
template<typename T >
|
inline |
Construct a new basic color object.
- Parameters
-
_r The red value an int 0-255 _g The green value an int 0-255 _b The blue value an int 0-255
◆ basic_color() [6/8]
template<typename T >
|
inline |
Construct a new basic color object.
- Parameters
-
_r The red value an int 0-255 _g The green value an int 0-255 _b The blue value an int 0-255 _a The alpha value an int 0-255
◆ basic_color() [7/8]
template<typename T >
|
inline |
Construct a new basic color object.
- Parameters
-
pComponent a array of the rgba color as in [RRRGGGBBBAAA]
◆ basic_color() [8/8]
template<typename T >
|
inline |
Construct a new basic color object.
Member Function Documentation
◆ operator T*()
template<typename T >
|
inline |
◆ operator unsigned long()
template<typename T >
|
inline |
◆ operator*=() [1/2]
template<typename T >
|
inline |
◆ operator*=() [2/2]
template<typename T >
|
inline |
◆ operator+=()
template<typename T >
|
inline |
◆ operator-=()
template<typename T >
|
inline |
◆ operator/=() [1/2]
template<typename T >
|
inline |
◆ operator/=() [2/2]
template<typename T >
|
inline |
◆ operator=()
template<typename T >
|
inline |
◆ to_string()
template<typename T >
|
inlinevirtual |
Member Data Documentation
◆
union { ... } |
◆ colorcon
template<typename T >
|
staticconstexprprivate |
The documentation for this class was generated from the following file: