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_x11_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 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_X11_H
5#define QPAINTENGINE_X11_H
6
7#include <QtGui/QPaintEngine>
8
9typedef unsigned long XID;
10typedef XID Drawable;
11typedef struct _XGC *GC;
12
14
15extern "C" {
19}
20
23{
24 Q_DECLARE_PRIVATE(QX11PaintEngine)
25public:
28
29 bool begin(QPaintDevice *pdev) override;
30 bool end() override;
31
32 void updateState(const QPaintEngineState &state) override;
33
34 void updatePen(const QPen &pen);
35 void updateBrush(const QBrush &brush, const QPointF &pt);
36 void updateRenderHints(QPainter::RenderHints hints);
37 void updateFont(const QFont &font);
38 void updateMatrix(const QTransform &matrix);
39 void updateClipRegion_dev(const QRegion &region, Qt::ClipOperation op);
40
41 void drawLines(const QLine *lines, int lineCount) override;
42 void drawLines(const QLineF *lines, int lineCount) override;
43
44 void drawRects(const QRect *rects, int rectCount) override;
45 void drawRects(const QRectF *rects, int rectCount) override;
46
47 void drawPoints(const QPoint *points, int pointCount) override;
48 void drawPoints(const QPointF *points, int pointCount) override;
49
50 void drawEllipse(const QRect &r) override;
51 void drawEllipse(const QRectF &r) override;
52
53 virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) override;
54 inline void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode) override
55 { QPaintEngine::drawPolygon(points, pointCount, mode); }
56
57 void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override;
58 void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) override;
59 void drawPath(const QPainterPath &path) override;
60 void drawTextItem(const QPointF &p, const QTextItem &textItem) override;
61 void drawImage(const QRectF &r, const QImage &img, const QRectF &sr,
62 Qt::ImageConversionFlags flags = Qt::AutoColor) override;
63
64 virtual Drawable handle() const;
65 inline Type type() const override { return QPaintEngine::X11; }
66
67 QPainter::RenderHints supportedRenderHints() const;
68
69protected:
71
72#if QT_CONFIG(fontconfig)
73 void drawFreetype(const QPointF &p, const QTextItemInt &ti);
74 bool drawCachedGlyphs(const QTransform &transform, const QTextItemInt &ti);
75#endif // QT_CONFIG(fontconfig)
76
77 friend class QPixmap;
78 friend class QFontEngineBox;
81
82private:
83 Q_DISABLE_COPY_MOVE(QX11PaintEngine)
84};
85
87
88#endif // QPAINTENGINE_X11_H
\inmodule QtGui
Definition qbrush.h:30
\reentrant
Definition qfont.h:22
\inmodule QtGui
Definition qimage.h:37
\inmodule QtCore\compares equality \compareswith equality QLine \endcompareswith
Definition qline.h:192
\inmodule QtCore\compares equality \compareswith equality QLineF \endcompareswith
Definition qline.h:18
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
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
\inmodule QtGui
Definition qpen.h:28
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 qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore\reentrant
Definition qrect.h:30
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
Internal QTextItem.
\inmodule QtGui
The QTransform class specifies 2D transformations of a coordinate system.
Definition qtransform.h:20
void updateState(const QPaintEngineState &state) override
Reimplement this function to update the state of a paint engine.
void drawTextItem(const QPointF &p, const QTextItem &textItem) override
This function draws the text item textItem at position p.
void drawLines(const QLine *lines, int lineCount) override
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool begin(QPaintDevice *pdev) override
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
void updateBrush(const QBrush &brush, const QPointF &pt)
void updateClipRegion_dev(const QRegion &region, Qt::ClipOperation op)
void updateFont(const QFont &font)
virtual Drawable handle() const
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.
friend GC qt_x11_get_pen_gc(QPainter *)
Returns the X11 specific pen GC for the painter p.
void drawRects(const QRect *rects, int rectCount) override
This is an overloaded member function, provided for convenience. It differs from the above function o...
void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode) override
This is an overloaded member function, provided for convenience. It differs from the above function o...
void updateMatrix(const QTransform &matrix)
Type type() const override
Reimplement this function to return the paint engine \l{Type}.
QPainter::RenderHints supportedRenderHints() const
friend GC qt_x11_get_brush_gc(QPainter *)
Returns the X11 specific brush GC for the painter p.
void updateRenderHints(QPainter::RenderHints hints)
void drawPath(const QPainterPath &path) override
The default implementation ignores the path and does nothing.
void drawPoints(const QPoint *points, int pointCount) override
Draws the first pointCount points in the buffer points.
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) override
Reimplement this virtual function to draw the polygon defined by the pointCount first points in point...
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 updatePen(const QPen &pen)
void drawImage(const QRectF &r, const QImage &img, 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...
bool end() override
Reimplement this function to finish painting on the current paint device.
void drawEllipse(const QRect &r) override
This is an overloaded member function, provided for convenience. It differs from the above function o...
Combined button and popup list for selecting options.
@ AutoColor
Definition qnamespace.h:478
ClipOperation
Definition brush.cpp:5
GLenum mode
GLboolean r
[2]
GLbitfield flags
GLuint GLenum GLenum transform
GLfixed GLfixed GLint GLint GLfixed points
GLdouble s
[6]
Definition qopenglext.h:235
GLint void * img
Definition qopenglext.h:233
GLuint GLenum matrix
GLsizei const GLchar *const * path
GLfloat GLfloat p
[1]
unsigned long XID
QT_BEGIN_NAMESPACE Drawable qt_x11Handle(const QPaintDevice *pd)
GC qt_x11_get_pen_gc(QPainter *)
Returns the X11 specific pen GC for the painter p.
struct _XGC * GC
XID Drawable
GC qt_x11_get_brush_gc(QPainter *)
Returns the X11 specific brush GC for the painter p.
widget render & pixmap
Definition moc.h:23