#include <curve.h>


Public Member Functions | |
| a2dVertexListCurve (a2dVertexList *points) | |
| a2dVertexListCurve (const a2dVertexListCurve &other, CloneOptions options) | |
| virtual a2dObject * | Clone (CloneOptions options) const |
| This is here so that this class cannot be used directly. | |
| virtual bool | GetXyAtSweep (double sweepValue, a2dPoint2D &point) const |
| calculate Y at X | |
| a2dVertexList * | GetPoints () |
| return the array of points. | |
| int | GetNumberOfPoints () |
| return the number of point in the curve | |
| void | AddPoint (const a2dPoint2D &P, int index=-1, bool afterinversion=true) |
| Append a new point. | |
| void | AddPoint (double x, double y, int index=-1, bool afterinversion=true) |
| Append a new point, which is owned by this class now. | |
| void | RemovePoint (double &x, double &y, int index=-1, bool transformed=true) |
| removes point at index | |
| bool | EliminateMatrix () |
| reduce matrix to identity without replacing object | |
| void | SetPosXYPoint (int index, double x, double y, bool afterinversion=true) |
| modify point at index to x,y | |
| void | GetPosXYPoint (int index, double &x, double &y, bool transform=true) |
| get point x and y at index | |
| void | SetSpline (bool on) |
| set to true, the polygon will be drawn as a spline | |
| bool | GetSpline () |
| Get the polygon spline setting. | |
| bool | PointOnCurve (const a2dPoint2D &P, double marge) |
| test if a point is on the curve. | |
| void | SetRenderMode (wxUint32 rendermode) |
| sets which parts or how the curve is rendered | |
| int | GetRenderMode () |
| get which parts or how the curve is rendered | |
| void | SetEditMode (wxUint32 editmode) |
| sets how the curve is edited | |
| int | GetEditMode () |
| get how the curve is edited | |
Protected Member Functions | |
| bool | DoStartEdit (wxUint16 editmode, wxEditStyle editstyle) |
| only used for editable objects and under control of a editing tool. | |
| void | OnHandleEvent (a2dHandleMouseEvent &event) |
| called if a mouse event occured on a child object, that is a handle | |
| void | OnEnterObject (a2dCanvasObjectMouseEvent &event) |
| called when the mouse enters the object | |
| void | OnLeaveObject (a2dCanvasObjectMouseEvent &event) |
| called when the mouse leaves the object | |
| void | OnCanvasObjectMouseEvent (a2dCanvasObjectMouseEvent &event) |
| default handler for mouse events, sent to the object from the a2dCanvasView. | |
| virtual void | DoSave (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite) |
| write object specific CVGL data | |
| void | DoLoad (wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts) |
| load object specific CVG data | |
| a2dBoundingBox | DoGetUnTransformedBbox (a2dBboxFlags flags=a2dCANOBJ_BBOX_NON) const |
| bool | DoUpdate (UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox) |
| Update derived Object specific things ( mainly boundingbox). | |
| void | DoRender (a2dIterC &ic, OVERLAP clipparent) |
| render derived object | |
| bool | DoIsHitWorld (a2dIterC &ic, a2dHitEvent &hitEvent) |
| Does hit test on the object (exclusif child objects). | |
Protected Attributes | |
| bool | m_spline |
| int | m_rendermode |
| int | m_editmode |
| a2dVertexList * | m_lpoints |
Use this for time running curves, since vertexes can be added and removed at both sides quickly.
Definition at line 1037 of file curve.h.
| void a2dVertexListCurve::RemovePoint | ( | double & | x, | |
| double & | y, | |||
| int | index = -1, |
|||
| bool | transformed = true | |||
| ) |
| void a2dVertexListCurve::SetPosXYPoint | ( | int | index, | |
| double | x, | |||
| double | y, | |||
| bool | afterinversion = true | |||
| ) |
modify point at index to x,y
Set the coordinates of the point at index to x,y.
| index | the index of the point to change | |
| x | new x for the point | |
| y | new y for the point | |
| afterinversion | if true the input x,y or first inverted with the local matrix of the object. The inverted values are used to set the point. |
| void a2dVertexListCurve::GetPosXYPoint | ( | int | index, | |
| double & | x, | |||
| double & | y, | |||
| bool | transform = true | |||
| ) |
| void a2dVertexListCurve::SetRenderMode | ( | wxUint32 | rendermode | ) | [inline] |
| void a2dVertexListCurve::SetEditMode | ( | wxUint32 | editmode | ) | [inline] |
| bool a2dVertexListCurve::DoStartEdit | ( | wxUint16 | editmode, | |
| wxEditStyle | editstyle | |||
| ) | [protected, virtual] |
only used for editable objects and under control of a editing tool.
If object is editable this function is used to initialize the object for editing. In general this means adding editing handles to the child list. In the event handling of the object those handles are hit and moved, the object itself is changed accordingly.
Reimplemented from a2dCanvasObject.
| void a2dVertexListCurve::OnCanvasObjectMouseEvent | ( | a2dCanvasObjectMouseEvent & | event | ) | [protected] |
default handler for mouse events, sent to the object from the a2dCanvasView.
Mouse events are sent to the object when the mouse pointer is hiting the object. The default is used when the object is in edit mode. Else it will detect if the special object tip property named __OBJECTTIP__ is available, and switch it on or off when the mouse eneter or leaves the object.
&& m_flags.m_subEditAsChild )
Reimplemented from a2dCanvasObject.
| void a2dVertexListCurve::DoLoad | ( | wxObject * | parent, | |
| a2dIOHandlerXmlSerIn & | parser, | |||
| a2dXmlSer_flag | xmlparts | |||
| ) | [protected, virtual] |
| bool a2dVertexListCurve::DoUpdate | ( | UpdateMode | mode, | |
| const a2dBoundingBox & | childbox, | |||
| const a2dBoundingBox & | clipbox, | |||
| const a2dBoundingBox & | propbox | |||
| ) | [protected, virtual] |
Update derived Object specific things ( mainly boundingbox).
Calculates the boundingbox of the object (exclusif base class child objects but with other nested objects).
| mode | way to update the objects | |
| childbox | size of children boundingbox | |
| clipbox | clip to this | |
| propbox | size of properties boundingbox |
force may or may not have direct influence on the object itself, if this function is called directly for some reason (e.g from derived objects), you must invalidate the boudingbox yourself. GetDrawerBox()->SetValid( false );
Reimplemented from a2dCurveObject.
render derived object
if the object has sub objects (apart from the childobject which are handled here), those subobject most rendered by iterating on layer when needed/wanted, simular to child objects. We do not iterate here, since that is only needed if indeed there or subobjects. This will be know in a "wxDerivedCanvasObject DoRender".
SO parent objects that call this function, must:
Reimplemented from a2dCanvasObject.
| bool a2dVertexListCurve::DoIsHitWorld | ( | a2dIterC & | ic, | |
| a2dHitEvent & | hitEvent | |||
| ) | [protected, virtual] |
Does hit test on the object (exclusif child objects).
DoIsHitWorld() should return the way the object is hit by filling a2dHitEvent::m_how with the correct info.
| ic | iterative context ( e.g. current transform WITH the local transform applied ) | |
| hitEvent | stores hit information |
Reimplemented from a2dCanvasObject.