Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSGCurveProcessor Class Reference

#include <qsgcurveprocessor_p.h>

+ Collaboration diagram for QSGCurveProcessor:

Public Types

typedef std::function< QVector3D(QVector2D)> uvForPointCallback
 
typedef std::function< void(const std::array< QVector2D, 3 > &, const std::array< QVector2D, 3 > &, uvForPointCallbackaddTriangleCallback)
 
typedef std::function< void(const std::array< QVector2D, 3 > &, const std::array< QVector2D, 3 > &, const std::array< QVector2D, 3 > &, bool) addStrokeTriangleCallback)
 

Static Public Member Functions

static void processFill (const QQuadPath &path, Qt::FillRule fillRule, addTriangleCallback addTriangle)
 
static void processStroke (const QQuadPath &strokePath, float miterLimit, float penWidth, Qt::PenJoinStyle joinStyle, Qt::PenCapStyle capStyle, addStrokeTriangleCallback addTriangle, int subdivisions=3)
 
static bool solveOverlaps (QQuadPath &path)
 
static QList< QPair< int, int > > findOverlappingCandidates (const QQuadPath &path)
 
static bool removeNestedSubpaths (QQuadPath &path)
 
static bool solveIntersections (QQuadPath &path, bool removeNestedPaths=true)
 

Detailed Description

Definition at line 23 of file qsgcurveprocessor_p.h.

Member Typedef Documentation

◆ addStrokeTriangleCallback

typedef std::function<void(const std::array<QVector2D, 3> &, const std::array<QVector2D, 3> &, const std::array<QVector2D, 3> &, bool) QSGCurveProcessor::addStrokeTriangleCallback)

Definition at line 33 of file qsgcurveprocessor_p.h.

◆ addTriangleCallback

typedef std::function<void(const std::array<QVector2D, 3> &, const std::array<QVector2D, 3> &, uvForPointCallback) QSGCurveProcessor::addTriangleCallback)

Definition at line 29 of file qsgcurveprocessor_p.h.

◆ uvForPointCallback

Definition at line 26 of file qsgcurveprocessor_p.h.

Member Function Documentation

◆ findOverlappingCandidates()

QList< QPair< int, int > > QSGCurveProcessor::findOverlappingCandidates ( const QQuadPath & path)
static

Definition at line 862 of file qsgcurveprocessor.cpp.

References QQuadPath::Element::controlPoint(), QQuadPath::Element::endPoint(), i, j, qMax(), qMin(), r1, QQuadPath::Element::startPoint(), QVector2D::x(), and QVector2D::y().

Referenced by solveIntersections(), and solveOverlaps().

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

◆ processFill()

void QSGCurveProcessor::processFill ( const QQuadPath & path,
Qt::FillRule fillRule,
addTriangleCallback addTriangle )
static

Definition at line 1602 of file qsgcurveprocessor.cpp.

References QQuadPath::Element::controlPoint(), QVector2D::dotProduct(), el, QQuadPath::elementAt(), QQuadPath::Element::endPoint(), i, QQuadPath::Element::isConvex(), QQuadPath::Element::isLine(), isLine(), QQuadPath::isPointOnLeft(), QQuadPath::Element::isSubpathStart(), it, QQuadPath::iterateElements(), j, p1, p2, qFuzzyIsNull(), qRound64(), qSwap(), qTriangulate(), QPainterPath::setFillRule(), sp, QQuadPath::Element::startPoint(), swap(), QVector2D::toPointF(), and triangles.

Referenced by QSGCurveGlyphAtlas::populate().

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

◆ processStroke()

void QSGCurveProcessor::processStroke ( const QQuadPath & strokePath,
float miterLimit,
float penWidth,
Qt::PenJoinStyle joinStyle,
Qt::PenCapStyle capStyle,
addStrokeTriangleCallback addTriangle,
int subdivisions = 3 )
static

Definition at line 1537 of file qsgcurveprocessor.cpp.

References QQuadPath::Element::isLine(), QVector2D::normalized(), and triangles.

Referenced by QSGRhiInternalTextNode::addDecorationNode(), and QSGCurveGlyphAtlas::populate().

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

◆ removeNestedSubpaths()

bool QSGCurveProcessor::removeNestedSubpaths ( QQuadPath & path)
static

Definition at line 941 of file qsgcurveprocessor.cpp.

References i, j, QQuadPath::PathNonIntersecting, Q_ASSERT, QQuadPath::setPathHints(), subPath(), Qt::WindingFill, QVector2D::x(), and QVector2D::y().

Referenced by solveIntersections().

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

◆ solveIntersections()

bool QSGCurveProcessor::solveIntersections ( QQuadPath & path,
bool removeNestedPaths = true )
static

Definition at line 1064 of file qsgcurveprocessor.cpp.

References findOverlappingCandidates(), i, QQuadPath::PathNonIntersecting, removeNestedSubpaths(), t1, and t2.

Referenced by QQuickGenerator::optimizePaths().

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

◆ solveOverlaps()

bool QSGCurveProcessor::solveOverlaps ( QQuadPath & path)
static

Definition at line 844 of file qsgcurveprocessor.cpp.

References findOverlappingCandidates(), and QQuadPath::PathNonOverlappingControlPointTriangles.

Referenced by QQuickGenerator::optimizePaths(), and QSGCurveGlyphAtlas::populate().

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

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