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

(fc5c2272d4fafdb2b3cf3f2129b6845b12259fd8)

#include "qpainterpath.h"
#include "qpainterpath_p.h"
#include <qbitmap.h>
#include <qdebug.h>
#include <qiodevice.h>
#include <qlist.h>
#include <qpen.h>
#include <qpolygon.h>
#include <qtextlayout.h>
#include <qvarlengtharray.h>
#include <qmath.h>
#include <private/qbezier_p.h>
#include <private/qfontengine_p.h>
#include <private/qnumeric_p.h>
#include <private/qobject_p.h>
#include <private/qpathclipper_p.h>
#include <private/qstroker_p.h>
#include <private/qtextengine_p.h>
#include <cmath>
#include <limits.h>
Include dependency graph for qpainterpath.cpp:

Go to the source code of this file.

Macros

#define PM_INIT
#define PM_MEASURE(x)
#define PM_DISPLAY
#define QT_BEZIER_A(bezier, coord)
#define QT_BEZIER_B(bezier, coord)
#define QT_BEZIER_C(bezier, coord)
#define QT_BEZIER_CHECK_T(bezier, t)

Enumerations

enum  PainterDirections {
  Left , Right , Top , Bottom ,
  Left , Right , Top , Bottom
}
enum  PainterDirections {
  Left , Right , Top , Bottom ,
  Left , Right , Top , Bottom
}

Functions

static QT_BEGIN_NAMESPACE bool isValidCoord (qreal c)
static bool hasValidCoords (QPointF p)
static bool hasValidCoords (QRectF r)
QPainterPath qt_stroke_dash (const QPainterPath &path, qreal *dashes, int dashCount)
void qt_find_ellipse_coords (const QRectF &r, qreal angle, qreal length, QPointF *startPoint, QPointF *endPoint)
static QRectF qt_painterpath_bezier_extrema (const QBezier &b)
static void qt_painterpath_isect_line (const QPointF &p1, const QPointF &p2, const QPointF &pos, int *winding)
static void qt_painterpath_isect_curve (const QBezier &bezier, const QPointF &pt, int *winding, int depth=0)
static bool qt_painterpath_isect_line_rect (qreal x1, qreal y1, qreal x2, qreal y2, const QRectF &rect)
static bool qt_isect_curve_horizontal (const QBezier &bezier, qreal y, qreal x1, qreal x2, int depth=0)
static bool qt_isect_curve_vertical (const QBezier &bezier, qreal x, qreal y1, qreal y2, int depth=0)
static bool pointOnEdge (const QRectF &rect, const QPointF &point)
static bool qt_painterpath_check_crossing (const QPainterPath *path, const QRectF &rect)
static bool epsilonCompare (const QPointF &a, const QPointF &b, const QSizeF &epsilon)
QDataStreamoperator<< (QDataStream &s, const QPainterPath &p)
QDataStreamoperator>> (QDataStream &s, QPainterPath &p)
void qt_path_stroke_move_to (qfixed x, qfixed y, void *data)
void qt_path_stroke_line_to (qfixed x, qfixed y, void *data)
void qt_path_stroke_cubic_to (qfixed c1x, qfixed c1y, qfixed c2x, qfixed c2y, qfixed ex, qfixed ey, void *data)
static qreal slopeAt (qreal t, qreal a, qreal b, qreal c, qreal d)
static QBezier uncached_bezierAtT (const QPainterPath &path, qreal t, qreal *startingLength, qreal *bezierLength)
QDebug operator<< (QDebug s, const QPainterPath &p)

Macro Definition Documentation

◆ PM_DISPLAY

#define PM_DISPLAY

Definition at line 34 of file qpainterpath.cpp.

◆ PM_INIT

#define PM_INIT

Definition at line 32 of file qpainterpath.cpp.

◆ PM_MEASURE

#define PM_MEASURE ( x)

Definition at line 33 of file qpainterpath.cpp.

◆ QT_BEZIER_A

#define QT_BEZIER_A ( bezier,
coord )
Value:
3 * (-bezier.coord##1 \
+ 3*bezier.coord##2 \
- 3*bezier.coord##3 \
+bezier.coord##4)

Definition at line 1347 of file qpainterpath.cpp.

◆ QT_BEZIER_B

#define QT_BEZIER_B ( bezier,
coord )
Value:
6 * (bezier.coord##1 \
- 2*bezier.coord##2 \
+ bezier.coord##3)

Definition at line 1352 of file qpainterpath.cpp.

◆ QT_BEZIER_C

#define QT_BEZIER_C ( bezier,
coord )
Value:
3 * (- bezier.coord##1 \
+ bezier.coord##2)

Definition at line 1356 of file qpainterpath.cpp.

◆ QT_BEZIER_CHECK_T

#define QT_BEZIER_CHECK_T ( bezier,
t )
Value:
if (t >= 0 && t <= 1) { \
QPointF p(b.pointAt(t)); \
if (p.x() < minx) minx = p.x(); \
else if (p.x() > maxx) maxx = p.x(); \
if (p.y() < miny) miny = p.y(); \
else if (p.y() > maxy) maxy = p.y(); \
}
\inmodule QtCore\reentrant
Definition qpoint.h:231
GLboolean GLboolean GLboolean b
GLfloat GLfloat p
GLdouble GLdouble t
Definition qopenglext.h:243

