#include <vabstractcurve.h>
Public Member Functions | |
| 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 |
| virtual QVector< QPointF > | getPoints () const =0 |
| QVector< QPointF > | GetSegmentPoints (const QPointF &begin, const QPointF &end, bool reverse=false) const |
| virtual QPainterPath | GetPath () const |
| virtual qreal | GetLength () const =0 |
| 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 () |
| virtual QString | NameForHistory (const QString &toolName) const =0 |
| virtual QVector< DirectionArrow > | DirectionArrows () const |
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 |
Static Public Member Functions | |
| 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 | |
| static const qreal | lengthCurveDirectionArrow = 14 |
Static Public Attributes inherited from VGObject | |
| static const double | accuracyPointOnLine = (0.1555 / 25.4) * 96.0 |
Protected Member Functions | |
| virtual void | CreateName ()=0 |
Static Private Member Functions | |
| static QVector< QPointF > | FromBegin (const QVector< QPointF > &points, const QPointF &begin, bool *ok=nullptr) |
| static QVector< QPointF > | ToEnd (const QVector< QPointF > &points, const QPointF &end, bool *ok=nullptr) |
Private Attributes | |
| QSharedDataPointer< VAbstractCurveData > | d |
Additional Inherited Members | |
Static Protected Member Functions inherited from VGObject | |
| static QTransform | flipTransform (const QLineF &axis) |
Definition at line 68 of file vabstractcurve.h.
|
explicit |
Definition at line 73 of file vabstractcurve.cpp.
|
explicit |
Definition at line 78 of file vabstractcurve.cpp.
|
virtual |
Definition at line 95 of file vabstractcurve.cpp.
|
protectedpure virtual |
Implemented in VEllipticalArc, VArc, VAbstractCubicBezierPath, and VAbstractCubicBezier.
Referenced by SetDuplicate(), and VAbstractArc::setId().
|
static |
Definition at line 355 of file vabstractcurve.cpp.
Referenced by VPiece::createSeamAllowanceNotch(), VPiece::findIntersection(), VToolPointOfIntersectionCurves::FindPoint(), and IntersectLine().
|
virtual |
Reimplemented in VAbstractCubicBezierPath.
Definition at line 371 of file vabstractcurve.cpp.
References GetLength(), getPoints(), and lengthCurveDirectionArrow.
Referenced by VAbstractCubicBezierPath::DirectionArrows(), VisToolArc::RefreshGeometry(), VisToolArcWithLength::RefreshGeometry(), VisToolCubicBezier::RefreshGeometry(), VisToolCutArc::RefreshGeometry(), VisToolCutSpline::RefreshGeometry(), VisToolEllipticalArc::RefreshGeometry(), and VisToolSpline::RefreshGeometry().
|
staticprivate |
Definition at line 129 of file vabstractcurve.cpp.
References VGObject::IsPointOnLineSegment().
Referenced by GetSegmentPoints(), and ToEnd().
| quint32 VAbstractCurve::GetDuplicate | ( | ) | const |
Definition at line 298 of file vabstractcurve.cpp.
References d.
Referenced by VAbstractCubicBezier::CreateName(), VAbstractCubicBezierPath::CreateName(), VArc::CreateName(), VEllipticalArc::CreateName(), VAbstractArc::NameForHistory(), VAbstractCubicBezier::NameForHistory(), VAbstractCubicBezierPath::NameForHistory(), DialogCubicBezier::SaveData(), DialogCubicBezierPath::SaveData(), DialogSpline::SaveData(), DialogSplinePath::SaveData(), VToolCubicBezier::SetSplineAttributes(), VToolSpline::SetSplineAttributes(), VToolCubicBezierPath::SetSplinePathAttributes(), and VToolSplinePath::SetSplinePathAttributes().
|
pure virtual |
Implemented in VSplinePath, VSpline, VEllipticalArc, VCubicBezierPath, VCubicBezier, and VAbstractArc.
Referenced by VCurveAngle::VCurveAngle().
| QPointF VAbstractCurve::getFirstPoint | ( | ) |
Definition at line 464 of file vabstractcurve.cpp.
References getPoints().
| QPointF VAbstractCurve::getLastPoint | ( | ) |
Definition at line 475 of file vabstractcurve.cpp.
References getPoints().
|
pure virtual |
Implemented in VSpline, VEllipticalArc, VCubicBezier, VArc, and VAbstractCubicBezierPath.
Referenced by VAbstractCubicBezier::CutSpline(), DirectionArrows(), VAbstractCubicBezier::GetParmT(), and VCurveLength::VCurveLength().
| qreal VAbstractCurve::GetLengthByPoint | ( | const QPointF & | point | ) | const |
Definition at line 226 of file vabstractcurve.cpp.
References getPoints(), PathLength(), and ToEnd().
| QString VAbstractCurve::getLineColor | ( | ) | const |
Definition at line 311 of file vabstractcurve.cpp.
References d.
Referenced by VArc::Flip(), VCubicBezier::Flip(), VCubicBezierPath::Flip(), VEllipticalArc::Flip(), VSpline::Flip(), VSplinePath::Flip(), VArc::Move(), VCubicBezier::Move(), VCubicBezierPath::Move(), VEllipticalArc::Move(), VSpline::Move(), VSplinePath::Move(), VArc::Rotate(), VCubicBezier::Rotate(), VCubicBezierPath::Rotate(), VSpline::Rotate(), VSplinePath::Rotate(), and VEllipticalArc::Rotate().
| QString VAbstractCurve::getLineWeight | ( | ) | const |
getLineWeight return weight of the lines
Definition at line 339 of file vabstractcurve.cpp.
References d.
Referenced by VArc::Flip(), VCubicBezier::Flip(), VCubicBezierPath::Flip(), VEllipticalArc::Flip(), VSpline::Flip(), VSplinePath::Flip(), VArc::Move(), VCubicBezier::Move(), VCubicBezierPath::Move(), VEllipticalArc::Move(), VSpline::Move(), VSplinePath::Move(), VArc::Rotate(), VCubicBezier::Rotate(), VCubicBezierPath::Rotate(), VSpline::Rotate(), VSplinePath::Rotate(), and VEllipticalArc::Rotate().
|
virtual |
Reimplemented in VAbstractCubicBezierPath.
Definition at line 209 of file vabstractcurve.cpp.
References getPoints().
Referenced by VisToolSplinePath::Creating(), VisToolCubicBezierPath::Creating(), VAbstractCubicBezierPath::GetPath(), VisToolRotation::RefreshGeometry(), VisToolArc::RefreshGeometry(), VisToolArcWithLength::RefreshGeometry(), VisToolCubicBezier::RefreshGeometry(), VisToolCutArc::RefreshGeometry(), VisToolCutSpline::RefreshGeometry(), VisToolEllipticalArc::RefreshGeometry(), and VisToolSpline::RefreshGeometry().
| QString VAbstractCurve::GetPenStyle | ( | ) | const |
Definition at line 323 of file vabstractcurve.cpp.
References d.
Referenced by VArc::Flip(), VCubicBezier::Flip(), VCubicBezierPath::Flip(), VEllipticalArc::Flip(), VSpline::Flip(), VSplinePath::Flip(), VArc::Move(), VCubicBezier::Move(), VCubicBezierPath::Move(), VEllipticalArc::Move(), VSpline::Move(), VSplinePath::Move(), VArc::Rotate(), VCubicBezier::Rotate(), VCubicBezierPath::Rotate(), VSpline::Rotate(), VSplinePath::Rotate(), and VEllipticalArc::Rotate().
|
pure virtual |
Implemented in VSpline, VEllipticalArc, VCubicBezier, VArc, and VAbstractCubicBezierPath.
Referenced by VToolPointOfIntersectionCurves::Create(), DirectionArrows(), anonymous_namespace{vtoolmove.cpp}::findRotationOrigin(), getFirstPoint(), getLastPoint(), GetLengthByPoint(), GetPath(), GetSegmentPoints(), IntersectLine(), and isPointOnCurve().
| QVector< QPointF > VAbstractCurve::GetSegmentPoints | ( | const QPointF & | begin, |
| const QPointF & | end, | ||
| bool | reverse = false |
||
| ) | const |
Definition at line 123 of file vabstractcurve.cpp.
References getPoints(), and GetSegmentPoints().
|
static |
Definition at line 99 of file vabstractcurve.cpp.
References FromBegin(), VGObject::GetReversePoints(), and ToEnd().
Referenced by GetSegmentPoints().
|
pure virtual |
Implemented in VSplinePath, VSpline, VEllipticalArc, VCubicBezierPath, VCubicBezier, and VAbstractArc.
Referenced by VCurveAngle::VCurveAngle().
|
virtual |
IntersectLine return list of points for real intersection with line.
| line | line that intersect with curve |
Definition at line 254 of file vabstractcurve.cpp.
References CurveIntersectLine(), and getPoints().
Referenced by IsIntersectLine().
|
virtual |
Definition at line 260 of file vabstractcurve.cpp.
References IntersectLine().
Referenced by VToolPointFromArcAndTangent::FindPoint(), VToolPointOfIntersectionArcs::FindPoint(), and VisToolPointFromArcAndTangent::FindRays().
| bool VAbstractCurve::isPointOnCurve | ( | const QPointF & | p | ) | const |
Definition at line 292 of file vabstractcurve.cpp.
References getPoints(), and isPointOnCurve().
|
static |
Definition at line 267 of file vabstractcurve.cpp.
References VGObject::IsPointOnLineSegment().
Referenced by anonymous_namespace{vpiecepath.cpp}::CurveEndPoint(), anonymous_namespace{vpiecepath.cpp}::CurvePoint(), anonymous_namespace{vpiecepath.cpp}::CurveStartPoint(), and isPointOnCurve().
|
pure virtual |
Implemented in VAbstractCubicBezierPath, VAbstractCubicBezier, and VAbstractArc.
| VAbstractCurve & VAbstractCurve::operator= | ( | const VAbstractCurve & | curve | ) |
Definition at line 83 of file vabstractcurve.cpp.
References d, and VGObject::operator=().
Referenced by VAbstractArc::operator=(), VAbstractBezier::operator=(), VCubicBezierPath::operator=(), and VSplinePath::operator=().
|
static |
Definition at line 443 of file vabstractcurve.cpp.
Referenced by VPiecePath::CurveSeamAllowanceSegment(), VEllipticalArc::GetLength(), GetLengthByPoint(), and VAbstractCubicBezier::LengthBezier().
| void VAbstractCurve::SetDuplicate | ( | quint32 | number | ) |
Definition at line 304 of file vabstractcurve.cpp.
References CreateName(), and d.
Referenced by VCubicBezierPath::Clear(), VSplinePath::Clear(), DialogCubicBezierPath::currentPointChanged(), DialogSplinePath::currentPointChanged(), DialogArc::pointNameChanged(), DialogArcWithLength::pointNameChanged(), DialogEllipticalArc::pointNameChanged(), DialogCubicBezier::PointNameChanged(), DialogSpline::PointNameChanged(), DialogCubicBezier::SaveData(), DialogCubicBezierPath::SaveData(), DialogSpline::SaveData(), DialogSplinePath::SaveData(), DialogCubicBezierPath::ShowDialog(), DialogSpline::ShowDialog(), and DialogSplinePath::ShowDialog().
| void VAbstractCurve::setLineColor | ( | const QString & | color | ) |
Definition at line 317 of file vabstractcurve.cpp.
References d.
Referenced by VArc::Flip(), VCubicBezier::Flip(), VCubicBezierPath::Flip(), VEllipticalArc::Flip(), VSpline::Flip(), VArc::Move(), VCubicBezier::Move(), VCubicBezierPath::Move(), VEllipticalArc::Move(), VSpline::Move(), VArc::Rotate(), VCubicBezier::Rotate(), VCubicBezierPath::Rotate(), VSpline::Rotate(), VEllipticalArc::Rotate(), VToolCubicBezier::setDialog(), and VToolCubicBezierPath::setDialog().
| void VAbstractCurve::setLineWeight | ( | const QString & | lineWeight | ) |
setLineWeight set weight of the lines
| lineWeight | type |
Definition at line 349 of file vabstractcurve.cpp.
References d.
Referenced by VArc::Flip(), VCubicBezier::Flip(), VCubicBezierPath::Flip(), VEllipticalArc::Flip(), VSpline::Flip(), VArc::Move(), VCubicBezier::Move(), VCubicBezierPath::Move(), VEllipticalArc::Move(), VSpline::Move(), VArc::Rotate(), VCubicBezier::Rotate(), VCubicBezierPath::Rotate(), VSpline::Rotate(), VEllipticalArc::Rotate(), and VToolCubicBezier::SetVisualization().
| void VAbstractCurve::SetPenStyle | ( | const QString & | penStyle | ) |
Definition at line 329 of file vabstractcurve.cpp.
References d.
Referenced by VArc::Flip(), VCubicBezier::Flip(), VCubicBezierPath::Flip(), VEllipticalArc::Flip(), VSpline::Flip(), VArc::Move(), VCubicBezier::Move(), VCubicBezierPath::Move(), VEllipticalArc::Move(), VSpline::Move(), VArc::Rotate(), VCubicBezier::Rotate(), VCubicBezierPath::Rotate(), VSpline::Rotate(), and VEllipticalArc::Rotate().
|
static |
Definition at line 415 of file vabstractcurve.cpp.
Referenced by VAbstractSpline::paint(), VCurvePathItem::paint(), VAbstractSpline::shape(), and VCurvePathItem::shape().
| void VAbstractCurve::Swap | ( | VAbstractCurve & | curve | ) |
Definition at line 70 of file vabstractcurve.cpp.
References VGObject::Swap().
Referenced by VAbstractArc::Swap(), VCubicBezier::Swap(), VCubicBezierPath::Swap(), VSpline::Swap(), and VSplinePath::Swap().
|
staticprivate |
Definition at line 201 of file vabstractcurve.cpp.
References FromBegin(), and VGObject::GetReversePoints().
Referenced by GetLengthByPoint(), and GetSegmentPoints().
|
private |
Definition at line 129 of file vabstractcurve.h.
Referenced by GetDuplicate(), getLineColor(), getLineWeight(), GetPenStyle(), operator=(), SetDuplicate(), setLineColor(), setLineWeight(), and SetPenStyle().
|
static |
Definition at line 123 of file vabstractcurve.h.
Referenced by DirectionArrows(), VAbstractSpline::paint(), VCurvePathItem::paint(), VAbstractSpline::shape(), and VCurvePathItem::shape().