#include <vabstractcubicbezierpath.h>
Public Member Functions | |
| VAbstractCubicBezierPath (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
| VAbstractCubicBezierPath (const VAbstractCubicBezierPath &curve) | |
| VAbstractCubicBezierPath & | operator= (const VAbstractCubicBezierPath &curve) |
| virtual | ~VAbstractCubicBezierPath () |
| virtual qint32 | CountSubSpl () const =0 |
| virtual qint32 | CountPoints () const =0 |
| virtual void | Clear ()=0 |
| virtual VSpline | GetSpline (qint32 index) const =0 |
| virtual QVector< VSplinePoint > | GetSplinePath () const =0 |
| virtual QPainterPath | GetPath () const Q_DECL_OVERRIDE |
| GetPath return QPainterPath which reprezent spline path. More... | |
| virtual QVector< QPointF > | getPoints () const Q_DECL_OVERRIDE |
| GetPathPoints return list of points what located on path. More... | |
| virtual qreal | GetLength () const Q_DECL_OVERRIDE |
| GetLength return length of spline path. More... | |
| virtual QVector< DirectionArrow > | DirectionArrows () const Q_DECL_OVERRIDE |
| int | Segment (const QPointF &p) const |
| QPointF | CutSplinePath (qreal length, qint32 &p1, qint32 &p2, QPointF &spl1p2, QPointF &spl1p3, QPointF &spl2p2, QPointF &spl2p3) const |
| CutSplinePath cut spline path into two. This method don't return two spline path. You must create spline paths by yourself. Example: QPointF spl1p2, spl1p3, spl2p2, spl2p3; qint32 p1 = 0, p2 = 0; QPointF point = splPath->CutSplinePath(length, p1, p2, spl1p2, spl1p3, spl2p2, spl2p3);. More... | |
| virtual QString | NameForHistory (const QString &toolName) const Q_DECL_OVERRIDE |
| NameForHistory helps to create name for dialog History. More... | |
| virtual VPointF | FirstPoint () const =0 |
| virtual VPointF | LastPoint () const =0 |
Public Member Functions inherited from VAbstractBezier | |
| VAbstractBezier (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
| VAbstractBezier (const VAbstractBezier &curve) | |
| VAbstractBezier & | operator= (const VAbstractBezier &curve) |
| virtual | ~VAbstractBezier () |
| virtual qreal | GetC1Length () const =0 |
| virtual qreal | GetC2Length () const =0 |
Public Member Functions inherited from VAbstractCurve | |
| VAbstractCurve (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
| VAbstractCurve (const VAbstractCurve &curve) | |
| virtual | ~VAbstractCurve () Q_DECL_OVERRIDE |
| VAbstractCurve & | operator= (const VAbstractCurve &curve) |
| void | Swap (VAbstractCurve &curve) Q_DECL_NOTHROW |
| QVector< QPointF > | GetSegmentPoints (const QPointF &begin, const QPointF &end, bool reverse=false) const |
| qreal | GetLengthByPoint (const QPointF &point) const |
| virtual QVector< QPointF > | IntersectLine (const QLineF &line) const |
| IntersectLine return list of points for real intersection with line. More... | |
| virtual bool | IsIntersectLine (const QLineF &line) const |
| bool | isPointOnCurve (const QPointF &p) const |
| virtual qreal | GetStartAngle () const =0 |
| virtual qreal | GetEndAngle () const =0 |
| quint32 | GetDuplicate () const |
| void | SetDuplicate (quint32 number) |
| QString | getLineColor () const |
| void | setLineColor (const QString &color) |
| QString | GetPenStyle () const |
| void | SetPenStyle (const QString &penStyle) |
| QString | getLineWeight () const |
| getLineWeight return weight of the lines More... | |
| void | setLineWeight (const QString &lineWeight) |
| setLineWeight set weight of the lines More... | |
| QPointF | getFirstPoint () |
| QPointF | getLastPoint () |
Public Member Functions inherited from VGObject | |
| VGObject () | |
| VGObject default constructor. More... | |
| VGObject (const GOType &type, const quint32 &idObject=0, const Draw &mode=Draw::Calculation) | |
| VGObject constructor. More... | |
| VGObject (const VGObject &obj) | |
| VGObject copy constructor. More... | |
| virtual | ~VGObject () |
| VGObject & | operator= (const VGObject &obj) |
| operator = assignment operator. More... | |
| void | Swap (VGObject &obj) Q_DECL_NOTHROW |
| quint32 | getIdObject () const |
| getIdObject return parent id. More... | |
| void | setIdObject (const quint32 &value) |
| setIdObject set parent id. More... | |
| virtual QString | name () const |
| name return name graphical object. More... | |
| void | setName (const QString &name) |
| setName set name graphical object. More... | |
| Draw | getMode () const |
| getMode return mode creation. More... | |
| void | setMode (const Draw &value) |
| setMode set mode creation. More... | |
| GOType | getType () const |
| getType return object type. More... | |
| void | setType (const GOType &type) |
| quint32 | id () const |
| id return id object. More... | |
| virtual void | setId (const quint32 &id) |
| setId set id object. More... | |
| quint32 | getIdTool () const |
Protected Member Functions | |
| virtual void | CreateName () Q_DECL_OVERRIDE |
Additional Inherited Members | |
Static Public Member Functions inherited from VAbstractCurve | |
| static QVector< QPointF > | GetSegmentPoints (const QVector< QPointF > &points, const QPointF &begin, const QPointF &end, bool reverse=false) |
| static bool | isPointOnCurve (const QVector< QPointF > &points, const QPointF &p) |
| static qreal | PathLength (const QVector< QPointF > &path) |
| static QVector< QPointF > | CurveIntersectLine (const QVector< QPointF > &points, const QLineF &line) |
| static QPainterPath | ShowDirection (const QVector< DirectionArrow > &arrows, qreal width) |
Static Public Member Functions inherited from VGObject | |
| static QLineF | BuildLine (const QPointF &p1, const qreal &length, const qreal &angle) |
| static QPointF | BuildRay (const QPointF &firstPoint, const qreal &angle, const QRectF &scRect) |
| static QLineF | BuildAxis (const QPointF &p, const qreal &angle, const QRectF &scRect) |
| static QLineF | BuildAxis (const QPointF &p1, const QPointF &p2, const QRectF &scRect) |
| static int | ContactPoints (const QPointF &p, const QPointF ¢er, qreal radius, QPointF &p1, QPointF &p2) |
| static QPointF | LineIntersectRect (const QRectF &rec, const QLineF &line) |
| LineIntersectRect find point intersection line and rect. More... | |
| static int | IntersectionCircles (const QPointF &c1, double r1, const QPointF &c2, double r2, QPointF &p1, QPointF &p2) |
| static qint32 | LineIntersectCircle (const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2) |
| LineIntersectCircle find point intersection line and circle. More... | |
| static QPointF | ClosestPoint (const QLineF &line, const QPointF &point) |
| ClosestPoint find point projection of point onto line. More... | |
| static QPointF | addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) |
| static void | LineCoefficients (const QLineF &line, qreal *a, qreal *b, qreal *c) |
| LineCoefficients coefficient for equation of segment. Segment equestion ax+by+c=0. More... | |
| static bool | IsPointOnLineSegment (const QPointF &t, const QPointF &p1, const QPointF &p2) |
| IsPointOnLineSegment Check if the point is on the line segment. More... | |
| static bool | IsPointOnLineviaPDP (const QPointF &t, const QPointF &p1, const QPointF &p2) |
| IsPointOnLineviaPDP use the perp dot product (PDP) way. More... | |
| template<typename T > | |
| static QVector< T > | GetReversePoints (const QVector< T > &points) |
| GetReversePoint return revers container of points. More... | |
| static int | GetLengthContour (const QVector< QPointF > &contour, const QVector< QPointF > &newPoints) |
| GetLengthContour return length of contour. More... | |
Static Public Attributes inherited from VAbstractCurve | |
| static const qreal | lengthCurveDirectionArrow = 14 |
Static Public Attributes inherited from VGObject | |
| static const double | accuracyPointOnLine = (0.1555 / 25.4) * 96.0 |
Static Protected Member Functions inherited from VGObject | |
| static QTransform | flipTransform (const QLineF &axis) |
Definition at line 64 of file vabstractcubicbezierpath.h.
| VAbstractCubicBezierPath::VAbstractCubicBezierPath | ( | const GOType & | type, |
| const quint32 & | idObject = null_id, |
||
| const Draw & | mode = Draw::Calculation |
||
| ) |
Definition at line 63 of file vabstractcubicbezierpath.cpp.
| VAbstractCubicBezierPath::VAbstractCubicBezierPath | ( | const VAbstractCubicBezierPath & | curve | ) |
Definition at line 69 of file vabstractcubicbezierpath.cpp.
|
virtual |
Definition at line 86 of file vabstractcubicbezierpath.cpp.
|
pure virtual |
Implemented in VSplinePath, and VCubicBezierPath.
|
pure virtual |
Implemented in VSplinePath, and VCubicBezierPath.
Referenced by CreateName(), and NameForHistory().
|
pure virtual |
Implemented in VSplinePath, and VCubicBezierPath.
Referenced by CreateName(), CutSplinePath(), DirectionArrows(), GetLength(), GetPath(), getPoints(), NameForHistory(), and Segment().
|
protectedvirtual |
Implements VAbstractCurve.
Definition at line 263 of file vabstractcubicbezierpath.cpp.
References CountPoints(), CountSubSpl(), FirstPoint(), VAbstractCurve::GetDuplicate(), LastPoint(), VGObject::name(), VGObject::setName(), and splPath.
Referenced by VCubicBezierPath::append(), VSplinePath::append(), VCubicBezierPath::VCubicBezierPath(), and VSplinePath::VSplinePath().
| QPointF VAbstractCubicBezierPath::CutSplinePath | ( | qreal | length, |
| qint32 & | p1, | ||
| qint32 & | p2, | ||
| QPointF & | spl1p2, | ||
| QPointF & | spl1p3, | ||
| QPointF & | spl2p2, | ||
| QPointF & | spl2p3 | ||
| ) | const |
CutSplinePath cut spline path into two. This method don't return two spline path. You must create spline paths by yourself. Example: QPointF spl1p2, spl1p3, spl2p2, spl2p3; qint32 p1 = 0, p2 = 0; QPointF point = splPath->CutSplinePath(length, p1, p2, spl1p2, spl1p3, spl2p2, spl2p3);.
VSplinePoint splP1 = splPath->at(p1); VSplinePoint splP2 = splPath->at(p2); VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->GetKCurve()); VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->GetKCurve());
| length | length first spline path. |
| p1 | index first spline point in list. |
| p2 | index second spline point in list. |
| spl1p2 | first control point first spline. |
| spl1p3 | second control point first spline. |
| spl2p2 | first control point second spline. |
| spl2p3 | second control point second spline. |
Definition at line 189 of file vabstractcubicbezierpath.cpp.
References CountSubSpl(), VSpline::CutSpline(), GetLength(), VSpline::GetLength(), GetSpline(), Mm, and ToPixel().
|
virtual |
Reimplemented from VAbstractCurve.
Definition at line 141 of file vabstractcubicbezierpath.cpp.
References CountSubSpl(), VAbstractCurve::DirectionArrows(), and GetSpline().
Referenced by VisToolCubicBezierPath::RefreshGeometry(), VisToolCutSplinePath::RefreshGeometry(), and VisToolSplinePath::RefreshGeometry().
|
pure virtual |
Implemented in VSplinePath, and VCubicBezierPath.
Referenced by CreateName(), and NameForHistory().
|
virtual |
GetLength return length of spline path.
Implements VAbstractCurve.
Definition at line 130 of file vabstractcubicbezierpath.cpp.
References CountSubSpl(), VSpline::GetLength(), and GetSpline().
Referenced by CutSplinePath(), and VToolCutSplinePath::makeToolTip().
|
virtual |
GetPath return QPainterPath which reprezent spline path.
Reimplemented from VAbstractCurve.
Definition at line 95 of file vabstractcubicbezierpath.cpp.
References CountSubSpl(), VAbstractCurve::GetPath(), and GetSpline().
Referenced by VisToolCubicBezierPath::RefreshGeometry(), VisToolCutSplinePath::RefreshGeometry(), and VisToolSplinePath::RefreshGeometry().
|
virtual |
GetPathPoints return list of points what located on path.
Implements VAbstractCurve.
Definition at line 110 of file vabstractcubicbezierpath.cpp.
References CountSubSpl(), VSpline::getPoints(), and GetSpline().
|
pure virtual |
Implemented in VSplinePath, and VCubicBezierPath.
Referenced by CutSplinePath(), DirectionArrows(), GetLength(), GetPath(), getPoints(), and Segment().
|
pure virtual |
Implemented in VSplinePath, and VCubicBezierPath.
|
pure virtual |
Implemented in VSplinePath, and VCubicBezierPath.
Referenced by CreateName(), and NameForHistory().
|
virtual |
NameForHistory helps to create name for dialog History.
| toolName | first part of name. Like 'Spline path' or 'Cubic Bezier path'. |
Implements VAbstractCurve.
Definition at line 243 of file vabstractcubicbezierpath.cpp.
References CountPoints(), CountSubSpl(), FirstPoint(), VAbstractCurve::GetDuplicate(), LastPoint(), and VGObject::name().
| VAbstractCubicBezierPath & VAbstractCubicBezierPath::operator= | ( | const VAbstractCubicBezierPath & | curve | ) |
Definition at line 75 of file vabstractcubicbezierpath.cpp.
References VAbstractBezier::operator=().
| int VAbstractCubicBezierPath::Segment | ( | const QPointF & | p | ) | const |
Definition at line 152 of file vabstractcubicbezierpath.cpp.
References CountSubSpl(), GetSpline(), and VSpline::ParamT().