Main Page
Namespaces
Classes
Files
File List
File Members
color.hpp
Go to the documentation of this file.
1
17
#ifndef COLOR_HPP
18
#define COLOR_HPP
19
20
#include <string>
21
22
namespace
cpe
23
{
24
26
typedef
unsigned
char
octet
;
27
32
class
color
33
{
34
public
:
35
36
// ********************************************* //
37
// ********************************************* //
38
// CONSTRUCTORS
39
// ********************************************* //
40
// ********************************************* //
41
43
color
();
45
color
(
octet
r
,
octet
g
,
octet
b
);
47
color
(
int
r,
int
g,
int
b);
48
49
50
51
// ********************************************* //
52
// ********************************************* //
53
// GET/SET
54
// ********************************************* //
55
// ********************************************* //
56
58
int
red
()
const
;
60
int
green
()
const
;
62
int
blue
()
const
;
63
65
octet
&
red
();
67
octet
&
green
();
69
octet
&
blue
();
70
71
// ********************************************* //
72
// ********************************************* //
73
// COMPUTATION
74
// ********************************************* //
75
// ********************************************* //
76
81
static
double
norm
(
const
color
& c1,
const
color
& c2);
82
83
84
// ********************************************* //
85
// ********************************************* //
86
// Conversion
87
// ********************************************* //
88
// ********************************************* //
89
91
std::string
to_string
()
const
;
92
93
private
:
94
96
octet
r
;
98
octet
g
;
100
octet
b
;
101
};
102
104
std::ostream&
operator<<
(std::ostream& stream,
const
color
& c);
105
}
106
107
#endif
tp_compression_video
src_tp
color.hpp
Generated on Mon Oct 15 2012 15:33:26 by
1.8.2