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>
9 class QCosmeticStroker;
12 typedef void (*StrokeLine)(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
14 class QCosmeticStroker
32 // used to avoid drop outs or duplicated points
40 QCosmeticStroker(QRasterPaintEngineState *s, const QRect &dr)
50 lastAxisAligned(false)
52 ~QCosmeticStroker() { free(pattern); free(reversePattern); }
53 void drawLine(const QPointF &p1, const QPointF &p2);
54 void drawPath(const QVectorPath &path);
55 void drawPoints(const QPoint *points, int num);
56 void drawPoints(const QPointF *points, int num);
59 QRasterPaintEngineState *state;
61 // clip bounds in real
74 enum { NSPANS = 255 };
75 QT_FT_Span spans[NSPANS];
92 void renderCubic(const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4, int caps);
93 void renderCubicSubdivision(PointF *points, int level, int caps);
94 // used for closed subpaths
95 void calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal ry2);
98 bool clipLine(qreal &x1, qreal &y1, qreal &x2, qreal &y2);
101 #endif // QCOSMETICLINE_H