TextPlot.cc 1.23 KB
/*
 * 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 */