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
QBezier Class Reference

#include <qbezier_p.h>

+ Collaboration diagram for QBezier:

Public Member Functions

QPointF pointAt (qreal t) const
 
QPointF normalVector (qreal t) const
 
QPointF derivedAt (qreal t) const
 
QPointF secondDerivedAt (qreal t) const
 
QPolygonF toPolygon (qreal bezier_flattening_threshold=0.5) const
 
void addToPolygon (QPolygonF *p, qreal bezier_flattening_threshold=0.5) const
 
void addToPolygon (QDataBuffer< QPointF > &polygon, qreal bezier_flattening_threshold) const
 
QRectF bounds () const
 
qreal length (qreal error=0.01) const
 
void addIfClose (qreal *length, qreal error) const
 
qreal tAtLength (qreal len) const
 
int stationaryYPoints (qreal &t0, qreal &t1) const
 
qreal tForY (qreal t0, qreal t1, qreal y) const
 
QPointF pt1 () const
 
QPointF pt2 () const
 
QPointF pt3 () const
 
QPointF pt4 () const
 
QBezier mapBy (const QTransform &transform) const
 
QPointF midPoint () const
 
QLineF midTangent () const
 
QLineF startTangent () const
 
QLineF endTangent () const
 
void parameterSplitLeft (qreal t, QBezier *left)
 
std::pair< QBezier, QBeziersplit () const
 
int shifted (QBezier *curveSegments, int maxSegmets, qreal offset, float threshold) const
 
QBezier bezierOnInterval (qreal t0, qreal t1) const
 
QBezier getSubRange (qreal t0, qreal t1) const
 

Static Public Member Functions

static QBezier fromPoints (const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4)
 
static void coefficients (qreal t, qreal &a, qreal &b, qreal &c, qreal &d)
 

Public Attributes

qreal x1
 
qreal y1
 
qreal x2
 
qreal y2
 
qreal x3
 
qreal y3
 
qreal x4
 
qreal y4
 

Detailed Description

Definition at line 30 of file qbezier_p.h.

Member Function Documentation

◆ addIfClose()

void QBezier::addIfClose ( qreal * length,
qreal error ) const

Definition at line 431 of file qbezier.cpp.

References error, QLineF::length(), split(), x3, x4, y3, and y4.

Referenced by length().

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

◆ addToPolygon() [1/2]

void QBezier::addToPolygon ( QDataBuffer< QPointF > & polygon,
qreal bezier_flattening_threshold ) const

Definition at line 101 of file qbezier.cpp.

References d, qAbs(), and y4.

+ Here is the call graph for this function:

◆ addToPolygon() [2/2]

void QBezier::addToPolygon ( QPolygonF * p,
qreal bezier_flattening_threshold = 0.5 ) const

Definition at line 65 of file qbezier.cpp.

References d, qAbs(), and y4.

Referenced by QOutlineMapper::curveTo(), toPolygon(), and QPainterPath::toSubpathPolygons().

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

◆ bezierOnInterval()

QBezier QBezier::bezierOnInterval ( qreal t0,
qreal t1 ) const

Definition at line 578 of file qbezier.cpp.

References parameterSplitLeft(), and t0.

Referenced by operator<<().

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

◆ bounds()

QRectF QBezier::bounds ( ) const

Definition at line 137 of file qbezier.cpp.

References x1, x2, x3, x4, y1, y2, y3, and y4.

Referenced by QPathSegments::addPath(), QOutlineMapper::curveTo(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), qt_painterpath_isect_curve(), and shift().

+ Here is the caller graph for this function:

◆ coefficients()

void QBezier::coefficients ( qreal t,
qreal & a,
qreal & b,
qreal & c,
qreal & d )
inlinestatic

Definition at line 116 of file qbezier_p.h.

References d.

Referenced by qt_find_ellipse_coords(), and tForY().

+ Here is the caller graph for this function:

◆ derivedAt()

QPointF QBezier::derivedAt ( qreal t) const
inline

Definition at line 162 of file qbezier_p.h.

References d, x3, x4, y3, and y4.

◆ endTangent()

QLineF QBezier::endTangent ( ) const
inline

Definition at line 106 of file qbezier_p.h.

References QLineF::isNull(), pt1(), pt2(), pt3(), and pt4().

+ Here is the call graph for this function:

◆ fromPoints()

static QBezier QBezier::fromPoints ( const QPointF & p1,
const QPointF & p2,
const QPointF & p3,
const QPointF & p4 )
inlinestatic

◆ getSubRange()

QBezier QBezier::getSubRange ( qreal t0,
qreal t1 ) const

Definition at line 45 of file qbezier.cpp.

References parameterSplitLeft(), and qFuzzyIsNull().

+ Here is the call graph for this function:

◆ length()

qreal QBezier::length ( qreal error = 0.01) const

Definition at line 422 of file qbezier.cpp.

References addIfClose(), and error.

+ Here is the call graph for this function:

◆ mapBy()

QBezier QBezier::mapBy ( const QTransform & transform) const

Definition at line 40 of file qbezier.cpp.

References fromPoints(), pt1(), pt2(), pt3(), and pt4().

Referenced by qt_getInflectionPoints().

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

◆ midPoint()

QPointF QBezier::midPoint ( ) const
inline

Definition at line 83 of file qbezier_p.h.

References x3, x4, y3, and y4.

Referenced by midTangent().

+ Here is the caller graph for this function:

