scifir-units
2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
Loading...
Searching...
No Matches
special_units
color.hpp
Go to the documentation of this file.
1
#ifndef SCIFIR_UNITS_SPECIAL_UNITS_COLOR_HPP_INCLUDED
2
#define SCIFIR_UNITS_SPECIAL_UNITS_COLOR_HPP_INCLUDED
3
4
#include <iostream>
5
#include <sstream>
6
7
using namespace
std;
8
9
namespace
scifir
10
{
11
class
color
12
{
13
public
:
14
color
();
15
color
(
int
,
int
,
int
,
int
= 255);
16
17
inline
const
int
&
get_red
()
const
18
{
19
return
red
;
20
}
21
22
inline
const
int
&
get_green
()
const
23
{
24
return
green
;
25
}
26
27
inline
const
int
&
get_blue
()
const
28
{
29
return
blue
;
30
}
31
32
inline
const
int
&
get_alpha
()
const
33
{
34
return
alpha
;
35
}
36
37
inline
bool
is_opaque
()
const
38
{
39
return
(
alpha
== 255);
40
}
41
42
inline
bool
is_transparent
()
const
43
{
44
return
(
alpha
< 255);
45
}
46
47
inline
bool
is_full_transparent
()
const
48
{
49
return
(
alpha
== 0);
50
}
51
52
private
:
53
int
red
;
54
int
blue
;
55
int
green
;
56
int
alpha
;
57
};
58
}
59
60
ostream&
operator <<
(ostream&,
const
scifir::color
&);
61
62
#endif
// SCIFIR_UNITS_SPECIAL_UNITS_COLOR_HPP_INCLUDED
scifir::color
Definition
color.hpp:12
scifir::color::get_green
const int & get_green() const
Definition
color.hpp:22
scifir::color::get_alpha
const int & get_alpha() const
Definition
color.hpp:32
scifir::color::is_full_transparent
bool is_full_transparent() const
Definition
color.hpp:47
scifir::color::get_blue
const int & get_blue() const
Definition
color.hpp:27
scifir::color::blue
int blue
Definition
color.hpp:54
scifir::color::color
color()
Definition
color.cpp:7
scifir::color::alpha
int alpha
Definition
color.hpp:56
scifir::color::get_red
const int & get_red() const
Definition
color.hpp:17
scifir::color::is_opaque
bool is_opaque() const
Definition
color.hpp:37
scifir::color::green
int green
Definition
color.hpp:55
scifir::color::red
int red
Definition
color.hpp:53
scifir::color::is_transparent
bool is_transparent() const
Definition
color.hpp:42
operator<<
ostream & operator<<(ostream &, const scifir::color &)
Definition
color.cpp:16
scifir
The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
Definition
address.cpp:6
Generated by
1.9.8