Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QuadPath Class Reference

#include <qquickshapecurverenderer_p.h>

+ Collaboration diagram for QuadPath:

Classes

class  Element
 

Public Member Functions

void moveTo (const QVector2D &to)
 
void lineTo (const QVector2D &to)
 
void quadTo (const QVector2D &control, const QVector2D &to)
 
QRectF controlPointRect () const
 
Qt::FillRule fillRule () const
 
void setFillRule (Qt::FillRule rule)
 
void reserve (qsizetype size)
 
qsizetype elementCount () const
 
bool isEmpty () const
 
qsizetype elementCountRecursive () const
 
QPainterPath toPainterPath () const
 
QuadPath subPathsClosed () const
 
QuadPath flattened () const
 
QuadPath dashed (qreal lineWidth, const QList< qreal > &dashPattern, qreal dashOffset=0) const
 
template<typename Func >
void iterateChildrenOf (Element &e, Func &&lambda)
 
template<typename Func >
void iterateChildrenOf (const Element &e, Func &&lambda) const
 
template<typename Func >
void iterateElements (Func &&lambda)
 
template<typename Func >
void iterateElements (Func &&lambda) const
 
void splitElementAt (qsizetype index)
 
ElementelementAt (qsizetype i)
 
const ElementelementAt (qsizetype i) const
 
qsizetype indexOfChildAt (qsizetype i, qsizetype childNumber) const
 
void addCurvatureData ()
 
bool contains (const QVector2D &v) const
 

Static Public Member Functions

static QuadPath fromPainterPath (const QPainterPath &path)
 

Friends

QDebug operator<< (QDebug, const QuadPath &)
 

Detailed Description

Definition at line 31 of file qquickshapecurverenderer_p.h.

Member Function Documentation

◆ addCurvatureData()

void QuadPath::addCurvatureData ( )

Definition at line 342 of file qquickshapecurverenderer.cpp.

References QuadPath::Element::childCount(), QuadPath::Element::isLine(), QuadPath::Element::isSubpathStart(), Q_ASSERT, qDebug, qEnvironmentVariableIntValue(), and sp.

+ Here is the call graph for this function:

◆ contains()

bool QuadPath::contains ( const QVector2D v) const

Definition at line 210 of file qquickshapecurverenderer.cpp.

References dir, e, i, qMax(), qMin(), qSwap(), QVector2D::x(), and QVector2D::y().

+ Here is the call graph for this function:

◆ controlPointRect()

QRectF QuadPath::controlPointRect ( ) const

Definition at line 392 of file qquickshapecurverenderer.cpp.

References e, elementCount(), QVector2D::setX(), QVector2D::setY(), QVector2D::toPointF(), QVector2D::x(), and QVector2D::y().

+ Here is the call graph for this function:

◆ dashed()

QuadPath QuadPath::dashed ( qreal  lineWidth,
const QList< qreal > &  dashPattern,
qreal  dashOffset = 0 
) const

Definition at line 607 of file qquickshapecurverenderer.cpp.

References ElementCutter::consume(), ElementCutter::currentControlPoint(), ElementCutter::currentCutPoint(), elementAt(), elementCount(), i, QuadPath::Element::isLine(), QuadPath::Element::isSubpathStart(), ElementCutter::lastLength(), QList< T >::length(), qMax(), and QuadPath::Element::startPoint().

+ Here is the call graph for this function:

◆ elementAt() [1/2]

Element & QuadPath::elementAt ( qsizetype  i)
inline

Definition at line 223 of file qquickshapecurverenderer_p.h.

References i.

Referenced by dashed(), indexOfChildAt(), and splitElementAt().

+ Here is the caller graph for this function:

◆ elementAt() [2/2]

const Element & QuadPath::elementAt ( qsizetype  i) const
inline

Definition at line 224 of file qquickshapecurverenderer_p.h.

References i.

◆ elementCount()

qsizetype QuadPath::elementCount ( ) const
inline

Definition at line 56 of file qquickshapecurverenderer_p.h.

Referenced by controlPointRect(), dashed(), subPathsClosed(), and toPainterPath().

+ Here is the caller graph for this function:

◆ elementCountRecursive()

qsizetype QuadPath::elementCountRecursive ( ) const

Definition at line 411 of file qquickshapecurverenderer.cpp.

References iterateElements().

Referenced by flattened().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRule()

Qt::FillRule QuadPath::fillRule ( ) const
inline

