Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qbezier.cpp File Reference
#include "qbezier_p.h"
#include <qdebug.h>
#include <qline.h>
#include <qmath.h>
#include <qpolygon.h>
#include <private/qnumeric_p.h>
#include <tuple>
+ Include dependency graph for qbezier.cpp:

Go to the source code of this file.

Macros

#define KAPPA   qreal(0.5522847498)
 

Enumerations

enum  ShiftResult { Ok , Discard , Split , Circle }
 

Functions

static qreal scoreQuadratic (const QBezier &b, QPointF qcp)
 
static QPointF quadraticForCubic (const QBezier &b)
 
static ShiftResult good_offset (const QBezier *b1, const QBezier *b2, qreal offset, qreal threshold)
 
static QT_WARNING_DISABLE_FLOAT_COMPARE ShiftResult shift (const QBezier *orig, QBezier *shifted, qreal offset, qreal threshold)
 
static bool addCircle (const QBezier *b, qreal offset, QBezier *o)
 

Macro Definition Documentation

◆ KAPPA

#define KAPPA   qreal(0.5522847498)

Definition at line 394 of file qbezier.cpp.

Enumeration Type Documentation

◆ ShiftResult

Enumerator
Ok 
Discard 
Split 
Circle 

Definition at line 274 of file qbezier.cpp.

Function Documentation

◆ addCircle()

static bool addCircle ( const QBezier b,
qreal  offset,
QBezier o 
)
static

Definition at line 397 of file qbezier.cpp.

References dist(), i, KAPPA, M_1_PI, o, qAcos(), qFuzzyIsNull(), qSqrt(), sign(), QPointF::x(), and QPointF::y().

Referenced by QBezier::shifted().

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

◆ good_offset()

static ShiftResult good_offset ( const QBezier b1,
const QBezier b2,
qreal  offset,
qreal  threshold 
)
static

Definition at line 281 of file qbezier.cpp.

References d, i, QBezier::normalVector(), Ok, p1, p2, QBezier::pointAt(), qAbs(), spacing, Split, QPointF::x(), and QPointF::y().

Referenced by shift().

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

◆ quadraticForCubic()

static QPointF quadraticForCubic ( const QBezier b)
inlinestatic

Definition at line 169 of file qbezier.cpp.

References QLineF::intersects(), and QLineF::NoIntersection.

Referenced by QBezier::addToQuadratics().

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

◆ scoreQuadratic()

static qreal scoreQuadratic ( const QBezier b,
QPointF  qcp 
)
inlinestatic

Definition at line 154 of file qbezier.cpp.

References QRectF::bottomRight(), d1, d2, QLineF::length(), qFuzzyIsNull(), qMax(), and QRectF::topLeft().

Referenced by QBezier::addToQuadratics().

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

◆ shift()