sfColor Class Reference

sfColor is an utility class for manipulating colors More...

#include <Color.hpp>

List of all members.


Public Member Functions

 sfColor ()
 Default constructor.
 sfColor (sfUint32 ColorRGBA)
 Construct the color from a RGBA 32 bits integer.
 sfColor (sfUint8 R, sfUint8 G, sfUint8 B, sfUint8 A=255)
 Construct the color from its 4 RGBA components.
sfUint32 ToRGBA () const
 Get the RGBA representation of the color.
bool operator== (const sfColor &Other) const
 Compare two colors (for equality).
bool operator!= (const sfColor &Other) const
 Compare two colors (for difference).

Public Attributes

sfUint8 r
 Red component.
sfUint8 g
 Green component.
sfUint8 b
 Blue component.
sfUint8 a
 Alpha (transparency) component.

Static Public Attributes

static const sfColor Black
 Black predefined color.
static const sfColor White
 White predefined color.
static const sfColor Red
 Red predefined color.
static const sfColor Green
 Green predefined color.
static const sfColor Blue
 Blue predefined color.
static const sfColor Yellow
 Yellow predefined color.
static const sfColor Magenta
 Magenta predefined color.
static const sfColor Cyan
 Cyan predefined color.

Detailed Description

sfColor is an utility class for manipulating colors

Definition at line 37 of file Color.hpp.


Constructor & Destructor Documentation

sfColor::sfColor (  ) 

Default constructor.

Definition at line 47 of file Color.cpp.

sfColor::sfColor ( sfUint32  ColorRGBA  )  [explicit]

Construct the color from a RGBA 32 bits integer.

Parameters:
ColorRGBA : RGBA color

Definition at line 60 of file Color.cpp.

sfColor::sfColor ( sfUint8  R,
sfUint8  G,
sfUint8  B,
sfUint8  A = 255 
)

Construct the color from its 4 RGBA components.

Parameters:
R : Red component (0 .. 255)
G : Green component (0 .. 255)
B : Blue component (0 .. 255)
A : Alpha component (0 .. 255) (255 by default)

Definition at line 73 of file Color.cpp.


Member Function Documentation

sfUint32 sfColor::ToRGBA (  )  const

Get the RGBA representation of the color.

Returns:
32 bits integer representing the color in RGBA

Definition at line 86 of file Color.cpp.

bool sfColor::operator== ( const sfColor Other  )  const

Compare two colors (for equality).

Parameters:
Other : Color to compare
Returns:
True if colors are equal

Definition at line 95 of file Color.cpp.

bool sfColor::operator!= ( const sfColor Other  )  const

Compare two colors (for difference).

Parameters:
Other : Color to compare
Returns:
True if colors are different

Definition at line 104 of file Color.cpp.


Member Data Documentation

const sfColor sfColor::Black [static]

Black predefined color.

Definition at line 97 of file Color.hpp.

const sfColor sfColor::White [static]

White predefined color.

Definition at line 98 of file Color.hpp.

const sfColor sfColor::Red [static]

Red predefined color.

Definition at line 99 of file Color.hpp.

const sfColor sfColor::Green [static]

Green predefined color.

Definition at line 100 of file Color.hpp.

const sfColor sfColor::Blue [static]

Blue predefined color.

Definition at line 101 of file Color.hpp.

const sfColor sfColor::Yellow [static]

Yellow predefined color.

Definition at line 102 of file Color.hpp.

const sfColor sfColor::Magenta [static]

Magenta predefined color.

Definition at line 103 of file Color.hpp.

const sfColor sfColor::Cyan [static]

Cyan predefined color.

Definition at line 104 of file Color.hpp.

sfUint8 sfColor::r

Red component.

Definition at line 109 of file Color.hpp.

sfUint8 sfColor::g

Green component.

Definition at line 110 of file Color.hpp.

sfUint8 sfColor::b

Blue component.

Definition at line 111 of file Color.hpp.

sfUint8 sfColor::a

Alpha (transparency) component.

Definition at line 112 of file Color.hpp.


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