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
qemulationpaintengine_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 QEMULATIONPAINTENGINE_P_H
6#define QEMULATIONPAINTENGINE_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/qpaintengineex_p.h>
21
22QT_BEGIN_NAMESPACE
23
24
25class QEmulationPaintEngine : public QPaintEngineEx
26{
27public:
28 QEmulationPaintEngine(QPaintEngineEx *engine);
29
30 bool begin(QPaintDevice *pdev) override;
31 bool end() override;
32
33 Type type() const override;
34 QPainterState *createState(QPainterState *orig) const override;
35
36 void fill(const QVectorPath &path, const QBrush &brush) override;
37 void stroke(const QVectorPath &path, const QPen &pen) override;
38 void clip(const QVectorPath &path, Qt::ClipOperation op) override;
39
40 void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override;
41 void drawTextItem(const QPointF &p, const QTextItem &textItem) override;
42 void drawStaticTextItem(QStaticTextItem *item) override;
43 void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) override;
44 void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags) override;
45
46 void clipEnabledChanged() override;
47 void penChanged() override;
48 void brushChanged() override;
49 void brushOriginChanged() override;
50 void opacityChanged() override;
51 void compositionModeChanged() override;
52 void renderHintsChanged() override;
53 void transformChanged() override;
54
55 void setState(QPainterState *s) override;
56
57 void beginNativePainting() override;
58 void endNativePainting() override;
59
60 uint flags() const override { return QPaintEngineEx::IsEmulationEngine | QPaintEngineEx::DoNotEmulate; }
61
62 inline QPainterState *state() { return (QPainterState *)QPaintEngine::state; }
63 inline const QPainterState *state() const { return (const QPainterState *)QPaintEngine::state; }
64
65 QPaintEngineEx *real_engine;
66private:
67 void fillBGRect(const QRectF &r);
68};
69
70QT_END_NAMESPACE
71
72#endif