#include <mathplot.h>
Public Member Functions | |
mpPolygon (const wxString &layerName=wxT("")) | |
virtual | ~mpPolygon () |
void | setPoints (const std::vector< double > &points_xs, const std::vector< double > &points_ys, bool closedShape=true) |
An arbitrary polygon, descendant of mpMovableObject. Use "setPoints" to set the list of N points. This class also can draw non-closed polygons by passing the appropriate parameters to "setPoints". To draw a point-cloud, call "SetContinuity(false)".
mpPolygon::mpPolygon | ( | const wxString & | layerName = wxT("") |
) | [inline] |
Default constructor.
virtual mpPolygon::~mpPolygon | ( | ) | [inline, virtual] |
void mpPolygon::setPoints | ( | const std::vector< double > & | points_xs, | |
const std::vector< double > & | points_ys, | |||
bool | closedShape = true | |||
) |
Set the points in the polygon.
points_xs | The X coordinates of the points. | |
points_ys | The Y coordinates of the points. | |
closedShape | If set to true, an additional segment will be added from the last to the first point. |
References mpMovableObject::m_shape_xs, mpMovableObject::m_shape_ys, and mpMovableObject::ShapeUpdated().