sf::Color Class Reference

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

#include <Color.hpp>

List of all members.


Public Member Functions

 Color ()
 Default constructor.
 Color (Uint8 R, Uint8 G, Uint8 B, Uint8 A=255)
 Construct the color from its 4 RGBA components.
bool operator== (const Color &Other) const
 Compare two colors (for equality).
bool operator!= (const Color &Other) const
 Compare two colors (for difference).

Public Attributes

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

Static Public Attributes

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

Detailed Description

Color is an utility class for manipulating colors.

Definition at line 39 of file Color.hpp.


Constructor & Destructor Documentation

sf::Color::Color (  ) 

Default constructor.

sf::Color::Color ( Uint8  R,
Uint8  G,
Uint8  B,
Uint8  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)


Member Function Documentation

bool sf::Color::operator== ( const Color Other  )  const

Compare two colors (for equality).

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

bool sf::Color::operator!= ( const Color Other  )  const

Compare two colors (for difference).

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


Member Data Documentation

const Color sf::Color::Black [static]

Black predefined color.

Definition at line 83 of file Color.hpp.

const Color sf::Color::White [static]

White predefined color.

Definition at line 84 of file Color.hpp.

const Color sf::Color::Red [static]

Red predefined color.

Definition at line 85 of file Color.hpp.

const Color sf::Color::Green [static]

Green predefined color.

Definition at line 86 of file Color.hpp.

const Color sf::Color::Blue [static]

Blue predefined color.

Definition at line 87 of file Color.hpp.

const Color sf::Color::Yellow [static]

Yellow predefined color.

Definition at line 88 of file Color.hpp.

const Color sf::Color::Magenta [static]

Magenta predefined color.

Definition at line 89 of file Color.hpp.

const Color sf::Color::Cyan [static]

Cyan predefined color.

Definition at line 90 of file Color.hpp.

Uint8 sf::Color::r

Red component.

Definition at line 95 of file Color.hpp.

Uint8 sf::Color::g

Green component.

Definition at line 96 of file Color.hpp.

Uint8 sf::Color::b

Blue component.

Definition at line 97 of file Color.hpp.

Uint8 sf::Color::a

Alpha (transparency) component.

Definition at line 98 of file Color.hpp.


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