classPiiColor4
#include <PiiColor.h>
A four-channel color.
Inherits PiiColorBase< T >, PiiArithmeticBase< PiiColor4< T >, PiiColor4Traits< T > >
Description
Fourth color channel is sometimes useful in aligning the color values to word boundaries in memory. Furthermore, some colors are composed of four distinct channels.
The class functions equivalently to PiiColor, but provides space for a
fourth channel. One can access the fourth color channel of the CMYK
and RGBA color spaces via cmykK and
rgbaA. All channels can be accessed via the
channel array and the color channel names inherited
from PiiColor.
Public types
|
enum
|
{ ChannelCount = 4 }
|
|
Shorthand for the base class type. |
Constructors and destructor
|
Create a new color with the same value on each color channel. |
|
|
Create a new four-channel color with the three channel values taken from the given three-channel color and the fourth channel set to zero. |
|
|
Create a new color with the given values for each color channel. |
|
|
template<class U>
|
Create a typecasted copy. |
|
template<class U>
|
Create a typecasted copy of a three-channel color. |
|
Copy another color. |
Public member functions
|
( )
An stl-style const iterator to the end of color channels. |
|
|
( )
An stl-style iterator to the end of color channels. |
Friends
|
friend struct
|
|
Enumeration details
-
enum @11
Function details
-
Create a new color with the same value on each color channel.
-
Create a new four-channel color with the three channel values taken from the given three-channel color and the fourth channel set to zero.
-
Create a new color with the given values for each color channel.
To create an RGBA color, do this:
// Parameters: R, G, B, A PiiColor4<> transparentBlue(0, 0, 255, 127);
-
Create a typecasted copy.
-
Create a typecasted copy of a three-channel color.
The fourt channel will be set to zero.
-
Copy another color.
-
template<class Archive>
void serialize
(- Archive & archive
- const unsigned int
[inline] -
An stl-style const iterator to the end of color channels.
-
An stl-style iterator to the end of color channels.
Add a note
Not a single note added yet. Be the first, add yours.