wxShapeFramework  1.13.0 beta
wxSFCurveShape Class Reference

Interpolation line shape. The class extends wxSFLineShape class and allows user to create curved connection line. More...

#include <CurveShape.h>

Inheritance diagram for wxSFCurveShape:
Collaboration diagram for wxSFCurveShape:

List of all members.

Public Member Functions

 XS_DECLARE_CLONABLE_CLASS (wxSFCurveShape)
 wxSFCurveShape ()
 Default constructor.
 wxSFCurveShape (long src, long trg, const wxXS::RealPointList &path, wxSFDiagramManager *manager)
 User constructor.
 wxSFCurveShape (const wxSFCurveShape &obj)
 Copy constructor.
virtual ~wxSFCurveShape ()
 Destructor.
virtual wxRect GetBoundingBox ()
 Get line's bounding box. The function can be overrided if neccessary.
wxRealPoint GetPoint (size_t segment, double offset)
 Get a line point laying on the given line segment and shifted from the beggining of the segment by given offset.

Protected Member Functions

virtual void DrawCompleteLine (wxDC &dc)
 Internal function used for drawing of completed line shape.

Private Member Functions

void GetSegmentQuaternion (size_t segment, wxRealPoint &A, wxRealPoint &B, wxRealPoint &C, wxRealPoint &D)
 Auxiliary drawing function.
void Catmul_Rom_Kubika (const wxRealPoint &A, const wxRealPoint &B, const wxRealPoint &C, const wxRealPoint &D, wxDC &dc)
 Auxiliary drawing function.
wxRealPoint Coord_Catmul_Rom_Kubika (const wxRealPoint &p1, const wxRealPoint &p2, const wxRealPoint &p3, const wxRealPoint &p4, double t)
 Auxiliary drawing function.

Detailed Description

Interpolation line shape. The class extends wxSFLineShape class and allows user to create curved connection line.


Constructor & Destructor Documentation

Default constructor.

wxSFCurveShape::wxSFCurveShape ( long  src,
long  trg,
const wxXS::RealPointList &  path,
wxSFDiagramManager manager 
)

User constructor.

Parameters:
srcID of the source shape
trgID of the target shape
pathArray of line's control points
managerParent parent diagram manager

Copy constructor.

Parameters:
objReference to the source object
virtual wxSFCurveShape::~wxSFCurveShape ( ) [virtual]

Destructor.


Member Function Documentation

void wxSFCurveShape::Catmul_Rom_Kubika ( const wxRealPoint &  A,
const wxRealPoint &  B,
const wxRealPoint &  C,
const wxRealPoint &  D,
wxDC &  dc 
) [private]

Auxiliary drawing function.

wxRealPoint wxSFCurveShape::Coord_Catmul_Rom_Kubika ( const wxRealPoint &  p1,
const wxRealPoint &  p2,
const wxRealPoint &  p3,
const wxRealPoint &  p4,
double  t 
) [private]

Auxiliary drawing function.

virtual void wxSFCurveShape::DrawCompleteLine ( wxDC &  dc) [protected, virtual]

Internal function used for drawing of completed line shape.

Parameters:
dcRefernce of the device context where the shape will be darwn to

Reimplemented from wxSFLineShape.

virtual wxRect wxSFCurveShape::GetBoundingBox ( ) [virtual]

Get line's bounding box. The function can be overrided if neccessary.

Returns:
Bounding rectangle

Reimplemented from wxSFLineShape.

wxRealPoint wxSFCurveShape::GetPoint ( size_t  segment,
double  offset 
)

Get a line point laying on the given line segment and shifted from the beggining of the segment by given offset.

Parameters:
segmentZero-based index of the line segment
offsetReal value in the range from 0 to 1 which determines the linepoint offset inside the line segment
Returns:
Line point
void wxSFCurveShape::GetSegmentQuaternion ( size_t  segment,
wxRealPoint &  A,
wxRealPoint &  B,
wxRealPoint &  C,
wxRealPoint &  D 
) [private]

Auxiliary drawing function.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines