# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLMISC::CBGRA Class Reference

Class pixel BGRA, Windows style pixel. More...

#include <rgba.h>

List of all members.

Public Methods

 CBGRA ()
 Default constructor. do nothing. More...

 CBGRA (CRGBA c)
 Constructor from a CRGBA. More...

 CBGRA (uint8 r, uint8 g, uint8 b, uint8 a=255)
 Constructor. More...

 operator CRGBA ()
 Cast operator to CRGBA. More...

uint getPacked () const
 Return a packed pixel. More...

bool operator< (const CBGRA &c) const
 Comparison operator. More...

bool operator== (const CBGRA &c) const
 Equality operator. More...

void serial (class NLMISC::IStream &f)
 Serialisation. More...

void blendFromui (CBGRA &c0, CBGRA &c1, uint factor)
 Blend two colors. More...

void set (uint8 r, uint8 g, uint8 b, uint8 a)
 Set colors. More...


Public Attributes

uint8 R
 Red componant. More...

uint8 G
 Green componant. More...

uint8 B
 Blue componant. More...

uint8 A
 Alpha componant. More...


Detailed Description

Class pixel BGRA, Windows style pixel.

Author:
Cyril Corvazier , Nevrax France
Date:
2000

Definition at line 350 of file rgba.h.


Constructor & Destructor Documentation

NLMISC::CBGRA::CBGRA   [inline]
 

Default constructor. do nothing.

Definition at line 355 of file rgba.h.

Referenced by operator<, and operator==.

NLMISC::CBGRA::CBGRA CRGBA    c [inline]
 

Constructor from a CRGBA.

Parameters:
c  CRGBA color.

Definition at line 361 of file rgba.h.

References A, B, G, and R.

NLMISC::CBGRA::CBGRA uint8    r,
uint8    g,
uint8    b,
uint8    a = 255
[inline]
 

Constructor.

Parameters:
r  Red componant.
g  Green componant.
b  Blue componant.
a  Alpha componant.

Definition at line 376 of file rgba.h.

References A, B, G, R, and r.


Member Function Documentation

void NLMISC::CBGRA::blendFromui CBGRA &    c0,
CBGRA &    c1,
uint    factor
 

Blend two colors.

Parameters:
c0  Color 0.
c1  Color 1.
factor  Blend factor. 0~256. 0 return c0 and 256 return c1.

Definition at line 596 of file rgba.cpp.

uint NLMISC::CBGRA::getPacked   const [inline]
 

Return a packed pixel.

Definition at line 390 of file rgba.h.

References A, B, G, and R.

Referenced by operator<.

NLMISC::CBGRA::operator CRGBA   [inline]
 

Cast operator to CRGBA.

Definition at line 382 of file rgba.h.

References A, B, G, and R.

bool NLMISC::CBGRA::operator< const CBGRA &    c const [inline]
 

Comparison operator.

Definition at line 398 of file rgba.h.

References CBGRA, and getPacked.

bool NLMISC::CBGRA::operator== const CBGRA &    c const [inline]
 

Equality operator.

Definition at line 406 of file rgba.h.

References A, B, CBGRA, G, and R.

void NLMISC::CBGRA::serial class NLMISC::IStream   f
 

Serialisation.

Parameters:
f  Stream used for serialisation.

Definition at line 580 of file rgba.cpp.

References A, B, G, and R.

void NLMISC::CBGRA::set uint8    r,
uint8    g,
uint8    b,
uint8    a
 

Set colors.

Parameters:
r  Red componant.
g  Green componant.
b  Blue componant.
a  Alpha componant.

Definition at line 588 of file rgba.cpp.

References A, B, G, R, and r.


Member Data Documentation

uint8 NLMISC::CBGRA::A
 

Alpha componant.

Definition at line 441 of file rgba.h.

Referenced by CBGRA, getPacked, operator CRGBA, operator==, serial, and set.

uint8 NLMISC::CBGRA::B
 

Blue componant.

Definition at line 439 of file rgba.h.

Referenced by CBGRA, getPacked, operator CRGBA, operator==, serial, and set.

uint8 NLMISC::CBGRA::G
 

Green componant.

Definition at line 437 of file rgba.h.

Referenced by CBGRA, getPacked, operator CRGBA, operator==, serial, and set.

uint8 NLMISC::CBGRA::R
 

Red componant.

Definition at line 435 of file rgba.h.

Referenced by CBGRA, getPacked, operator CRGBA, operator==, serial, and set.


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