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
qquadpath.cpp File Reference

(34d8cedb67f286d2c9a78e6a6587f062ebe6af48)

#include "qquadpath_p.h"
#include <QtGui/private/qbezier_p.h>
#include <QtMath>
#include <QtCore/QLoggingCategory>
#include <QtCore/QVarLengthArray>
+ Include dependency graph for qquadpath.cpp:

Go to the source code of this file.

Classes

class  ElementCutter
 

Macros

#define QQUICKSHAPECURVERENDERER_CONVEX_CHECK_ERROR_MARGIN   (1.0f / 32.0f)
 

Functions

QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY (lcSGCurveProcessor)
 
static qreal qt_scoreQuadratic (const QBezier &b, QPointF qcp)
 
static QPointF qt_quadraticForCubic (const QBezier &b)
 
static int qt_getInflectionPoints (const QBezier &orig, qreal *tpoints)
 
static void qt_addToQuadratics (const QBezier &b, QPolygonF *p, int maxSplits, qreal maxDiff)
 
static void qt_toQuadratics (const QBezier &b, QPolygonF *out, qreal errorLimit=0.01)
 
static float crossProduct (const QVector2D &sp, const QVector2D &p, const QVector2D &ep)
 
static void printElement (QDebug stream, const QQuadPath::Element &element)
 
QDebug operator<< (QDebug stream, const QQuadPath::Element &element)
 
QDebug operator<< (QDebug stream, const QQuadPath &path)
 

Macro Definition Documentation

◆ QQUICKSHAPECURVERENDERER_CONVEX_CHECK_ERROR_MARGIN

#define QQUICKSHAPECURVERENDERER_CONVEX_CHECK_ERROR_MARGIN   (1.0f / 32.0f)

Definition at line 477 of file qquadpath.cpp.

Function Documentation

◆ crossProduct()

static float crossProduct ( const QVector2D & sp,
const QVector2D & p,
const QVector2D & ep )
static

Definition at line 282 of file qquadpath.cpp.

References sp.

Referenced by QQuadPath::isPointOnLeft(), QQuadPath::isPointOnLine(), QVector3D::normal(), and QVector3D::normal().

+ Here is the caller graph for this function:

◆ operator<<() [1/2]

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

Definition at line 933 of file qquadpath.cpp.

References QQuadPath::contains(), and QQuadPath::elementCount().

+ Here is the call graph for this function:

◆ operator<<() [2/2]

QDebug operator<< ( QDebug stream,
const QQuadPath::Element & element )

Definition at line 923 of file qquadpath.cpp.

References QBezier::bezierOnInterval(), i, out, qt_addToQuadratics(), and t1.

+ Here is the call graph for this function:

◆ printElement()

static void printElement ( QDebug stream,
const QQuadPath::Element & element )
static

Definition at line 912 of file qquadpath.cpp.

References QQuadPath::Element::controlPoint(), QQuadPath::Element::endPoint(), QQuadPath::Element::isConvex(), QQuadPath::Element::isLine(), QQuadPath::Element::isSubpathEnd(), QQuadPath::Element::isSubpathStart(), and QQuadPath::Element::startPoint().

+ Here is the call graph for this function:

◆ Q_DECLARE_LOGGING_CATEGORY()

QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY ( lcSGCurveProcessor )

◆ qt_addToQuadratics()

static void qt_addToQuadratics ( const QBezier & b,
QPolygonF * p,
int maxSplits,
qreal maxDiff )
static

Definition at line 146 of file qquadpath.cpp.

References QBezier::parameterSplitLeft(), qt_addToQuadratics(), qt_quadraticForCubic(), and qt_scoreQuadratic().

Referenced by operator<<(), and qt_addToQuadratics().

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

◆ qt_getInflectionPoints()

static int qt_getInflectionPoints ( const QBezier & orig,
qreal * tpoints )
static

Definition at line 91 of file qquadpath.cpp.

References QLineF::angle(), QBezier::mapBy(), QBezier::pt1(), QBezier::pt2(), QBezier::pt4(), qFuzzyCompare(), qFuzzyIsNull(), qIsFinite(), qSqrt(), qSwap(), QPointF::x(), and QPointF::y().

Referenced by qt_toQuadratics().

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

◆ qt_quadraticForCubic()

static QPointF qt_quadraticForCubic ( const QBezier & b)
static

Definition at line 70 of file qquadpath.cpp.

References QLineF::NoIntersection.

Referenced by qt_addToQuadratics().

+ Here is the caller graph for this function:

◆ qt_scoreQuadratic()

static qreal qt_scoreQuadratic ( const QBezier & b,
QPointF qcp )
static

Definition at line 14 of file qquadpath.cpp.

References d, QPointF::dotProduct(), i, init(), and Q_STATIC_ASSERT.

Referenced by qt_addToQuadratics().

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

◆ qt_toQuadratics()

static void qt_toQuadratics ( const QBezier & b,
QPolygonF * out,
qreal errorLimit = 0.01 )
static

Definition at line 161 of file qquadpath.cpp.

References c2, QPointF::dotProduct(), out, and qt_getInflectionPoints().

Referenced by QQuadPath::fromPainterPath().

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