Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQuadPath Class Reference

#include <qquadpath_p.h>

Collaboration diagram for QQuadPath:

Classes

class  Element

Public Types

enum  PathHint : quint8 {
  PathLinear = 0x1 , PathQuadratic = 0x2 , PathConvex = 0x4 , PathFillOnRight = 0x8 ,
  PathSolid = 0x10 , PathNonIntersecting = 0x20 , PathNonOverlappingControlPointTriangles = 0x40
}

Public Member Functions

void moveTo (const QVector2D &to)
void lineTo (const QVector2D &to)
void quadTo (const QVector2D &control, const QVector2D &to)
ElementelementAt (int i)
const ElementelementAt (int i) const
int indexOfChildAt (int i, int childNumber) const
QRectF controlPointRect () const
Qt::FillRule fillRule () const
void setFillRule (Qt::FillRule rule)
void reserve (int size)
int elementCount () const
bool isEmpty () const
int elementCountRecursive () const
QPainterPath toPainterPath () const
QString asSvgString () const
QQuadPath subPathsClosed (bool *didClose=nullptr) const
void addCurvatureData ()
QQuadPath flattened () const
QQuadPath dashed (qreal lineWidth, const QList< qreal > &dashPattern, qreal dashOffset=0) const
void splitElementAt (int index)
bool contains (const QVector2D &point) const
bool contains (const QVector2D &point, int fromIndex, int toIndex) const
Element::FillSide fillSideOf (int elementIdx, float elementT) 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
bool testHint (PathHint hint) const
void setHint (PathHint hint, bool on=true)
PathHints pathHints () const
void setPathHints (PathHints newHints)

Static Public Member Functions

static QQuadPath fromPainterPath (const QPainterPath &path, PathHints hints={})
static QVector2D closestPointOnLine (const QVector2D &p, const QVector2D &sp, const QVector2D &ep)
static bool isPointOnLeft (const QVector2D &p, const QVector2D &sp, const QVector2D &ep)
static bool isPointOnLine (const QVector2D &p, const QVector2D &sp, const QVector2D &ep)
static bool isPointNearLine (const QVector2D &p, const QVector2D &sp, const QVector2D &ep)

Friends

class QSGCurveProcessor
Q_QUICK_EXPORT QDebug operator<< (QDebug stream, const QQuadPath &path)

Detailed Description

Definition at line 27 of file qquadpath_p.h.

Member Enumeration Documentation

◆ PathHint

Enumerator
PathLinear 
PathQuadratic 
PathConvex 
PathFillOnRight 
PathSolid 
PathNonIntersecting 
PathNonOverlappingControlPointTriangles 

Definition at line 31 of file qquadpath_p.h.

Member Function Documentation

◆ addCurvatureData()

void QQuadPath::addCurvatureData ( )

Definition at line 555 of file qquadpath.cpp.

◆ asSvgString()

QString QQuadPath::asSvgString ( ) const

Definition at line 668 of file qquadpath.cpp.

◆ closestPointOnLine()

QVector2D QQuadPath::closestPointOnLine ( const QVector2D & p,
const QVector2D & sp,
const QVector2D & ep )
static

Definition at line 314 of file qquadpath.cpp.

◆ contains() [1/2]

bool QQuadPath::contains ( const QVector2D & point) const

Definition at line 322 of file qquadpath.cpp.

◆ contains() [2/2]

bool QQuadPath::contains ( const QVector2D & point,
int fromIndex,
int toIndex ) const

Definition at line 327 of file qquadpath.cpp.

◆ controlPointRect()

QRectF QQuadPath::controlPointRect ( ) const

Definition at line 625 of file qquadpath.cpp.

◆ dashed()

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

Definition at line 858 of file qquadpath.cpp.

◆ elementAt() [1/2]

Element & QQuadPath::elementAt ( int i)
inline

Definition at line 206 of file qquadpath_p.h.

◆ elementAt() [2/2]

const Element & QQuadPath::elementAt ( int i) const
inline

Definition at line 211 of file qquadpath_p.h.

◆ elementCount()

int QQuadPath::elementCount ( ) const
inline

