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

(1d3fb34c69666d876eef158e61dbe9bf1b4276bd)

#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 cc)
static bool hasValidCoords (QPointF pp)
static bool hasValidCoords (QRectF rr)
QPainterPath qt_stroke_dash (const QPainterPath &pathpath, qreal *dashes, int dashCountdashCount)
void qt_find_ellipse_coords (const QRectF &rr, qreal angleangle, qreal lengthlength, QPointF *startPoint, QPointF *endPoint)
static QRectF qt_painterpath_bezier_extrema (const QBezier &bb)
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 depthdepth=0)
static bool qt_painterpath_isect_line_rect (qreal x1x1, qreal y1y1, qreal x2x2, qreal y2y2, const QRectF &rect)
static bool qt_isect_curve_horizontal (const QBezier &bezier, qreal yy, qreal x1x1, qreal x2x2, int depthdepth=0)
static bool qt_isect_curve_vertical (const QBezier &bezier, qreal xx, qreal y1y1, qreal y2y2, int depthdepth=0)
static bool pointOnEdge (const QRectF &rect, const QPointF &point)
static bool qt_painterpath_check_crossing (const QPainterPath *pathpath, const QRectF &rect)
static bool epsilonCompare (const QPointF &aa, const QPointF &bb, const QSizeF &epsilon)
QDataStream & operator<< (QDataStream &ss, const QPainterPath &pp)
QDataStream & operator>> (QDataStream &ss, QPainterPath &pp)
void qt_path_stroke_move_to (qfixed xx, qfixed yy, void *datadata)
void qt_path_stroke_line_to (qfixed xx, qfixed yy, void *datadata)
void qt_path_stroke_cubic_to (qfixed c1x, qfixed c1y, qfixed c2x, qfixed c2y, qfixed ex, qfixed ey, void *datadata)
static qreal slopeAt (qreal tt, qreal aa, qreal bb, qreal cc, qreal d)
static QBezier uncached_bezierAtT (const QPainterPath &pathpath, qreal tt, qreal *startingLength, qreal *bezierLength)
QDebug operator<< (QDebug ss, const QPainterPath &pp)

Macro Definition Documentation

◆ PM_DISPLAY

#define PM_DISPLAY

Definition at line 35 of file qpainterpath.cpp.

◆ PM_INIT

#define PM_INIT

Definition at line 33 of file qpainterpath.cpp.

◆ PM_MEASURE

#define PM_MEASURE ( x)

Definition at line 34 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 1400 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 1405 of file qpainterpath.cpp.

◆ QT_BEZIER_C

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

Definition at line 1409 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:232
GLboolean GLboolean GLboolean b
GLfloat GLfloat p
GLdouble GLdouble t
Definition qopenglext.h:243

Definition at line 1412 of file qpainterpath.cpp.

Enumeration Type Documentation

◆ PainterDirections [1/2]

Enumerator
Left 
Right 
Top 
Bottom 
Left 
Right 
Top 
Bottom 

Definition at line 1908 of file qpainterpath.cpp.

◆ PainterDirections [2/2]

Enumerator
Left 
Right 
Top 
Bottom 
Left 
Right 
Top 
Bottom 

Definition at line 1908 of file qpainterpath.cpp.

Function Documentation

◆ epsilonCompare()

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

Definition at line 2302 of file qpainterpath.cpp.

◆ hasValidCoords() [1/2]

bool hasValidCoords ( QPointF p)
static

Definition at line 48 of file qpainterpath.cpp.

◆ hasValidCoords() [2/2]

bool hasValidCoords ( QRectF r)
static

Definition at line 53 of file qpainterpath.cpp.

◆ isValidCoord()

QT_BEGIN_NAMESPACE bool isValidCoord ( qreal c)
inlinestatic

Definition at line 40 of file qpainterpath.cpp.

◆ operator<<() [1/2]

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

Definition at line 2472 of file qpainterpath.cpp.

◆ operator<<() [2/2]

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

Definition at line 3808 of file qpainterpath.cpp.

◆ operator>>()

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

Definition at line 2506 of file qpainterpath.cpp.

◆ pointOnEdge()

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

Definition at line 2025 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 68 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 1989 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 2007 of file qpainterpath.cpp.

◆ qt_painterpath_bezier_extrema()

QRectF qt_painterpath_bezier_extrema ( const QBezier & b)
static

Definition at line 1422 of file qpainterpath.cpp.

◆ qt_painterpath_check_crossing()

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

Definition at line 2039 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 1815 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 1783 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 1910 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 2618 of file qpainterpath.cpp.

◆ qt_path_stroke_line_to()

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

Definition at line 2613 of file qpainterpath.cpp.

◆ qt_path_stroke_move_to()

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

Definition at line 2608 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 2990 of file qpainterpath.cpp.

◆ uncached_bezierAtT()

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

Definition at line 3128 of file qpainterpath.cpp.