Definition at line 1359 of file qpainterpath.cpp.

Enumeration Type Documentation

◆ PainterDirections [1/2]

Enumerator
Left 
Right 
Top 
Bottom 
Left 
Right 
Top 
Bottom 

Definition at line 1855 of file qpainterpath.cpp.

◆ PainterDirections [2/2]

Enumerator
Left 
Right 
Top 
Bottom 
Left 
Right 
Top 
Bottom 

Definition at line 1855 of file qpainterpath.cpp.

Function Documentation

◆ epsilonCompare()

bool epsilonCompare ( const QPointF & a,
const QPointF & b,
const QSizeF & epsilon )
inlinestatic

Definition at line 2250 of file qpainterpath.cpp.

◆ hasValidCoords() [1/2]

bool hasValidCoords ( QPointF p)
static

Definition at line 47 of file qpainterpath.cpp.

◆ hasValidCoords() [2/2]

bool hasValidCoords ( QRectF r)
static

Definition at line 52 of file qpainterpath.cpp.

◆ isValidCoord()

QT_BEGIN_NAMESPACE bool isValidCoord ( qreal c)
inlinestatic

Definition at line 39 of file qpainterpath.cpp.

◆ operator<<() [1/2]

QDataStream & operator<< ( QDataStream & s,
const QPainterPath & p )

Definition at line 2420 of file qpainterpath.cpp.

◆ operator<<() [2/2]

QDebug operator<< ( QDebug s,
const QPainterPath & p )

Definition at line 3681 of file qpainterpath.cpp.

◆ operator>>()

QDataStream & operator>> ( QDataStream & s,
QPainterPath & p )

Definition at line 2447 of file qpainterpath.cpp.

◆ pointOnEdge()

bool pointOnEdge ( const QRectF & rect,
const QPointF & point )
static

Definition at line 1972 of file qpainterpath.cpp.

◆ qt_find_ellipse_coords()

void qt_find_ellipse_coords ( const QRectF & r,
qreal angle,
qreal length,
QPointF * startPoint,
QPointF * endPoint )

Definition at line 67 of file qpainterpath.cpp.

◆ qt_isect_curve_horizontal()

bool qt_isect_curve_horizontal ( const QBezier & bezier,
qreal y,
qreal x1,
qreal x2,
int depth = 0 )
static

Definition at line 1936 of file qpainterpath.cpp.

◆ qt_isect_curve_vertical()

bool qt_isect_curve_vertical ( const QBezier & bezier,
qreal x,
qreal y1,
qreal y2,
int depth = 0 )
static

Definition at line 1954 of file qpainterpath.cpp.

◆ qt_painterpath_bezier_extrema()

QRectF qt_painterpath_bezier_extrema ( const QBezier & b)
static

Definition at line 1369 of file qpainterpath.cpp.

◆ qt_painterpath_check_crossing()

bool qt_painterpath_check_crossing ( const QPainterPath * path,
const QRectF & rect )
static

Definition at line 1986 of file qpainterpath.cpp.

◆ qt_painterpath_isect_curve()

void qt_painterpath_isect_curve ( const QBezier & bezier,
const QPointF & pt,
int * winding,
int depth = 0 )
static

Definition at line 1762 of file qpainterpath.cpp.

◆ qt_painterpath_isect_line()

void qt_painterpath_isect_line ( const QPointF & p1,
const QPointF & p2,
const QPointF & pos,
int * winding )
static

Definition at line 1730 of file qpainterpath.cpp.

◆ qt_painterpath_isect_line_rect()

bool qt_painterpath_isect_line_rect ( qreal x1,
qreal y1,
qreal x2,
qreal y2,
const QRectF & rect )
static

Definition at line 1857 of file qpainterpath.cpp.

References Bottom, Left, Right, and Top.

◆ qt_path_stroke_cubic_to()

void qt_path_stroke_cubic_to ( qfixed c1x,
qfixed c1y,
qfixed c2x,
qfixed c2y,
qfixed ex,
qfixed ey,
void * data )

Definition at line 2504 of file qpainterpath.cpp.

◆ qt_path_stroke_line_to()

void qt_path_stroke_line_to ( qfixed x,
qfixed y,
void * data )

Definition at line 2499 of file qpainterpath.cpp.

◆ qt_path_stroke_move_to()

void qt_path_stroke_move_to ( qfixed x,
qfixed y,
void * data )

Definition at line 2494 of file qpainterpath.cpp.

◆ qt_stroke_dash()

QPainterPath qt_stroke_dash ( const QPainterPath & path,
qreal * dashes,
int dashCount )

◆ slopeAt()

qreal slopeAt ( qreal t,
qreal a,
qreal b,
qreal c,
qreal d )
inlinestatic

Definition at line 2874 of file qpainterpath.cpp.

◆ uncached_bezierAtT()

QBezier uncached_bezierAtT ( const QPainterPath & path,
qreal t,
qreal * startingLength,
qreal * bezierLength )
inlinestatic

Definition at line 3010 of file qpainterpath.cpp.