Blame view

src/ParamOutputImpl/Plot/Color.cc 1.12 KB
fbe3c2bb   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 * Color.cc
 *
 *  Created on: 29 oct. 2013
 *      Author: CS
 */

#include "Color.hh"
#include "DefaultPlotConfiguration.hh"
#include "ColormapManager.hh"

namespace plot {

Color::Color() :
		_red(-1), _green(-1), _blue(-1), _colorMapIndex(-1), _colorIndex(-1) {
}

Color::Color(int red, int green, int blue) :
		_red(red), _green(green), _blue(blue), _colorMapIndex(-1), _colorIndex(
				-1) {
}

Color::Color(int colorMapIndex, int colorIndex) :
		_red(-1), _green(-1), _blue(-1), _colorMapIndex(colorMapIndex), _colorIndex(
				colorIndex) {
}

Color::Color(const Color& color) :
		_red(color._red), _green(color._green), _blue(color._blue), _colorMapIndex(
				color._colorMapIndex), _colorIndex(color._colorIndex) {
}

std::ostream& operator <<(std::ostream& out, const Color& color) {
	out << "[COLOR]" << std::endl;
	out << "color.red=" << color._red << std::endl;
	out << "color.green=" << color._green << std::endl;
	out << "color.blue=" << color._blue << std::endl;
	out << "color.mapindex=" << color._colorMapIndex << std::endl;
	out << "color.index=" << color._colorIndex << std::endl;
	return out;
}

} /* namespace plot */