Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qpaintengine_pic_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
4#ifndef QPAINTENGINE_PIC_P_H
5#define QPAINTENGINE_PIC_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/qpaintengine.h>
20
21#ifndef QT_NO_PICTURE
22
24
26class QBuffer;
27
29{
30 Q_DECLARE_PRIVATE(QPicturePaintEngine)
31public:
34
35 bool begin(QPaintDevice *pdev) override;
36 bool end() override;
37
38 void updateState(const QPaintEngineState &state) override;
39
40 void updatePen(const QPen &pen);
41 void updateBrush(const QBrush &brush);
42 void updateBrushOrigin(const QPointF &origin);
43 void updateFont(const QFont &font);
44 void updateBackground(Qt::BGMode bgmode, const QBrush &bgBrush);
45 void updateMatrix(const QTransform &matrix);
46 void updateClipRegion(const QRegion &region, Qt::ClipOperation op);
48 void updateRenderHints(QPainter::RenderHints hints);
50 void updateClipEnabled(bool enabled);
51 void updateOpacity(qreal opacity);
52
53 void drawEllipse(const QRectF &rect) override;
54 void drawPath(const QPainterPath &path) override;
55 void drawPolygon(const QPointF *points, int numPoints, PolygonDrawMode mode) override;
57
58 void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override;
59 void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) override;
60 void drawImage(const QRectF &r, const QImage &image, const QRectF &sr,
61 Qt::ImageConversionFlags flags = Qt::AutoColor) override;
62 void drawTextItem(const QPointF &p, const QTextItem &ti) override;
63
64 Type type() const override { return Picture; }
65
66protected:
68
69private:
70 Q_DISABLE_COPY_MOVE(QPicturePaintEngine)
71
72 void writeCmdLength(int pos, const QRectF &r, bool corr);
73};
74
76
77#endif // QT_NO_PICTURE
78
79#endif // QPAINTENGINE_PIC_P_H
\inmodule QtGui
Definition qbrush.h:30
\inmodule QtCore \reentrant
Definition qbuffer.h:16
\reentrant
Definition qfont.h:22
\inmodule QtGui
Definition qimage.h:37
The QPaintEngineState class provides information about the active paint engine's current state....
\inmodule QtGui
PolygonDrawMode
\value OddEvenMode The polygon should be drawn using OddEven fill rule.
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
Reimplement this virtual function to draw the polygon defined by the pointCount first points in point...
QPaintEngineState * state
\inmodule QtGui
CompositionMode
Defines the modes supported for digital image compositing.
Definition qpainter.h:97
\inmodule QtGui
Definition qpen.h:28
void updateOpacity(qreal opacity)
void drawImage(const QRectF &r, const QImage &image, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) override
Reimplement this function to draw the part of the image specified by the sr rectangle in the given re...
void updateMatrix(const QTransform &matrix)
void updatePen(const QPen &pen)
void drawPolygon(const QPointF *points, int numPoints, PolygonDrawMode mode) override
Reimplement this virtual function to draw the polygon defined by the pointCount first points in point...
void updateClipRegion(const QRegion &region, Qt::ClipOperation op)
void drawPath(const QPainterPath &path) override
The default implementation ignores the path and does nothing.
void drawTextItem(const QPointF &p, const QTextItem &ti) override
This function draws the text item textItem at position p.
void updateBrushOrigin(const QPointF &origin)
void updateFont(const QFont &font)
void updateCompositionMode(QPainter::CompositionMode cmode)
void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) override
Reimplement this function to draw the pixmap in the given rect, starting at the given p.
void updateClipEnabled(bool enabled)
void updateState(const QPaintEngineState &state) override
Reimplement this function to update the state of a paint engine.
bool end() override
Reimplement this function to finish painting on the current paint device.
void updateBrush(const QBrush &brush)
void drawEllipse(const QRectF &rect) override
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
void updateClipPath(const QPainterPath &path, Qt::ClipOperation op)
void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
void updateRenderHints(QPainter::RenderHints hints)
void updateBackground(Qt::BGMode bgmode, const QBrush &bgBrush)
Type type() const override
Reimplement this function to return the paint engine \l{Type}.
bool begin(QPaintDevice *pdev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
\inmodule QtCore\reentrant
Definition qpoint.h:217
\inmodule QtCore\reentrant
Definition qrect.h:484
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
\inmodule QtGui
The QTransform class specifies 2D transformations of a coordinate system.
Definition qtransform.h:20
rect
[4]
Combined button and popup list for selecting options.
@ AutoColor
Definition qnamespace.h:478
ClipOperation
Definition brush.cpp:5
Definition image.cpp:4
GLenum mode
GLboolean r
[2]
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLbitfield flags
GLfixed GLfixed GLint GLint GLfixed points
GLdouble s
[6]
Definition qopenglext.h:235
GLuint GLenum matrix
GLsizei const GLchar *const * path
GLfloat GLfloat p
[1]
double qreal
Definition qtypes.h:187
widget render & pixmap
Definition moc.h:23