11 #ifndef DR2D_GPLT_API_HH 12 #define DR2D_GPLT_API_HH 22 using shape_and_color = std::pair<std::list<std::list<drawNS::Point2D> >,std::string>;
44 std::unique_ptr<std::thread> refresh_thread_ptr;
48 std::mutex gnuplot_pipe_mutex;
69 std::map<uint,shape_and_color> shapes;
70 void send2gnuplot(
const std::string & command_arg);
72 uint add2shape_list(
const std::list<std::list<Point2D> > & _list,
const std::string & color);
73 void draw_all_shapes();
74 std::string translate_color(
const std::string & color)
const;
75 void stop_drawing_proces();
91 APIGnuPlot2D(
double minX,
double maxX,
double minY,
double maxY,
int ref_time_ms = 0);
97 uint
draw_polygonal_chain(
const std::vector<Point2D> & points,
const std::string & color =
"black")
override;
APIGnuPlot2D()=delete
deleted non-parametric constructor to force using parametric.
uint draw_line(const Point2D &point1, const Point2D &point2, const std::string &color="black") override
draws line between 2 points
Definition: Dr2D_gnuplot_api.cpp:138
Implementation drawing 2D class using gnuplot Class implements proxy between gnuplot and C++ code...
Definition: Dr2D_gnuplot_api.hh:36
void erase_shape(uint id) override
draws polyhedron described by its apexs
Definition: Dr2D_gnuplot_api.cpp:154
Abstract interface for drawing class Abstract class used as interface for 2D drawing class implementa...
Definition: Draw2D_api_interface.hh:86
uint draw_polygonal_chain(const std::vector< Point2D > &points, const std::string &color="black") override
draws polygonal_chain between n points
Definition: Dr2D_gnuplot_api.cpp:146
void change_ref_time_ms(int ref_time_ms) override
change mode for ploting and/or time between auto-replots
Definition: Dr2D_gnuplot_api.cpp:177
void redraw() override
replot all shapes Replots all shapes, works only in negative refresh_rate_ms value mode...
Definition: Dr2D_gnuplot_api.cpp:187
~APIGnuPlot2D()
destructor, also stops gnuplot proces.
Definition: Dr2D_gnuplot_api.hh:95
Point in 2D Class represents point in 2D.
Definition: Draw2D_api_interface.hh:35
void change_shape_color(uint id, const std::string &color) override
change color of shape
Definition: Dr2D_gnuplot_api.cpp:161
Namespace for drawing tools - abstract interface and 2D point Namespace for drawing tools - abstract ...
Definition: Dr2D_gnuplot_api.hh:24