src/gui/painting/qbezier_p.h
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- a/src/gui/painting/qbezier_p.h	Wed Jun 23 19:07:03 2010 +0300
+++ b/src/gui/painting/qbezier_p.h	Tue Jul 06 15:10:48 2010 +0300
@@ -59,6 +59,7 @@
 #include "QtCore/qvector.h"
 #include "QtCore/qlist.h"
 #include "QtCore/qpair.h"
+#include "QtGui/qtransform.h"
 
 QT_BEGIN_NAMESPACE
 
@@ -78,10 +79,9 @@
     inline QPointF derivedAt(qreal t) const;
     inline QPointF secondDerivedAt(qreal t) const;
 
-    QPolygonF toPolygon() const;
-    void addToPolygon(QPolygonF *p) const;
-    void addToPolygonIterative(QPolygonF *p) const;
-    void addToPolygonMixed(QPolygonF *p) const;
+    QPolygonF toPolygon(qreal bezier_flattening_threshold = 0.5) const;
+    void addToPolygon(QPolygonF *p, qreal bezier_flattening_threshold = 0.5) const;
+
     QRectF bounds() const;
     qreal length(qreal error = 0.01) const;
     void addIfClose(qreal *length, qreal error) const;
@@ -96,6 +96,8 @@
     QPointF pt3() const { return QPointF(x3, y3); }
     QPointF pt4() const { return QPointF(x4, y4); }
 
+    QBezier mapBy(const QTransform &transform) const;
+
     inline QPointF midPoint() const;
     inline QLineF midTangent() const;
 
@@ -104,18 +106,12 @@
 
     inline void parameterSplitLeft(qreal t, QBezier *left);
     inline void split(QBezier *firstHalf, QBezier *secondHalf) const;
+
     int shifted(QBezier *curveSegments, int maxSegmets,
                 qreal offset, float threshold) const;
 
-    QVector< QList<QBezier> > splitAtIntersections(QBezier &a);
-
     QBezier bezierOnInterval(qreal t0, qreal t1) const;
-
-    static QVector< QPair<qreal, qreal> > findIntersections(const QBezier &a,
-                                                     const QBezier &b);
-
-    static bool findIntersections(const QBezier &a, const QBezier &b,
-                                  QVector<QPair<qreal, qreal> > *t);
+    QBezier getSubRange(qreal t0, qreal t1) const;
 
     qreal x1, y1, x2, y2, x3, y3, x4, y4;
 };