 |
|
 |
 |
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLMISC::CRGBA Class ReferenceClass pixel RGBA.
More...
#include <rgba.h>
Collaboration diagram for NLMISC::CRGBA:
[legend]List of all members.
Public Methods |
| | CRGBA () |
| | Default constructor. do nothing. More...
|
| | CRGBA (uint8 r, uint8 g, uint8 b, uint8 a=255) |
| | Constructor. More...
|
| uint | getPacked () const |
| | Return a packed pixel. More...
|
| bool | operator< (const CRGBA &c) const |
| | Comparison operator. More...
|
| bool | operator!= (const CRGBA &c) const |
| | Comparison operator. More...
|
| bool | operator== (const CRGBA &c) const |
| | Equality operator. More...
|
| void | serial (class NLMISC::IStream &f) |
| | Serialisation. More...
|
| void | blendFromui (const CRGBA &c0, const CRGBA &c1, uint coef) |
| | Blend two colors. More...
|
| void | modulateFromui (CRGBA &c0, uint a) |
| | Modulate colors with a constant. More...
|
| void | modulateFromColor (const CRGBA &c0, const CRGBA &c1) |
| | Modulate colors with another color. More...
|
| void | set (uint8 r, uint8 g, uint8 b, uint8 a=255) |
| | Set colors. More...
|
| uint16 | get565 () const |
| | Get a 16 bits 565 pixel. More...
|
| void | set565 (uint16 col) |
| | Set the RGB fields with a 16 bits 565 pixel. More...
|
| void | avg2 (const CRGBA &a, const CRGBA &b) |
| | Compute in this the average of 2 RGBA. More...
|
| void | avg4 (const CRGBA &a, const CRGBA &b, const CRGBA &c, const CRGBA &d) |
| | Compute in this the average of 4 RGBA. More...
|
Public Attributes |
| uint8 | R |
| | Red componant. More...
|
| uint8 | G |
| | Green componant. More...
|
| uint8 | B |
| | Blue componant. More...
|
| uint8 | A |
| | Alpha componant. More...
|
Static Public Attributes |
| const CRGBA | Black |
| | some colors.
|
| const CRGBA | Red |
| const CRGBA | Green |
| const CRGBA | Yellow |
| const CRGBA | Blue |
| const CRGBA | Magenta |
| const CRGBA | Cyan |
| const CRGBA | White |
Detailed Description
Class pixel RGBA.
-
Author(s):
-
Cyril Corvazier , Nevrax France
-
Date:
-
2000
Definition at line 43 of file rgba.h.
Constructor & Destructor Documentation
|
NLMISC::CRGBA::CRGBA (
|
) [inline]
|
|
|
|
Default constructor. do nothing.
Definition at line 48 of file rgba.h. |
|
|
Constructor.
-
Parameters:
-
| r
|
Red componant. |
| g
|
Green componant. |
| b
|
Blue componant. |
| a
|
Alpha componant. |
Definition at line 57 of file rgba.h. |
Member Function Documentation
|
void NLMISC::CRGBA::avg2 (
|
const CRGBA & a,
|
|
const CRGBA & b ) [inline]
|
|
|
|
Compute in this the average of 2 RGBA.
Definition at line 166 of file rgba.h. |
|
void NLMISC::CRGBA::avg4 (
|
const CRGBA & a,
|
|
const CRGBA & b,
|
|
const CRGBA & c,
|
|
const CRGBA & d ) [inline]
|
|
|
|
Compute in this the average of 4 RGBA.
The average is "correct": +1 is added to the four color, to make a "round" like average.
Definition at line 178 of file rgba.h. |
|
void NLMISC::CRGBA::blendFromui (
|
const CRGBA & c0,
|
|
const CRGBA & c1,
|
|
uint coef ) [inline]
|
|
|
uint16 NLMISC::CRGBA::get565 (
|
) const [inline]
|
|
|
|
Get a 16 bits 565 pixel.
Definition at line 142 of file rgba.h. |
|
uint NLMISC::CRGBA::getPacked (
|
) const [inline]
|
|
|
|
Return a packed pixel.
Definition at line 63 of file rgba.h. |
|
void NLMISC::CRGBA::modulateFromColor (
|
const CRGBA & c0,
|
|
const CRGBA & c1 ) [inline]
|
|
|
|
Modulate colors with another color.
-
Parameters:
-
| c0
|
Color 0. |
| c1
|
Color 1. c0*c1 returned into this. |
Definition at line 121 of file rgba.h. |
|
void NLMISC::CRGBA::modulateFromui (
|
CRGBA & c0,
|
|
uint a ) [inline]
|
|
|
bool NLMISC::CRGBA::operator!= (
|
const CRGBA & c ) const [inline]
|
|
|
|
Comparison operator.
Definition at line 72 of file rgba.h. |
|
bool NLMISC::CRGBA::operator< (
|
const CRGBA & c ) const [inline]
|
|
|
|
Comparison operator.
Definition at line 68 of file rgba.h. |
|
bool NLMISC::CRGBA::operator== (
|
const CRGBA & c ) const [inline]
|
|
|
|
Equality operator.
Definition at line 77 of file rgba.h. |
|
|
Serialisation.
-
Parameters:
-
| f
|
Stream used for serialisation. |
Definition at line 52 of file rgba.cpp. |
|
void NLMISC::CRGBA::set565 (
|
uint16 col ) [inline]
|
|
|
|
Set the RGB fields with a 16 bits 565 pixel.
Definition at line 150 of file rgba.h. |
Member Data Documentation
|
|
Alpha componant.
Definition at line 194 of file rgba.h. |
|
|
Blue componant.
Definition at line 192 of file rgba.h. |
const CRGBA NLMISC::CRGBA::Black [static]
|
|
const CRGBA NLMISC::CRGBA::Blue [static]
|
|
const CRGBA NLMISC::CRGBA::Cyan [static]
|
|
|
|
Green componant.
Definition at line 190 of file rgba.h. |
const CRGBA NLMISC::CRGBA::Green [static]
|
|
const CRGBA NLMISC::CRGBA::Magenta [static]
|
|
|
|
Red componant.
Definition at line 188 of file rgba.h. |
const CRGBA NLMISC::CRGBA::Red [static]
|
|
const CRGBA NLMISC::CRGBA::White [static]
|
|
const CRGBA NLMISC::CRGBA::Yellow [static]
|
|
The documentation for this class was generated from the following files:
|
 |