Color.h File Reference

#include <SFML/Config.h>

Go to the source code of this file.


Data Structures

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

Functions

CSFML_API sfColor sfColor_FromRGB (sfUint8 R, sfUint8 G, sfUint8 B)
 Construct a color from its 3 RGB components.
CSFML_API sfColor sfColor_FromRGBA (sfUint8 R, sfUint8 G, sfUint8 B, sfUint8 A)
 Construct a color from its 4 RGBA components.
CSFML_API sfColor sfColor_Add (sfColor Color1, sfColor Color2)
 Add two colors.
CSFML_API sfColor sfColor_Modulate (sfColor Color1, sfColor Color2)
 Modulate two colors.

Variables

CSFML_API sfColor sfBlack
 Define some common colors.
CSFML_API sfColor sfWhite
CSFML_API sfColor sfRed
CSFML_API sfColor sfGreen
CSFML_API sfColor sfBlue
CSFML_API sfColor sfYellow
CSFML_API sfColor sfMagenta
CSFML_API sfColor sfCyan

Function Documentation

CSFML_API sfColor sfColor_Add ( sfColor  Color1,
sfColor  Color2 
)

Add two colors.

Parameters:
Color1 : First color
Color2 : Second color
Returns:
Component-wise saturated addition of the two colors

CSFML_API sfColor sfColor_FromRGB ( sfUint8  R,
sfUint8  G,
sfUint8  B 
)

Construct a color from its 3 RGB components.

Parameters:
R : Red component (0 .. 255)
G : Green component (0 .. 255)
B : Blue component (0 .. 255)
Returns:
sfColor constructed from the components

CSFML_API sfColor sfColor_FromRGBA ( sfUint8  R,
sfUint8  G,
sfUint8  B,
sfUint8  A 
)

Construct a 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)
Returns:
sfColor constructed from the components

CSFML_API sfColor sfColor_Modulate ( sfColor  Color1,
sfColor  Color2 
)

Modulate two colors.

Parameters:
Color1 : First color
Color2 : Second color
Returns:
Component-wise multiplication of the two colors


Variable Documentation

CSFML_API sfColor sfBlack

Define some common colors.

Definition at line 49 of file Color.h.

CSFML_API sfColor sfBlue

Definition at line 53 of file Color.h.

CSFML_API sfColor sfCyan

Definition at line 56 of file Color.h.

CSFML_API sfColor sfGreen

Definition at line 52 of file Color.h.

CSFML_API sfColor sfMagenta

Definition at line 55 of file Color.h.

CSFML_API sfColor sfRed

Definition at line 51 of file Color.h.

CSFML_API sfColor sfWhite

Definition at line 50 of file Color.h.

CSFML_API sfColor sfYellow

Definition at line 54 of file Color.h.