25 return m_stroker.width();
30 if (qFuzzyCompare(m_stroker.width(),
width))
33 m_stroker.setWidth(
width);
39 return m_stroker.createStroke(path);
98 return m_path.contains(point);
103 return m_path.angleAtPercent(t);
106void QuickPainterPath::updateState(
const QPainterPath &path)
108 const QPointF newStartPoint =
path.pointAtPercent(0.0);
109 if (newStartPoint != m_startPoint) {
110 m_startPoint = newStartPoint;
113 const QPointF newEndPoint =
path.pointAtPercent(1.0);
114 if (newEndPoint != m_endPoint) {
115 m_endPoint = newEndPoint;
118 const bool newIsEmpty =
path.isEmpty();
119 if (newIsEmpty != m_isEmpty) {
120 m_isEmpty = newIsEmpty;
148void QuickPainterPathGeometryItem::updateData()
151 m_vertexCoordinates.
clear();
152 if (!m_path.isEmpty()) {
153 m_vertexCoordinates.
addPath(qtVectorPathForPath(m_path), 1.);
156 const int vertexCount = m_vertexCoordinates.
vertexCount();
159 for (
int i = 0; i < vertexCount; ++i) {
void addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline=true)
void setVertexData(const QList< qreal > &vertexData)
void setDrawingMode(DrawingMode drawingMode)
QList< qreal > vertexData() const
void changed()
Emitted in case any of this object properties changes.
void setPath(const QPainterPath &path)
QuickPainterPathGeometryItem(QQuickItem *parent=nullptr)
void pathChanged(const QPainterPath &path)
void setWidth(qreal width)
QuickPainterPathStroker(QObject *parent=nullptr)
Q_INVOKABLE QPainterPath createStroke(const QPainterPath &path) const
void widthChanged(qreal width)
Q_INVOKABLE qreal angleAtPercent(qreal t) const
Q_INVOKABLE void lineTo(QPointF endPoint)
void pathChanged(const QPainterPath &path)
void startPointChanged(const QPointF &startPoint)
void endPointChanged(const QPointF &endPoint)
void isEmptyChanged(bool isEmpty)
Q_INVOKABLE void moveTo(QPointF point)
QuickPainterPath(QObject *parent=nullptr)
Q_INVOKABLE bool contains(QPointF point) const
void setPath(const QPainterPath &path)