56 #include "QtCore/qpoint.h" 57 #include "QtCore/qline.h" 58 #include "QtCore/qrect.h" 59 #include "QtCore/qvector.h" 60 #include "QtCore/qlist.h" 61 #include "QtCore/qpair.h" 62 #include "QtGui/qtransform.h" 82 QPolygonF toPolygon(
qreal bezier_flattening_threshold = 0.5)
const;
83 void addToPolygon(
QPolygonF *p,
qreal bezier_flattening_threshold = 0.5)
const;
91 int stationaryYPoints(
qreal &t0,
qreal &t1)
const;
102 inline QLineF midTangent()
const;
104 inline QLineF startTangent()
const;
105 inline QLineF endTangent()
const;
110 int shifted(
QBezier *curveSegments,
int maxSegmets,
111 qreal offset,
float threshold)
const;
121 return QPointF((x1 + x4 + 3*(x2 + x3))/8., (y1 + y4 + 3*(y2 + y3))/8.);
129 mid.
x() + dir.
dx(), mid.
y() + dir.
dy());
134 QLineF tangent(pt1(), pt2());
136 tangent =
QLineF(pt1(), pt3());
138 tangent =
QLineF(pt1(), pt4());
144 QLineF tangent(pt4(), pt3());
146 tangent =
QLineF(pt4(), pt2());
148 tangent =
QLineF(pt4(), pt1());
171 qreal b = x2*m_t + x3*t;
179 qreal b = y2*m_t + y3*t;
195 return QPointF((y2-y1) * a + (y3-y2) * b + (y4-y3) * c, -(x2-x1) * a - (x3-x2) * b - (x4-x3) * c);
206 qreal b = 1 - 4 * t + 3 *
d;
209 return 3 *
QPointF(a * x1 + b * x2 + c * x3 + d * x4,
210 a * y1 + b * y2 + c * y3 + d * y4);
216 qreal b = -4 + 6 * t;
220 return 3 *
QPointF(a * x1 + b * x2 + c * x3 + d * x4,
221 a * y1 + b * y2 + c * y3 + d * y4);
230 firstHalf->
x2 = (x1 + x2)*.5;
231 secondHalf->
x3 = (x3 + x4)*.5;
234 firstHalf->
x3 = (firstHalf->
x2 +
c)*.5;
235 secondHalf->
x2 = (secondHalf->
x3 +
c)*.5;
236 firstHalf->
x4 = secondHalf->
x1 = (firstHalf->
x3 + secondHalf->
x2)*.5;
239 firstHalf->
y2 = (y1 + y2)*.5;
240 secondHalf->
y3 = (y3 + y4)*.5;
243 firstHalf->
y3 = (firstHalf->
y2 +
c)*.5;
244 secondHalf->
y2 = (secondHalf->
y3 +
c)*.5;
245 firstHalf->
y4 = secondHalf->
y1 = (firstHalf->
y3 + secondHalf->
y2)*.5;
253 left->
x2 = x1 + t * ( x2 - x1 );
254 left->
y2 = y1 + t * ( y2 - y1 );
256 left->
x3 = x2 + t * ( x3 - x2 );
257 left->
y3 = y2 + t * ( y3 - y2 );
259 x3 = x3 + t * ( x4 - x3 );
260 y3 = y3 + t * ( y4 - y3 );
262 x2 = left->
x3 + t * ( x3 - left->
x3);
263 y2 = left->
y3 + t * ( y3 - left->
y3);
265 left->
x3 = left->
x2 + t * ( left->
x3 - left->
x2 );
266 left->
y3 = left->
y2 + t * ( left->
y3 - left->
y2 );
268 left->
x4 = x1 = left->
x3 + t * (x2 - left->
x3);
269 left->
y4 = y1 = left->
y3 + t * (y2 - left->
y3);
274 #endif // QBEZIER_P_H
QLineF startTangent() const
#define QT_END_NAMESPACE
This macro expands to.
void parameterSplitLeft(qreal t, QBezier *left)
QLineF endTangent() const
The QPointF class defines a point in the plane using floating point precision.
static void coefficients(qreal t, qreal &a, qreal &b, qreal &c, qreal &d)
long ASN1_INTEGER_get ASN1_INTEGER * a
qreal dy() const
Returns the vertical component of the line's vector.
QPointF pointAt(qreal t) const
qreal x() const
Returns the x-coordinate of this point.
The QLineF class provides a two-dimensional vector using floating point precision.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
QPointF normalVector(qreal t) const
The QPolygonF class provides a vector of points using floating point precision.
static void split(QT_FT_Vector *b)
qreal dx() const
Returns the horizontal component of the line's vector.
QPointF derivedAt(qreal t) const
QLineF midTangent() const
static QPointF midPoint(const QWingedEdge &list, int ei)
void split(QBezier *firstHalf, QBezier *secondHalf) const
qreal y() const
Returns the y-coordinate of this point.
QPointF secondDerivedAt(qreal t) const
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
bool isNull() const
Returns true if the line is not set up with valid start and end point; otherwise returns false...