sfColor Class Reference

#include <Color.hpp>

List of all members.

Public Member Functions

 sfColor ()
 sfColor (sfUint32 ColorRGBA)
 sfColor (sfUint8 R, sfUint8 G, sfUint8 B, sfUint8 A=255)
sfUint32 ToRGBA () const

Public Attributes

sfUint8 Red
 Red component.
sfUint8 Green
 Green component.
sfUint8 Blue
 Blue component.
sfUint8 Alpha
 Alpha (transparency) component.

Static Public Attributes

static const sfColor Black
static const sfColor White


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 41 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 54 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 67 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 80 of file Color.cpp.

References Alpha, Blue, Green, and Red.

Referenced by sfImage::Create(), sfImage::CreateMaskFromColor(), sfImage::Resize(), and sfImage::SetPixel().


The documentation for this class was generated from the following files:
Generated for SFML by  doxygen 1.5.2