Blame view

src/ParamOutputImpl/Plot/TextLegendProperties.hh 1.16 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
/*
 * TextLegendProperties.hh
 *
 *  Created on: 24 sep. 2014
 *      Author: AKKA
 */

#ifndef TEXTLEGENDPROPERTIES_HH_
#define TEXTLEGENDPROPERTIES_HH_

#include <string>
#include <vector>
#include "Color.hh"
#include "Color.hh"
#include "Font.hh"

namespace plot
{
	typedef enum {POS_RIGHT, POS_LEFT, POS_TOP, POS_BOTTOM} TextLegendPosition;

	class TextLegendProperties
	{
	public:
		TextLegendProperties(void);
		virtual ~TextLegendProperties(void);

		void reset(void);

		void setText(const std::string& text);
		const std::string& getText() const;

		void setFont(Font font);
f6eaec4e   Benjamin Renard   Optimize plot ele...
33

fbe3c2bb   Benjamin Renard   First commit
34
35
		Font& getFont(void);

fbe3c2bb   Benjamin Renard   First commit
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
		void setPosition(TextLegendPosition position);
		TextLegendPosition getPosition(void);

		void setColor(const Color& color);
		Color& getColor();

		void setOffset(double offset);
		double getOffset(void);

		int getTextLinesNb (void);
		std::vector<std::string> getTextLines (void);

		bool isDrawn(void);

		void setDrawn(bool drawn);

fbe3c2bb   Benjamin Renard   First commit
52
53
54
55
56
57
		static const std::string DELIMITER;

	private:
		std::string 		_text;
		TextLegendPosition 	_position;
		Color 				_color;
f6eaec4e   Benjamin Renard   Optimize plot ele...
58
		Font _font;
fbe3c2bb   Benjamin Renard   First commit
59
60
61
62
63
64
65
66

		double				_offset;

		bool                _drawn;
	};
}

#endif /* TEXTLEGENDPROPERTIES_HH_ */