Draw2D
|
Abstract interface for drawing class Abstract class used as interface for 2D drawing class implementations. More...
#include <Draw2D_api_interface.hh>
Public Member Functions | |
Draw2DAPI (int ref_time_ms=0) | |
Constructor. More... | |
virtual uint | draw_line (const Point2D &point1, const Point2D &point2, const std::string &color="black")=0 |
draws line between 2 points More... | |
virtual uint | draw_polygonal_chain (const std::vector< Point2D > &points, const std::string &color="black")=0 |
draws polygonal_chain between n points More... | |
virtual void | erase_shape (uint id)=0 |
draws polyhedron described by its apexs More... | |
virtual void | change_shape_color (uint id, const std::string &color)=0 |
change color of shape More... | |
virtual void | change_ref_time_ms (int ref_time_ms)=0 |
change mode for ploting and/or time between auto-replots More... | |
virtual void | redraw ()=0 |
replot all shapes Replots all shapes, works only in negative refresh_rate_ms value mode. | |
Protected Attributes | |
int | refresh_rate_ms |
mode for ploting and time between auto-replots More... | |
Abstract interface for drawing class Abstract class used as interface for 2D drawing class implementations.
Colors are pre-defined or must be on form rgb:#rrggbb.
Pre defined colors: black, white, grey, blue, light-blue, red, green, yellow, orange, purple, as it was in default palette in Matlab 2014b.
Class have 3 modes, described in refresh_rate_ms variable.
|
inline |
Constructor.
ref_time_ms | - mode for plotting (negative, 0, positive, see refresh_rate_ms) and time between auto-replots (in miliseconds). |
|
pure virtual |
change mode for ploting and/or time between auto-replots
ref_time_ms | - mode for plotting (negative, 0, positive, see refresh_rate_ms) and time between auto-replots (in miliseconds). |
Implemented in drawNS::APIGnuPlot2D.
|
pure virtual |
change color of shape
id | - id of shape |
color | - color of line (see class description) |
Implemented in drawNS::APIGnuPlot2D.
|
pure virtual |
draws line between 2 points
point1 | - first point |
point2 | - second point |
color | - color of line (see class description) |
Implemented in drawNS::APIGnuPlot2D.
|
pure virtual |
draws polygonal_chain between n points
points | - vector of points |
color | - color of line (see class description) |
Implemented in drawNS::APIGnuPlot2D.
|
pure virtual |
draws polyhedron described by its apexs
points_map | - vector of points vectors. Every vector contains points describes one "layer" of polyhedron |
color | - color of line (see class description) |
Implemented in drawNS::APIGnuPlot2D.
|
protected |
mode for ploting and time between auto-replots
For negative vaules - auto-replots is off and replot can be done only by function redraw(), for 0 value - auto-replots is off and replot is done after every drawing functions, for positive values - auto-replots is on and value is time (in miliseconds) between replots, drawing functions and redraw() don't replot in this mode.