69 virtual void World2Curve(
double xw,
double yw,
double& xcurve,
double& ycurve )
const;
79 virtual void Curve2World(
double xcurve,
double ycurve,
double& xw,
double& yw )
const;
114 a2dCURVES_RENDER_NO_POINTS = 0x0001,
115 a2dCURVES_RENDER_NORMAL = 0x0002,
116 a2dCURVES_RENDER_FILL_LINE = 0x0004,
117 a2dCURVES_RENDER_FILL = 0x0008,
118 a2dCURVES_RENDER_3D = 0x0010,
119 a2dCURVES_RENDER_DEFAULT = a2dCURVES_RENDER_NORMAL
125 a2dCURVES_EDIT_NORMAL = 0x0001,
126 a2dCURVES_EDIT_FIXED_X = 0x0002,
127 a2dCURVES_EDIT_FIXED_Y = 0x0004,
128 a2dCURVES_EDIT_ALLOW_ADD = 0x0008,
129 a2dCURVES_EDIT_DEFAULT = a2dCURVES_EDIT_NORMAL
139 void SetBoundaries(
double xmin,
double ymin,
double xmax,
double ymax );
159 virtual double GetBoundaryMinX();
165 virtual double GetBoundaryMaxX();
171 virtual double GetBoundaryMinY();
177 virtual double GetBoundaryMaxY();
187 virtual bool GetXyAtSweep(
double sweepValue,
a2dPoint2D& point )
const = 0;
191 void SetPointFillList(
const a2dlist< a2dFill >& fillList ) { m_pointsFill = fillList; }
193 bool IsHighlighted()
const {
return m_highlightmode == 1; }
195 void SetRenderLogicalFunction( wxRasterOperationMode logFunction ) { m_logFunction = logFunction;
SetPending(
true );}
197 wxRasterOperationMode GetRenderLogicalFunction() {
return m_logFunction; }
204 #if wxART2D_USE_CVGIO
208 #endif //wxART2D_USE_CVGIO
211 wxRasterOperationMode m_logFunction;
226 #if defined(WXART2D_USINGDLL)
246 void SetXstep(
double xstep ) { m_xstep = xstep;
SetPending(
true ); }
248 virtual bool GetXyAtSweep(
double sweepValue,
a2dPoint2D& point )
const;
256 #if wxART2D_USE_CVGIO
260 #endif //wxART2D_USE_CVGIO
280 #if wxART2D_USE_CANEXTOBJ
282 #endif //wxART2D_USE_CANEXTOBJ
296 DECLARE_EVENT_TABLE()
309 virtual bool GetXyAtSweep(
double sweepValue,
a2dPoint2D& point )
const;
327 void SetPosXYPoint(
int index,
double x,
double y );
335 void GetPosXYPoint(
int index,
double& x,
double& y );
344 void GetPosXYPointWorld(
int index,
double& x,
double& y,
bool transform );
352 void RemovePoint(
double& x,
double& y ,
int index = -1 );
361 void RemovePointWorld(
double& x,
double& y ,
int index = -1,
bool transformed =
true );
373 void AddPoint(
const a2dPoint2D& P,
int index = -1 );
376 void AddPoint(
double x,
double y,
int index = -1 );
384 void Alloc(
size_t count ) { m_points->reserve( count ); }
390 bool IsEmpty()
const {
return m_points->empty(); }
414 void RemoveAt(
size_t index ) { m_points->RemoveAt( index ); }
417 bool PointOnCurve(
const a2dPoint2D& P,
double marge );
443 bool DoStartEdit( wxUint16 editmode,
wxEditStyle editstyle );
452 #if wxART2D_USE_CVGIO
456 #endif //wxART2D_USE_CVGIO
468 wxUint32 m_rendermode, m_editmode;
494 WX_DECLARE_OBJARRAY_WITH_DECL(
a2dSweepPoint, a2dSweepPointArray,
class A2DCURVESDLLEXP );
503 DECLARE_EVENT_TABLE()
516 virtual bool GetXyAtSweep(
double sweepValue,
a2dPoint2D& point )
const;
534 void SetPosXYPoint(
int index,
double x,
double y );
542 void GetPosXYPoint(
int index,
double& x,
double& y );
551 void GetPosXYPointWorld(
int index,
double& x,
double& y,
bool transform );
559 void RemovePoint(
double& x,
double& y ,
int index = -1 );
568 void RemovePointWorld(
double& x,
double& y ,
int index = -1,
bool transformed =
true );
580 void AddPoint(
double sweep,
const a2dPoint2D& P );
583 void AddPoint(
double sweep,
double x,
double y );
591 void Alloc(
size_t count ) { m_points->Alloc( count ); }
609 bool IsEmpty()
const {
return m_points->IsEmpty(); }
625 void RemoveAt(
size_t index ) { m_points->RemoveAt( index ); }
635 bool PointOnCurve(
const a2dPoint2D& P,
double marge );
661 bool DoStartEdit( wxUint16 editmode,
wxEditStyle editstyle );
670 #if wxART2D_USE_CVGIO
674 #endif //wxART2D_USE_CVGIO
686 wxUint32 m_rendermode, m_editmode;
688 a2dSweepPointArray* m_points;
695 #if defined(WXART2D_USINGDLL)
705 DECLARE_EVENT_TABLE()
718 virtual bool GetXyAtSweep(
double sweepValue,
a2dPoint2D& point )
const;
739 void SetPosXYPoint(
int index,
double sweep,
double y,
bool upper );
747 void GetPosXYPoint(
int index,
double& sweep,
double& y,
bool upper );
756 void GetPosXYPointWorld(
int index,
double& sweep,
double& y,
bool upper,
bool transform );
764 void RemovePoint(
double& sweep,
double& y ,
bool upper,
int index = -1 );
773 void RemovePointWorld(
double& sweep,
double& y ,
bool upper,
int index = -1,
bool transformed =
true );
785 void AddPoint(
double sweep,
const a2dPoint2D& P );
788 void AddPoint(
double sweep,
double x,
double y );
796 void Alloc(
size_t count ) { m_points->Alloc( count ); }
814 bool IsEmpty()
const {
return m_points->IsEmpty(); }
830 void RemoveAt(
size_t index ) { m_points->RemoveAt( index ); }
840 bool PointOnCurve(
const a2dPoint2D& P,
double marge );
866 bool DoStartEdit( wxUint16 editmode,
wxEditStyle editstyle );
868 void SyncHandlesWithLineSegments();
877 #if wxART2D_USE_CVGIO
881 #endif //wxART2D_USE_CVGIO
893 wxUint32 m_rendermode, m_editmode;
895 a2dSweepPointArray* m_points;
905 #if defined(WXART2D_USINGDLL)
943 unsigned int GetIndex() {
return m_index; }
948 unsigned int m_index;
953 #if defined(WXART2D_USINGDLL)
970 a2dBAR_RENDER_NO_POINTS = 0x0001,
971 a2dBAR_RENDER_NORMAL = 0x0002,
972 a2dBAR_RENDER_3D = 0x0004,
973 a2dBAR_RENDER_LINE = 0x0008,
974 a2dBAR_RENDER_DEFAULT = a2dCURVES_RENDER_NORMAL
985 void SetBarWidth(
double barwidth ) { m_barwidth = barwidth; }
987 double GetBarWidth() {
return m_barwidth; }
989 double GetExtrudeDepth() {
return m_depth; }
990 double GetExtrudeAngle() {
return wxRadToDeg( m_angle3d ); }
992 void SetExtrudeDepth(
double depth ) { m_depth = depth;
SetPending(
true ); }
993 void SetExtrudeAngle(
double angle3d ) { m_angle3d =
wxDegToRad( angle3d );
SetPending(
true ); }
995 void SetExtrudeFill(
const a2dFill& fill );
997 const a2dFill& GetExtrudeFill() {
return m_extrudeFill; }
1007 #if wxART2D_USE_CVGIO
1011 #endif //wxART2D_USE_CVGIO
1038 DECLARE_EVENT_TABLE()
1051 virtual bool GetXyAtSweep(
double sweepValue,
a2dPoint2D& point )
const;
1060 void AddPoint(
const a2dPoint2D& P,
int index = -1,
bool afterinversion =
true );
1063 void AddPoint(
double x,
double y,
int index = -1,
bool afterinversion =
true );
1072 void RemovePoint(
double& x,
double& y ,
int index = -1,
bool transformed =
true );
1089 void SetPosXYPoint(
int index,
double x,
double y,
bool afterinversion =
true );
1098 void GetPosXYPoint(
int index,
double& x,
double& y,
bool transform =
true );
1107 bool PointOnCurve(
const a2dPoint2D& P,
double marge );
1133 bool DoStartEdit( wxUint16 editmode,
wxEditStyle editstyle );
1142 #if wxART2D_USE_CVGIO
1146 #endif //wxART2D_USE_CVGIO
1158 int m_rendermode, m_editmode;
1174 DECLARE_EVENT_TABLE()
1187 virtual bool GetXyAtSweep(
double sweepValue,
a2dPoint2D& point )
const;
1202 void GetPosXYPointWorld(
int index,
double& x,
double& y,
bool transform );
1211 void RemovePointWorld(
double& x,
double& y ,
int index = -1,
bool transformed =
true );
1215 void AddPoint(
const a2dPoint2D& P,
int index = -1 );
1218 void AddPoint(
double x,
double y,
int index = -1 );
1226 void Alloc(
size_t count ) { m_points->reserve( count ); }
1232 bool IsEmpty()
const {
return m_points->empty(); }
1253 void RemoveAt(
size_t index ) { m_points->RemoveAt( index ); }
1270 bool DoStartEdit( wxUint16 editmode,
wxEditStyle editstyle );
1279 #if wxART2D_USE_CVGIO
1283 #endif //wxART2D_USE_CVGIO
1293 wxUint32 m_rendermode;
wxPoint2DDouble a2dPoint2D
this to define if coordinate numbers are integer or doubles
a2dVertexArray * GetPoints()
return the array of points.
a2dSweepPointArray * GetPoints()
return the array of points.
void SetSpline(bool on)
set to true, the polygon will be drawn as a spline
handle holds a pointer to a polygon/polyline segment
virtual bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
a2dHandle is used inside editing versions of a certain objects.
mouse event sent from a2dCanvasObject to itself
void SetSpline(bool on)
set to true, the polygon will be drawn as a spline
int GetEditMode()
get how the curve is edited
int GetNumberOfPoints()
return the number of point in the curve
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
int GetRenderMode()
get which parts or how the curve is rendered
void SetRenderMode(wxUint32 rendermode)
sets which parts or how the curve is rendered
class to map references to objects stored in XML, in order to make the connection later on...
void SetCurvesArea(a2dCurvesArea *curvesArea)
used for conversion of curve data to curvegroup area
Bars in a Curve represented by a number of vertexes.
Curve represented by a number of vertexes.
void SetSpline(bool on)
set to true, the polygon will be drawn as a spline
int GetEditMode()
get how the curve is edited
void SetEditMode(wxUint32 editmode)
sets how the curve is edited
void Alloc(size_t count)
Preallocates memory for a given number of array elements.
a2dSweepPointArray * GetPoints()
return the array of points.
void SetEditMode(wxUint32 editmode)
sets how the curve is edited
int GetRenderMode()
get which parts or how the curve is rendered
double wxDegToRad(double deg)
conversion from degrees to radians
void Shrink()
Frees all memory unused by the array.
void Clear()
This function does the same as Empty() and additionally frees the memory allocated to the array...
Input and output handler for the XmlSer format.
UpdateMode
Various mode flags for Update.
void RemoveAt(size_t index)
void RemoveAt(size_t index)
virtual void SetPending(bool pending)
set this object pending for update
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
int GetNumberOfPoints()
return the number of point in the curve
void Clear()
This function does the same as Empty() and additionally frees the memory allocated to the array...
void SetRenderMode(wxUint32 rendermode)
sets which parts or how the curve is rendered
a2dSweepPoint * Last() const
bool IsEmpty() const
Returns true if the array is empty, false otherwise.
virtual void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
vertex array of line and arc segments.
a2dCanvasObject is the base class for Canvas Objects.
a2dLineSegmentPtr Item(size_t index) const
Returns the point pointer at the given position in the array.
Object to plot a Curve defined by a Function in form of a string.
void RemoveAt(size_t index)
Removes a point from the array by index.
a2dLineSegmentPtr Last() const
Returns the last element in the array.
int GetNumberOfPoints()
return the number of point in the curve
vertex list of line and arc segments.
virtual void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
a2dCurveObject for objects needing to know its parent a2dCurvesArea.
void Insert(a2dSweepPoint *item, size_t n)
Curve represented by a number of vertexes.
Io handler to iterate through a a2dDocument.
void SetEditMode(wxUint32 editmode)
sets how the curve is edited
a2dSweepPoint * Item(size_t index) const
void SetRenderMode(wxUint32 rendermode)
sets which parts or how the curve is rendered
void SetMarkerUpLow(bool markerUpLow)
return of GetXyAtSweep() is upper side of curve if true, else low
a2dSweepPoint * operator[](size_t index) const
get i'th point
bool IsEmpty() const
Returns true if the array is empty, false otherwise.
a2dVertexArray * GetPoints()
return the array of points.
a2dLineSegmentPtr Last() const
Returns the last element in the array.
void SetEditMode(wxUint32 editmode)
sets how the curve is edited
void SetSpline(bool on)
set to true, the polygon will be drawn as a spline
bool IsEmpty() const
Returns true if the array is empty, false otherwise.
a2dBarRenderFlags
these flags define how curves are drawn
a2dCurveEditFlags
these flags define how (points on) curves can be moved/edited
bool m_markerUpLow
return of GetXyAtSweep() is upper side of curve if true, else low
double wxRadToDeg(double rad)
conversion from radians to degrees
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
general event sent from a2dHandle to its parent a2dCanvasObject
void Alloc(size_t count)
Preallocates memory for a given number of array elements.
void Clear()
This function does the same as Empty() and additionally frees the memory allocated to the array...
Input and output handler for the XmlSer format.
int GetRenderMode()
get which parts or how the curve is rendered
int GetEditMode()
get how the curve is edited
void RemoveAt(size_t index)
Removes a point from the array by index.
a2dCurveRenderFlags
these flags define how curves are drawn
int GetNumberOfPoints()
return the number of point in the curve
basic list class based on STL containers.
expression(s) evaluation based on a string.
int GetRenderMode()
get which parts or how the curve is rendered
void Alloc(size_t count)
Preallocates memory for a given number of array elements.
while iterating a a2dCanvasDocument, this holds the context.
Curve represented by a number of vertexes.
void Clear()
This function does the same as Empty() and additionally frees the memory allocated to the array...
void Insert(a2dSweepPoint *item, size_t n)
a2dBoundingBox m_clipdata
defines boundaries in which the curve will be calculated / displayed
void SetRenderMode(wxUint32 rendermode)
sets which parts or how the curve is rendered
void SetRenderMode(wxUint32 rendermode)
sets which parts or how the curve is rendered
int GetNumberOfPoints()
return the number of point in the curve
bool GetSpline()
Get the polygon spline setting.
a2dBoundingBox m_curveBox
defines boundaries in which the curve has points
a2dSweepPoint * Last() const
a2dSweepPoint * operator[](size_t index) const
get i'th point
bool m_arcMid
handle for middle point of arc
virtual bool EliminateMatrix()
reduce matrix to identity
a2dSweepPoint * Detach(size_t index)
a2dLineSegmentPtr Item(size_t index) const
Returns the point pointer at the given position in the array.
Curve represented by a number of vertexes.
bool IsEmpty() const
Returns true if the array is empty, false otherwise.
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
int GetRenderMode()
get which parts or how the curve is rendered
a2dVertexList * GetPoints()
return the array of points.
virtual a2dBoundingBox DoGetUnTransformedBbox(a2dBboxFlags flags=a2dCANOBJ_BBOX_NON) const
In derived object this should be overriden to calculate the boundingbox of the object without its chi...
a2dSweepPoint * Item(size_t index) const
virtual bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
a2dSweepPoint * Detach(size_t index)
This template class is for property ids with a known data type.
void Alloc(size_t count)
Preallocates memory for a given number of array elements.
Curve represented by a number of vertexes in a List.
void Shrink()
Frees all memory unused by the array.
bool GetSpline()
Get the polygon spline setting.
bool GetSpline()
Get the polygon spline setting.
CloneOptions
options for cloning
structure to give as parameter to member functions of a2dCanvasObject
int GetEditMode()
get how the curve is edited
bool GetSpline()
Get the polygon spline setting.
base class for curve area in a a2dCurvesAreaList, like used in a2dCanvasXYDisplayGroups ...
old a complex point at a sweep value
a2dLineSegmentPtr operator[](size_t index) const
get i'th point