Qt 4.8
|
#include "private/qstroker_p.h"
#include "private/qbezier_p.h"
#include "private/qmath_p.h"
#include "qline.h"
#include "qtransform.h"
#include <qmath.h>
Go to the source code of this file.
Classes | |
class | QSubpathBackwardIterator |
class | QSubpathFlatIterator |
class | QSubpathForwardIterator |
Functions | |
static qreal | adapted_angle_on_x (const QLineF &line) |
static bool | lineIntersectsRect (qfixed2d p1, qfixed2d p2, const qfixed2d &tl, const qfixed2d &br) |
static bool | lineRectIntersectsRect (qfixed2d p1, qfixed2d p2, const qfixed2d &tl, const qfixed2d &br) |
static void | qdashstroker_cubicTo (qfixed, qfixed, qfixed, qfixed, qfixed, qfixed, void *) |
static void | qdashstroker_lineTo (qfixed x, qfixed y, void *data) |
static void | qdashstroker_moveTo (qfixed x, qfixed y, void *data) |
QPointF | qt_curves_for_arc (const QRectF &rect, qreal startAngle, qreal sweepLength, QPointF *curves, int *point_count) |
Creates a number of curves for a given arc definition. More... | |
Q_GUI_EXPORT void | qt_find_ellipse_coords (const QRectF &r, qreal angle, qreal length, QPointF *startPoint, QPointF *endPoint) |
template<class Iterator > | |
bool | qt_stroke_side (Iterator *it, QStroker *stroker, bool capFirst, QLineF *startTangent) |
qreal | qt_t_for_arc_angle (qreal angle) |
Definition at line 182 of file qstroker.cpp.
Referenced by QStroker::joinPoints().
|
static |
Definition at line 1069 of file qstroker.cpp.
Referenced by QDashStroker::processCurrentSubpath().
|
inlinestatic |
Definition at line 1062 of file qstroker.cpp.
Referenced by lineIntersectsRect(), and QDashStroker::processCurrentSubpath().
|
inlinestatic |
Definition at line 1011 of file qstroker.cpp.
Referenced by QDashStroker::QDashStroker().
Definition at line 1007 of file qstroker.cpp.
Referenced by QDashStroker::QDashStroker().
QPointF qt_curves_for_arc | ( | const QRectF & | rect, |
qreal | startAngle, | ||
qreal | sweepLength, | ||
QPointF * | curves, | ||
int * | point_count | ||
) |
Creates a number of curves for a given arc definition.
The arc is defined an arc along the ellipses that fits into rect starting at startAngle and an arc length of sweepLength.
The function has three out parameters. The return value is the starting point of the arc. The curves array represents the list of cubicTo elements up to a maximum of point_count. There are of course 3 points pr curve.
Definition at line 859 of file qstroker.cpp.
Referenced by QPainterPath::addEllipse(), QPainterPath::arcTo(), QPaintEngineEx::drawEllipse(), QStroker::joinPoints(), and QStrokerOps::strokeEllipse().
Q_GUI_EXPORT void qt_find_ellipse_coords | ( | const QRectF & | r, |
qreal | angle, | ||
qreal | length, | ||
QPointF * | startPoint, | ||
QPointF * | endPoint | ||
) |
Definition at line 97 of file qpainterpath.cpp.
Referenced by QPainterPath::arcMoveTo(), qt_curves_for_arc(), and qt_t_for_arc_angle().
bool qt_stroke_side | ( | Iterator * | it, |
QStroker * | stroker, | ||
bool | capFirst, | ||
QLineF * | startTangent | ||
) |
Definition at line 635 of file qstroker.cpp.
Referenced by QStroker::processCurrentSubpath().
For a given angle in the range [0 .. 90], finds the corresponding parameter t of the prototype cubic bezier arc segment b = fromPoints(QPointF(1, 0), QPointF(1, KAPPA), QPointF(KAPPA, 1), QPointF(0, 1));
From the bezier equation: b.pointAt(t).x() = (1-t)^3 + t*(1-t)^2 + t^2*(1-t)*KAPPA b.pointAt(t).y() = t*(1-t)^2 * KAPPA + t^2*(1-t) + t^3
Third degree coefficients: b.pointAt(t).x() = at^3 + bt^2 + ct + d where a = 2-3*KAPPA, b = 3*(KAPPA-1), c = 0, d = 1
b.pointAt(t).y() = at^3 + bt^2 + ct + d where a = 3*KAPPA-2, b = 6*KAPPA+3, c = 3*KAPPA, d = 0
Newton's method to find the zero of a function: given a function f(x) and initial guess x_0 x_1 = f(x_0) / f'(x_0) x_2 = f(x_1) / f'(x_1) etc...
Definition at line 796 of file qstroker.cpp.
Referenced by qt_curves_for_arc(), and qt_find_ellipse_coords().