1 #ifndef QCOSMETICSTROKER_P_H
2 #define QCOSMETICSTROKER_P_H
4 #include <private/qdrawhelper_p.h>
5 #include <private/qvectorpath_p.h>
6 #include <private/qpaintengine_raster_p.h>
15 class QCosmeticStroker;
18 typedef void (*StrokeLine)(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
20 class QCosmeticStroker
38 // used to avoid drop outs or duplicated points
46 QCosmeticStroker(QRasterPaintEngineState *s, const QRect &dr)
56 lastAxisAligned(false)
58 ~QCosmeticStroker() { free(pattern); free(reversePattern); }
59 void drawLine(const QPointF &p1, const QPointF &p2);
60 void drawPath(const QVectorPath &path);
61 void drawPoints(const QPoint *points, int num);
62 void drawPoints(const QPointF *points, int num);
65 QRasterPaintEngineState *state;
67 // clip bounds in real
80 enum { NSPANS = 255 };
81 QT_FT_Span spans[NSPANS];
98 void renderCubic(const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4, int caps);
99 void renderCubicSubdivision(PointF *points, int level, int caps);
100 // used for closed subpaths
101 void calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal ry2);
104 bool clipLine(qreal &x1, qreal &y1, qreal &x2, qreal &y2);
111 #endif // QCOSMETICLINE_H