TextPlot.cc
1.23 KB
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
44
45
46
47
48
49
50
51
52
/*
* TextPlot.cc
*
* Created on: 01/07/2014
* Author: AKKA
*/
#include "TextPlot.hh"
namespace plot {
std::ostream& operator<<(std::ostream& out_, const TextPlot& lprop_){
out_ << "[TEXT_PLOT]" << std::endl;
out_ << "{"<<std::endl;
out_ << " text =" << lprop_._text << std::endl;
out_ << " x =" << lprop_._x << std::endl;
out_ << " y =" << lprop_._y << std::endl;
out_ << " angle =" << lprop_._angle << std::endl;
out_ << " align =" << lprop_._align << std::endl;
out_ << " " << lprop_._color << std::endl;
out_ << " " << lprop_._font << std::endl;
out_ << "}" << std::endl;
return out_;
}
/*
* Dumps properties for test.
*/
void TextPlot::dump(std::ostream& out_, std::string& prefix_){
out_ << prefix_ << "textPlot.text=" << _text << std::endl;
out_ << prefix_ << "textPlot.x =" << _x << std::endl;
out_ << prefix_ << "textPlot.y =" << _y << std::endl;
out_ << prefix_ << "textPlot.angle=" << _angle << std::endl;
out_ << prefix_ << "textPlot.align=" << _align << std::endl;
std::string subPrefix=prefix_+"textPlot.";
_color.dump(out_, subPrefix);
_font.dump(out_, subPrefix);
}
bool TextPlot::isDrawn(void)
{
return _drawn;
}
void TextPlot::setDrawn(bool drawn)
{
_drawn = drawn;
}
} /* namespace plot */