Definition at line 227 of file qquadpath_p.h.

◆ elementCountRecursive()

int QQuadPath::elementCountRecursive ( ) const

Definition at line 644 of file qquadpath.cpp.

◆ fillRule()

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

Definition at line 223 of file qquadpath_p.h.

◆ fillSideOf()

QQuadPath::Element::FillSide QQuadPath::fillSideOf ( int elementIdx,
float elementT ) const

Definition at line 378 of file qquadpath.cpp.

◆ flattened()

QQuadPath QQuadPath::flattened ( ) const

Definition at line 736 of file qquadpath.cpp.

◆ fromPainterPath()

QQuadPath QQuadPath::fromPainterPath ( const QPainterPath & path,
PathHints hints = {} )
static

Definition at line 504 of file qquadpath.cpp.

◆ indexOfChildAt()

int QQuadPath::indexOfChildAt ( int i,
int childNumber ) const
inline

Definition at line 216 of file qquadpath_p.h.

◆ isEmpty()

bool QQuadPath::isEmpty ( ) const
inline

Definition at line 228 of file qquadpath_p.h.

◆ isPointNearLine()

bool QQuadPath::isPointNearLine ( const QVector2D & p,
const QVector2D & sp,
const QVector2D & ep )
static

Definition at line 302 of file qquadpath.cpp.

◆ isPointOnLeft()

bool QQuadPath::isPointOnLeft ( const QVector2D & p,
const QVector2D & sp,
const QVector2D & ep )
static

Definition at line 290 of file qquadpath.cpp.

◆ isPointOnLine()

bool QQuadPath::isPointOnLine ( const QVector2D & p,
const QVector2D & sp,
const QVector2D & ep )
static

Definition at line 296 of file qquadpath.cpp.

◆ iterateChildrenOf() [1/2]

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

Definition at line 258 of file qquadpath_p.h.

◆ iterateChildrenOf() [2/2]

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

Definition at line 245 of file qquadpath_p.h.

◆ iterateElements() [1/2]

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

Definition at line 271 of file qquadpath_p.h.

◆ iterateElements() [2/2]

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

Definition at line 283 of file qquadpath_p.h.

◆ lineTo()

void QQuadPath::lineTo ( const QVector2D & to)
inline

Definition at line 196 of file qquadpath_p.h.

◆ moveTo()

void QQuadPath::moveTo ( const QVector2D & to)
inline

Definition at line 190 of file qquadpath_p.h.

◆ pathHints()

PathHints QQuadPath::pathHints ( ) const
inline

Definition at line 309 of file qquadpath_p.h.

◆ quadTo()

void QQuadPath::quadTo ( const QVector2D & control,
const QVector2D & to )
inline

Definition at line 201 of file qquadpath_p.h.

◆ reserve()

void QQuadPath::reserve ( int size)
inline

Definition at line 226 of file qquadpath_p.h.

◆ setFillRule()

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

Definition at line 224 of file qquadpath_p.h.

◆ setHint()

void QQuadPath::setHint ( PathHint hint,
bool on = true )
inline

Definition at line 304 of file qquadpath_p.h.

◆ setPathHints()

void QQuadPath::setPathHints ( PathHints newHints)
inline

Definition at line 314 of file qquadpath_p.h.

◆ splitElementAt()

void QQuadPath::splitElementAt ( int index)

Definition at line 915 of file qquadpath.cpp.

◆ subPathsClosed()

QQuadPath QQuadPath::subPathsClosed ( bool * didClose = nullptr) const

Definition at line 688 of file qquadpath.cpp.

◆ testHint()

bool QQuadPath::testHint ( PathHint hint) const
inline

Definition at line 299 of file qquadpath_p.h.

◆ toPainterPath()

QPainterPath QQuadPath::toPainterPath ( ) const

Definition at line 651 of file qquadpath.cpp.

◆ operator<<

Q_QUICK_EXPORT QDebug operator<< ( QDebug stream,
const QQuadPath & path )
friend

Definition at line 971 of file qquadpath.cpp.

◆ QSGCurveProcessor

friend class QSGCurveProcessor
friend

Definition at line 335 of file qquadpath_p.h.


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