1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QRASTERIZER_P_H |
5 | #define QRASTERIZER_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtGui/private/qtguiglobal_p.h> |
19 | #include "QtGui/qpainter.h" |
20 | |
21 | #include <private/qdrawhelper_p.h> |
22 | #include <private/qrasterdefs_p.h> |
23 | |
24 | QT_BEGIN_NAMESPACE |
25 | |
26 | struct QSpanData; |
27 | class QRasterBuffer; |
28 | class QRasterizerPrivate; |
29 | |
30 | class |
31 | QRasterizer |
32 | { |
33 | public: |
34 | QRasterizer(); |
35 | ~QRasterizer(); |
36 | |
37 | void setAntialiased(bool antialiased); |
38 | void setClipRect(const QRect &clipRect); |
39 | |
40 | void initialize(ProcessSpans blend, void *data); |
41 | |
42 | void rasterize(const QT_FT_Outline *outline, Qt::FillRule fillRule); |
43 | void rasterize(const QPainterPath &path, Qt::FillRule fillRule); |
44 | |
45 | // width should be in units of |a-b| |
46 | void rasterizeLine(const QPointF &a, const QPointF &b, qreal width, bool squareCap = false); |
47 | |
48 | private: |
49 | QRasterizerPrivate *d; |
50 | }; |
51 | |
52 | QT_END_NAMESPACE |
53 | |
54 | #endif |
55 | |