◆ midTangent()

QLineF QBezier::midTangent ( ) const
inline

Definition at line 88 of file qbezier_p.h.

References dir, midPoint(), pointAt(), QPointF::x(), x3, x4, QPointF::y(), y3, and y4.

+ Here is the call graph for this function:

◆ normalVector()

QPointF QBezier::normalVector ( qreal t) const
inline

Definition at line 152 of file qbezier_p.h.

References x3, x4, y3, and y4.

◆ parameterSplitLeft()

void QBezier::parameterSplitLeft ( qreal t,
QBezier * left )
inline

Definition at line 205 of file qbezier_p.h.

References x1, x2, x3, x4, y1, y2, y3, and y4.

Referenced by bezierOnInterval(), getSubRange(), qt_addToQuadratics(), and tAtLength().

+ Here is the caller graph for this function:

◆ pointAt()

QPointF QBezier::pointAt ( qreal t) const
inline

Definition at line 127 of file qbezier_p.h.

References x3, x4, y3, and y4.

Referenced by QPathSegments::addPath(), midTangent(), and tForY().

+ Here is the caller graph for this function:

◆ pt1()

QPointF QBezier::pt1 ( ) const
inline

Definition at line 58 of file qbezier_p.h.

Referenced by endTangent(), isLine(), mapBy(), qt_getInflectionPoints(), qt_painterpath_isect_curve(), qt_stroke_side(), split(), and startTangent().

+ Here is the caller graph for this function:

◆ pt2()

QPointF QBezier::pt2 ( ) const
inline

Definition at line 59 of file qbezier_p.h.

Referenced by endTangent(), isLine(), mapBy(), qt_getInflectionPoints(), split(), and startTangent().

+ Here is the caller graph for this function:

◆ pt3()

QPointF QBezier::pt3 ( ) const
inline

Definition at line 60 of file qbezier_p.h.

Referenced by endTangent(), isLine(), mapBy(), split(), and startTangent().

+ Here is the caller graph for this function:

◆ pt4()

QPointF QBezier::pt4 ( ) const
inline

Definition at line 61 of file qbezier_p.h.

Referenced by endTangent(), isLine(), mapBy(), qt_getInflectionPoints(), qt_painterpath_isect_curve(), split(), and startTangent().

+ Here is the caller graph for this function:

◆ secondDerivedAt()

QPointF QBezier::secondDerivedAt ( qreal t) const
inline

Definition at line 177 of file qbezier_p.h.

References d, x3, x4, y3, and y4.

◆ shifted()

int QBezier::shifted ( QBezier * curveSegments,
int maxSegmets,
qreal offset,
float threshold ) const

Definition at line 355 of file qbezier.cpp.

References addCircle(), Circle, Discard, o, Ok, Q_ASSERT, qFuzzyCompare(), shift(), Split, x3, x4, y3, and y4.

Referenced by qt_stroke_side().

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

◆ split()

std::pair< QBezier, QBezier > QBezier::split ( ) const
inline

Definition at line 188 of file qbezier_p.h.

References fromPoints(), pt1(), pt2(), pt3(), and pt4().

Referenced by addIfClose(), qt_isect_curve_horizontal(), qt_isect_curve_vertical(), and qt_painterpath_isect_curve().

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

◆ startTangent()

QLineF QBezier::startTangent ( ) const
inline

Definition at line 96 of file qbezier_p.h.

References QLineF::isNull(), pt1(), pt2(), pt3(), and pt4().

Referenced by qt_stroke_side().

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

◆ stationaryYPoints()

int QBezier::stationaryYPoints ( qreal & t0,
qreal & t1 ) const

Definition at line 496 of file qbezier.cpp.

References qFuzzyIsNull(), qSqrt(), qSwap(), t0, t1, y2, y3, and y4.

+ Here is the call graph for this function:

◆ tAtLength()

qreal QBezier::tAtLength ( qreal len) const

Definition at line 545 of file qbezier.cpp.

References error, parameterSplitLeft(), qAbs(), and qFuzzyCompare().

+ Here is the call graph for this function:

◆ tForY()

qreal QBezier::tForY ( qreal t0,
qreal t1,
qreal y ) const

Definition at line 454 of file qbezier.cpp.

References coefficients(), d, pointAt(), Q_ASSERT, qAbs(), qSwap(), t0, t1, QPointF::y(), y3, and y4.

+ Here is the call graph for this function:

◆ toPolygon()

QT_BEGIN_NAMESPACE QPolygonF QBezier::toPolygon ( qreal bezier_flattening_threshold = 0.5) const

Definition at line 21 of file qbezier.cpp.

References addToPolygon().

Referenced by QTriangulator< T >::initialize().

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

Member Data Documentation

◆ x1

qreal QBezier::x1

Definition at line 80 of file qbezier_p.h.

Referenced by bounds(), parameterSplitLeft(), and shift().

◆ x2

qreal QBezier::x2

Definition at line 80 of file qbezier_p.h.

Referenced by bounds(), parameterSplitLeft(), and shift().

◆ x3

◆ x4

◆ y1

qreal QBezier::y1

Definition at line 80 of file qbezier_p.h.

Referenced by bounds(), parameterSplitLeft(), and shift().

◆ y2

qreal QBezier::y2

Definition at line 80 of file qbezier_p.h.

Referenced by bounds(), parameterSplitLeft(), shift(), and stationaryYPoints().

◆ y3

◆ y4


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