Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qpaintengine_blitter_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QPAINTENGINE_BLITTER_P_H
6#define QPAINTENGINE_BLITTER_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtGui/private/qtguiglobal_p.h>
20#include "private/qpaintengine_raster_p.h"
21
22#ifndef QT_NO_BLITTABLE
23QT_BEGIN_NAMESPACE
24
25class QBlitterPaintEnginePrivate;
26class QBlittablePlatformPixmap;
27class QBlittable;
28
29class Q_GUI_EXPORT QBlitterPaintEngine : public QRasterPaintEngine
30{
31 Q_DECLARE_PRIVATE(QBlitterPaintEngine)
32public:
33 QBlitterPaintEngine(QBlittablePlatformPixmap *p);
34
35 virtual QPaintEngine::Type type() const override
36 { return Blitter; }
37
38 virtual bool begin(QPaintDevice *pdev) override;
39 virtual bool end() override;
40
41 // Call down into QBlittable
42 void fill(const QVectorPath &path, const QBrush &brush) override;
43 void fillRect(const QRectF &rect, const QBrush &brush) override;
44 void fillRect(const QRectF &rect, const QColor &color) override;
45 void drawRects(const QRect *rects, int rectCount) override;
46 void drawRects(const QRectF *rects, int rectCount) override;
47 void drawPixmap(const QPointF &p, const QPixmap &pm) override;
48 void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override;
49
50 // State tracking
51 void setState(QPainterState *s) override;
52 virtual void clipEnabledChanged() override;
53 virtual void penChanged() override;
54 virtual void brushChanged() override;
55 virtual void opacityChanged() override;
56 virtual void compositionModeChanged() override;
57 virtual void renderHintsChanged() override;
58 virtual void transformChanged() override;
59
60 // Override to lock the QBlittable before using raster
61 void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) override;
62 void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode) override;
63 void fillPath(const QPainterPath &path, QSpanData *fillData) override;
64 void fillPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) override;
65 void drawEllipse(const QRectF &rect) override;
66 void drawImage(const QPointF &p, const QImage &img) override;
67 void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
68 Qt::ImageConversionFlags flags = Qt::AutoColor) override;
69 void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr) override;
70 void drawTextItem(const QPointF &p, const QTextItem &textItem) override;
71 void drawPoints(const QPointF *points, int pointCount) override;
72 void drawPoints(const QPoint *points, int pointCount) override;
73 void stroke(const QVectorPath &path, const QPen &pen) override;
74 void drawStaticTextItem(QStaticTextItem *) override;
75 bool drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs, const QFixedPoint *positions,
76 QFontEngine *fontEngine) override;
77};
78
79QT_END_NAMESPACE
80#endif //QT_NO_BLITTABLE
81#endif // QPAINTENGINE_BLITTER_P_H