Definition at line 52 of file qquickshapecurverenderer_p.h.

Referenced by QQuickShapeCurveRenderer::setFillRule(), and toPainterPath().

+ Here is the caller graph for this function:

◆ flattened()

QuadPath QuadPath::flattened ( ) const

Definition at line 487 of file qquickshapecurverenderer.cpp.

References elementCountRecursive(), and iterateElements().

+ Here is the call graph for this function:

◆ fromPainterPath()

QuadPath QuadPath::fromPainterPath ( const QPainterPath path)
static

Definition at line 296 of file qquickshapecurverenderer.cpp.

References QPainterPath::CurveToElement, QBezier::fromPoints(), i, QPainterPath::LineToElement, QPainterPath::MoveToElement, qt_toQuadratics(), QList< T >::size(), sp, and QPainterPath::Element::type.

Referenced by QQuickShapeCurveRenderer::updateNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ indexOfChildAt()

qsizetype QuadPath::indexOfChildAt ( qsizetype  i,
qsizetype  childNumber 
) const
inline

Definition at line 229 of file qquickshapecurverenderer_p.h.

References elementAt(), i, and QuadPath::Element::indexOfChild().

+ Here is the call graph for this function:

◆ isEmpty()

bool QuadPath::isEmpty ( ) const
inline

Definition at line 57 of file qquickshapecurverenderer_p.h.

◆ iterateChildrenOf() [1/2]

template<typename Func >
void QuadPath::iterateChildrenOf ( const Element e,
Func &&  lambda 
) const
inline

Definition at line 188 of file qquickshapecurverenderer_p.h.

References e, i, and iterateChildrenOf().

+ Here is the call graph for this function:

◆ iterateChildrenOf() [2/2]

template<typename Func >
void QuadPath::iterateChildrenOf ( Element e,
Func &&  lambda 
)
inline

Definition at line 175 of file qquickshapecurverenderer_p.h.

References e, i, and iterateChildrenOf().

Referenced by iterateChildrenOf(), iterateChildrenOf(), iterateElements(), and iterateElements().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ iterateElements() [1/2]

template<typename Func >
void QuadPath::iterateElements ( Func &&  lambda)
inline

Definition at line 201 of file qquickshapecurverenderer_p.h.

References e, and iterateChildrenOf().

Referenced by elementCountRecursive(), and flattened().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ iterateElements() [2/2]

template<typename Func >
void QuadPath::iterateElements ( Func &&  lambda) const
inline

Definition at line 212 of file qquickshapecurverenderer_p.h.

References e, and iterateChildrenOf().

+ Here is the call graph for this function:

◆ lineTo()

void QuadPath::lineTo ( const QVector2D to)
inline

Definition at line 40 of file qquickshapecurverenderer_p.h.

◆ moveTo()

void QuadPath::moveTo ( const QVector2D to)
inline

Definition at line 34 of file qquickshapecurverenderer_p.h.

◆ quadTo()

void QuadPath::quadTo ( const QVector2D control,
const QVector2D to 
)
inline

Definition at line 45 of file qquickshapecurverenderer_p.h.

◆ reserve()

void QuadPath::reserve ( qsizetype  size)
inline

Definition at line 55 of file qquickshapecurverenderer_p.h.

◆ setFillRule()

void QuadPath::setFillRule ( Qt::FillRule  rule)
inline

Definition at line 53 of file qquickshapecurverenderer_p.h.

References rule.

◆ splitElementAt()

void QuadPath::splitElementAt ( qsizetype  index)

Definition at line 662 of file qquickshapecurverenderer.cpp.

References elementAt(), parent, qDebug, and qFuzzyCompare().

+ Here is the call graph for this function:

◆ subPathsClosed()

QuadPath QuadPath::subPathsClosed ( ) const

Definition at line 439 of file qquickshapecurverenderer.cpp.

References elementCount(), i, Q_ASSERT, and sp.

+ Here is the call graph for this function:

◆ toPainterPath()

QPainterPath QuadPath::toPainterPath ( ) const

Definition at line 418 of file qquickshapecurverenderer.cpp.

References QuadPath::Element::controlPoint(), elementCount(), QuadPath::Element::endPoint(), fillRule(), QuadPath::Element::startPoint(), and QVector2D::toPointF().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

QDebug operator<< ( QDebug  ,
const QuadPath  
)
friend

Definition at line 716 of file qquickshapecurverenderer.cpp.


The documentation for this class was generated from the following files: