#include <rs_polyline.h>
Inheritance diagram for RS_Polyline:

Public Member Functions | |
| RS_Polyline (RS_EntityContainer *parent=NULL) | |
| Constructor. | |
| RS_Polyline (RS_EntityContainer *parent, const RS_PolylineData &d) | |
| Constructor. | |
| virtual | ~RS_Polyline () |
| Destructor. | |
| virtual RS_Entity * | clone () |
| virtual RS2::EntityType | rtti () const |
| RS_PolylineData | getData () const |
| void | setStartpoint (RS_Vector &v) |
| sets a new start point of the polyline | |
| RS_Vector | getStartpoint () |
| void | setEndpoint (RS_Vector &v) |
| sets a new end point of the polyline | |
| RS_Vector | getEndpoint () |
| double | getClosingBulge () |
| void | updateEndpoints () |
| Sets the polylines start and endpoint to match the first and last vertex. | |
| bool | isClosed () const |
| void | setClosed (bool cl) |
| bool | validate () |
| Validates the polyline. | |
| virtual RS_VectorSolutions | getRefPoints () |
| Adds a segment to the polyline. | |
| virtual RS_Vector | getNearestRef (const RS_Vector &coord, double *dist=NULL) |
| Must be overwritten to get the nearest reference point for this entity. | |
| virtual RS_Vector | getNearestSelectedRef (const RS_Vector &coord, double *dist=NULL) |
| Gets the nearest reference point of this entity if it is selected. | |
| virtual RS_Entity * | addVertex (const RS_Vector &v, double bulge=0.0, bool prepend=false) |
| Adds a vertex from the endpoint of the last segment or from the startpoint of the first segment to 'v' or sets the startpoint to the point 'v'. | |
| virtual void | setNextBulge (double bulge) |
| virtual void | addEntity (RS_Entity *entity) |
| Reimplementation of the addEntity method for a normal container. | |
| virtual void | removeLastVertex () |
| Removes the last vertex of this polyline. | |
| virtual void | endPolyline () |
| Ends polyline and adds the last entity if the polyline is closed. | |
| virtual bool | optimizeContours () |
| Overrides the implementation of RS_EntityContainer. | |
| virtual void | move (const RS_Vector &offset) |
| Implementations must move the entity by the given vector. | |
| virtual void | rotate (const RS_Vector ¢er, double angle) |
| Implementations must rotate the entity by the given angle around the given center. | |
| virtual void | scale (const RS_Vector ¢er, const RS_Vector &factor) |
| Implementations must scale the entity by the given factors. | |
| virtual void | mirror (const RS_Vector &axisPoint1, const RS_Vector &axisPoint2) |
| Implementations must mirror the entity by the given axis. | |
| virtual void | moveRef (const RS_Vector &ref, const RS_Vector &offset) |
| Implementations must drag the reference point(s) of all (sub-)entities that are very close to ref by offset. | |
| virtual void | stretch (const RS_Vector &firstCorner, const RS_Vector &secondCorner, const RS_Vector &offset) |
| Implementations must stretch the given range of the entity by the given offset. | |
| virtual void | draw (RS_Painter *painter, RS_GraphicView *view, double patternOffset=0.0) |
| Slightly optimized drawing for polylines. | |
Protected Member Functions | |
| virtual RS_Entity * | createVertex (const RS_Vector &v, double bulge=0.0, bool prepend=false) |
| Creates a vertex from the endpoint of the last element or sets the startpoint to the point 'v'. | |
Protected Attributes | |
| RS_PolylineData | data |
| RS_Entity * | closingEntity |
| double | nextBulge |
|
||||||||||||
|
Constructor.
|
|
|
Reimplementation of the addEntity method for a normal container. This reimplementation deletes the given entity! To add entities use addVertex() or addSegment() instead. Reimplemented from RS_EntityContainer. |
|
||||||||||||||||
|
Adds a vertex from the endpoint of the last segment or from the startpoint of the first segment to 'v' or sets the startpoint to the point 'v'. The very first vertex added with this method is the startpoint.
|
|
||||||||||||||||
|
Creates a vertex from the endpoint of the last element or sets the startpoint to the point 'v'. The very first vertex added is the starting point.
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Must be overwritten to get the nearest reference point for this entity.
Reimplemented from RS_EntityContainer. |
|
||||||||||||
|
Gets the nearest reference point of this entity if it is selected. Containers re-implement this method to return the nearest reference point of a selected sub entity.
Reimplemented from RS_EntityContainer. |
|
|
|
|
|
|
|
|
Overrides the implementation of RS_EntityContainer. Does nothing, since polylines are already 'optimized' by definition.
Reimplemented from RS_EntityContainer. |
|
|
Reimplemented from RS_EntityContainer. |
|
||||||||||||||||
|
Implementations must stretch the given range of the entity by the given offset. This default implementation moves the whole entity if it is completely inside the given range. Reimplemented from RS_EntityContainer. |
|
|
Validates the polyline.
|
1.4.4