![]() |
Qt 6.x
The Qt SDK
|
#include "qquickpath_p.h"
#include "qquickpath_p_p.h"
#include "qquicksvgparser_p.h"
#include <QSet>
#include <QTime>
#include <private/qbezier_p.h>
#include <QtCore/qmath.h>
#include <QtCore/private/qnumeric_p.h>
#include "moc_qquickpath_p.cpp"
Go to the source code of this file.
Functions | |
static QQuickPathPrivate * | privatePath (QObject *object) |
static void | scalePath (QPainterPath &path, const QSizeF &scale) |
static QBezier | nextBezier (const QPainterPath &path, int *current, qreal *bezLength, bool reverse=false) |
static int | segmentCount (const QPainterPath &path, qreal pathLength) |
static qreal | slopeAt (qreal t, qreal a, qreal b, qreal c, qreal d) |
QPointF | positionForCurve (const QQuickPathData &data, const QPointF &prevPoint) |
\qmltype PathLine \instantiates QQuickPathLine \inqmlmodule QtQuick | |
QPointF | previousPathPosition (const QPainterPath &path) |
\qmltype PathCurve \instantiates QQuickPathCatmullRomCurve \inqmlmodule QtQuick | |
|
inlinestatic |
Definition at line 603 of file qquickpath.cpp.
References QPainterPath::CurveToElement, e, QBezier::fromPoints(), i, QString::length(), line, QPainterPath::LineToElement, and QPainterPath::MoveToElement.
|
inline |
\qmltype PathLine \instantiates QQuickPathLine \inqmlmodule QtQuick
Defines a straight line.
The example below creates a path consisting of a straight line from 0,100 to 200,100:
\qml Path { startX: 0; startY: 100 PathLine { x: 200; y: 100 } } \endqml
\qmlproperty real QtQuick::PathLine::x \qmlproperty real QtQuick::PathLine::y
Defines the end point of the line.
\qmlproperty real QtQuick::PathLine::relativeX \qmlproperty real QtQuick::PathLine::relativeY
Defines the end point of the line relative to its start.
If both a relative and absolute end position are specified for a single axis, the relative position will be used.
Relative and absolute positions can be mixed, for example it is valid to set a relative x and an absolute y.
Definition at line 1221 of file qquickpath.cpp.
References QQuickCurve::hasRelativeX(), QQuickCurve::hasRelativeY(), QQuickCurve::hasX(), QQuickCurve::hasY(), QQuickCurve::relativeX, QQuickCurve::relativeY, QPointF::x(), QQuickCurve::x, QPointF::y(), and QQuickCurve::y.
Referenced by QQuickPathLine::addToPath(), QQuickPathMove::addToPath(), QQuickPathQuad::addToPath(), QQuickPathCubic::addToPath(), QQuickPathCatmullRomCurve::addToPath(), and QQuickPathArc::addToPath().
|
inline |
\qmltype PathCurve \instantiates QQuickPathCatmullRomCurve \inqmlmodule QtQuick
Defines a point on a Catmull-Rom curve.
PathCurve provides an easy way to specify a curve passing directly through a set of points. Typically multiple PathCurves are used in a series, as the following example demonstrates:
This example produces the following path (with the starting point and PathCurve points highlighted in red):
\qmlproperty real QtQuick::PathCurve::x \qmlproperty real QtQuick::PathCurve::y
Defines the end point of the curve.
\qmlproperty real QtQuick::PathCurve::relativeX \qmlproperty real QtQuick::PathCurve::relativeY
Defines the end point of the curve relative to its start.
If both a relative and absolute end position are specified for a single axis, the relative position will be used.
Relative and absolute positions can be mixed, for example it is valid to set a relative x and an absolute y.
Definition at line 1714 of file qquickpath.cpp.
References QPainterPath::CurveToDataElement.
Referenced by QQuickPathCatmullRomCurve::addToPath().
|
static |
Definition at line 231 of file qquickpath.cpp.
References QQuickPathPrivate::get().
Referenced by QQuickPath::pathElements_append(), QQuickPath::pathElements_at(), QQuickPath::pathElements_clear(), and QQuickPath::pathElements_count().
|
inlinestatic |
Definition at line 381 of file qquickpath.cpp.
References i, QPainterPath::Element::x, and QPainterPath::Element::y.
Referenced by QQuickPath::createPath(), and QQuickPath::createShapePath().
|
inlinestatic |
Definition at line 641 of file qquickpath.cpp.
References QPainterPath::LineToElement, QPainterPath::MoveToElement, and qCeil().
Referenced by QVersionNumber::isPrefixOf(), QSSGParticleBuffer::resizeLine(), QVersionNumber::segments(), and QSSGParticleRenderer::updateUniformsForParticles().