56 #include "../vgeometry/vpointf.h"
57 #include "../vpatterndb/vcontainer.h"
65 bool IsOX(
const QLineF &line)
73 bool IsOY(
const QLineF &line)
79 QString
LocalWidth(
const QLineF &line,
const QLineF &movedLine)
83 return QString().setNum(movedLine.length());
94 if (not qFuzzyIsNull(mX) &&
IsOX(line))
96 const QLineF movedLine(line.p1().x(), line.p1().y(), line.p2().x() + mX, line.p2().y());
99 else if (not qFuzzyIsNull(mY) &&
IsOY(line))
101 const QLineF movedLine(line.p1().x(), line.p1().y(), line.p2().x(), line.p2().y() + mY);
109 if (not qFuzzyIsNull(mX) &&
IsOX(line))
111 const QLineF movedLine(line.p1().x(), line.p1().y(), line.p2().x() + mX, line.p2().y());
114 else if (not qFuzzyIsNull(mY) &&
IsOY(line))
116 const QLineF movedLine(line.p1().x(), line.p1().y(), line.p2().x(), line.p2().y() + mY);
122 #ifdef Q_COMPILER_RVALUE_REFS
124 { Swap(node);
return *
this; }
128 { std::swap(d, node.d); }
244 d->reverse = reverse;
258 for (
int i = 0; i < nodes.size(); ++i)
266 for (
int i = 0; i < nodes.size(); ++i)
271 if (not qFuzzyIsNull(node.
getMx()) || not qFuzzyIsNull(node.
getMy()))
278 QLineF lineBefore(point, previosPoint);
279 lineBefore.setAngle(lineBefore.angle()-90);
280 lineBefore.setLength(width);
284 QLineF lineAfter(point, nextPoint);
285 lineAfter.setAngle(lineAfter.angle()+90);
286 lineAfter.setLength(width);
296 path[0].setBeforeSAFormula(
"0");
297 path[path.
CountNodes()-1].setAfterSAFormula(
"0");
The VContainer class container of all variables.
const QSharedPointer< T > GeometricObject(const quint32 &id) const
The VNodeDetail class keep information about detail node.
Tool getTypeTool() const
getTypeTool return tool type.
quint32 getId() const
getId return object id.
void setMy(const qreal &value)
setMy set object bias y axis.
static QVector< VPieceNode > Convert(const VContainer *data, const QVector< VNodeDetail > &nodes, qreal width, bool closed)
qreal getMx() const
getMx return object bias x axis.
VNodeDetail & operator=(const VNodeDetail &node)
operator = assignment operator
void setMx(const qreal &value)
setMx set object bias x axis.
void setTypeNode(const NodeDetail &value)
setTypeNode set node type.
void Swap(VNodeDetail &node) Q_DECL_NOTHROW
NodeDetail getTypeNode() const
getTypeNode return node type.
void setTypeTool(const Tool &value)
setTypeTool set tool type.
void setId(const quint32 &value)
setId set object id.
VNodeDetail()
VNodeDetail default constructor.
qreal getMy() const
getMy return object bias y axis.
void setReverse(bool reverse)
QSharedDataPointer< VNodeDetailData > d
void setBeforeSAFormula(const QString &formula)
void setAfterSAFormula(const QString &formula)
QVector< QPointF > PathPoints(const VContainer *data) const
qint32 CountNodes() const
void Append(const VPieceNode &node)
QVector< VPieceNode > GetNodes() const
QPointF NodePreviousPoint(const VContainer *data, int i) const
QPointF NodeNextPoint(const VContainer *data, int i) const
The VPointF class keep data of point.
static Q_REQUIRED_RESULT bool VFuzzyComparePossibleNulls(double p1, double p2)
bool IsOY(const QLineF &line)
void ConvertAfter(VPieceNode &node, const QLineF &line, qreal mX, qreal mY)
bool IsOX(const QLineF &line)
void ConvertBefore(VPieceNode &node, const QLineF &line, qreal mX, qreal mY)
QString LocalWidth(const QLineF &line, const QLineF &movedLine)