/* * LineProperties.cc * * Created on: Dec 9, 2013 * Author: amdadev */ #include "LineProperties.hh" namespace plot { std::ostream& operator<<(std::ostream& out_, const LineProperties& lprop_){ out_ << "[LINE PROPERTIES]" << std::endl; out_ << "{"<<std::endl; out_ << " type =" << static_cast<int>(lprop_._type) << std::endl; out_ << " style =" << static_cast<int>(lprop_._style) << std::endl; out_ << " width =" << lprop_._width << std::endl; out_ << " " << lprop_._color << std::endl; out_ << "}" << std::endl; return out_; } /* * Dumps properties for test. */ void LineProperties::dump(std::ostream& out_, std::string& prefix_){ out_ << "[LINE PROPERTIES]" << std::endl; out_ << prefix_ << "line.type=" << static_cast<int>(_type) << std::endl; out_ << prefix_ << "line.style=" << static_cast<int>(_style) << std::endl; out_ << prefix_ << "line.width=" << _width << std::endl; std::string subPrefix=prefix_+"line."; _color.dump(out_, subPrefix); } /** * @return Returns line style used by plplot. */ int getPlLineStyle (LineStyle pLineStyle) { // First line style in plplot is 1 and not 0. return static_cast<int>(pLineStyle) + 1; } } /* namespace plot */