gKit2 light
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gKit
color.h
Go to the documentation of this file.
1
2
#ifndef _COLOR_H
3
#define _COLOR_H
4
5
8
11
13
struct
Color
14
{
16
Color
( ) : r(0.f), g(0.f), b(0.f), a(1.f) {}
17
explicit
Color
(
const
float
_r,
const
float
_g,
const
float
_b,
const
float
_a= 1.f ) : r(_r), g(_g), b(_b), a(_a) {}
18
explicit
Color
(
const
float
_value ) : r(_value), g(_value), b(_value), a(1.f) {}
19
21
Color
(
const
Color
& color,
const
float
alpha ) : r(color.r), g(color.g), b(color.b), a(alpha) {}
// remplace alpha.
22
23
float
power( )
const
;
24
float
max
( )
const
;
25
26
float
r, g, b, a;
27
};
28
30
Color
Black
( );
32
Color
White
( );
34
Color
Red
( );
36
Color
Green
( );
38
Color
Blue
( );
40
Color
Yellow
( );
41
42
Color
operator+ (
const
Color
& a,
const
Color
& b );
43
Color
operator- (
const
Color
& a,
const
Color
& b );
44
Color
operator- (
const
Color
& c );
45
Color
operator* (
const
Color
& a,
const
Color
& b );
46
Color
operator* (
const
Color
& c,
const
float
k );
47
Color
operator* (
const
float
k,
const
Color
& c );
48
Color
operator/ (
const
Color
& a,
const
Color
& b );
49
Color
operator/ (
const
float
k,
const
Color
& c );
50
Color
operator/ (
const
Color
& c,
const
float
k );
51
52
54
Color
srgb
(
const
Color
& color );
56
Color
linear
(
const
Color
& color );
57
58
Color
abs(
const
Color
& color );
59
61
#endif
Red
Color Red()
utilitaire. renvoie une couleur rouge.
Definition
color.cpp:28
Yellow
Color Yellow()
utilitaire. renvoie une couleur jaune.
Definition
color.cpp:43
Blue
Color Blue()
utilitaire. renvoie une couleur bleue.
Definition
color.cpp:38
Black
Color Black()
utilitaire. renvoie une couleur noire.
Definition
color.cpp:18
srgb
Color srgb(const Color &color)
transformation couleur : rgb lineaire vers srgb
Definition
color.cpp:61
Green
Color Green()
utilitaire. renvoie une couleur verte.
Definition
color.cpp:33
linear
Color linear(const Color &color)
transformation couleur : srgb vers rgb lineaire
Definition
color.cpp:67
White
Color White()
utilitaire. renvoie une couleur blanche.
Definition
color.cpp:23
max
Point max(const Point &a, const Point &b)
renvoie la plus grande composante de chaque point { max(a.x, b.x), max(a.y, b.y), max(a....
Definition
vec.cpp:35
Color
representation d'une couleur (rgba) transparente ou opaque.
Definition
color.h:14
Color::Color
Color(const Color &color, const float alpha)
cree une couleur avec les memes composantes que color, mais remplace sa composante alpha (color....
Definition
color.h:21
Color::Color
Color()
constructeur par defaut.
Definition
color.h:16
Generated on
for gKit2 light by
1.17.0