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
qtessellator_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// Qt-Security score:significant reason:default
4
5#pragma once
6
7#include <QPoint>
8#include <QRect>
9
11
13
14typedef int Q27Dot5;
15#define Q27Dot5ToDouble(i) ((i)/32.)
16#define FloatToQ27Dot5(i) (int)((i) * 32)
17#define IntToQ27Dot5(i) ((i) << 5)
18#define Q27Dot5ToXFixed(i) ((i) << 11)
19#define Q27Dot5Factor 32
20
22public:
24 virtual ~QTessellator();
25
26 QRectF tessellate(const QPointF *points, int nPoints);
27 void tessellateConvex(const QPointF *points, int nPoints);
28 void tessellateRect(const QPointF &a, const QPointF &b, qreal width);
29
30 void setWinding(bool w);
31
32 struct Vertex {
35 };
44 virtual void addTrap(const Trapezoid &trap) = 0;
45
46private:
47 friend class QTessellatorPrivate;
49};
50
51QT_END_NAMESPACE
void tessellateConvex(const QPointF *points, int nPoints)
void tessellateRect(const QPointF &a, const QPointF &b, qreal width)
void setWinding(bool w)
virtual ~QTessellator()
QRectF tessellate(const QPointF *points, int nPoints)
virtual void addTrap(const Trapezoid &trap)=0
void systemStateChanged() override
QPolygonClipper< qt_float_point, qt_float_point, float > polygonClipper
void setupAdaptedOrigin(const QPoint &p)
void fillPolygon_translated(const QPointF *points, int pointCount, GCMode gcMode, QPaintEngine::PolygonDrawMode mode)
void clipPolygon_dev(const QPolygonF &poly, QPolygonF *clipped_poly)
QTransform::TransformationType txop
void strokePolygon_dev(const QPointF *points, int pointCount, bool close)
const QXcbX11Info * xinfo
void fillPath(const QPainterPath &path, GCMode gcmode, bool transform)
void strokePolygon_translated(const QPointF *points, int pointCount, bool close)
void fillPolygon_dev(const QPointF *points, int pointCount, GCMode gcMode, QPaintEngine::PolygonDrawMode mode)
friend GC qt_x11_get_pen_gc(QPainter *)
Returns the X11 specific pen GC for the painter p.
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.
QX11PaintEngine(QX11PaintEnginePrivate &dptr)
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 updateMatrix(const QTransform &matrix)
Type type() const override
Reimplement this function to return the paint engine \l{Type}.
QPainter::RenderHints supportedRenderHints() const
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.
friend GC qt_x11_get_brush_gc(QPainter *)
Returns the X11 specific brush GC for the painter p.
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...
friend const QXcbX11Info & qt_x11Info(const QPixmap &pixmap)
static Display * display()
Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale)
static void setCapStyle(int cap_style, GC gc)
static void x11SetClipRegion(Display *dpy, GC gc, GC gc2, Qt::HANDLE picture, const QRegion &r)
static const qreal aliasedCoordinateDelta
#define X11
static QPaintEngine::PaintEngineFeatures qt_decide_features()
Q_GUI_EXPORT void qt_x11_drawImage(const QRect &rect, const QPoint &pos, const QImage &image, Drawable hd, GC gc, Display *dpy, Visual *visual, int depth)
static QLine clipStraightLine(const QRect &clip, const QLine &l)
#define DITHER_SIZE
QPixmap qt_toX11Pixmap(const QPixmap &pixmap)
static void x11ClearClipRegion(Display *dpy, GC gc, GC gc2, Qt::HANDLE picture)
static const uchar base_dither_matrix[DITHER_SIZE][DITHER_SIZE]
static const QXcbX11Info * qt_x11Info(const QPaintDevice *pd)
void qt_draw_tile(QPaintEngine *, qreal, qreal, qreal, qreal, const QPixmap &, qreal, qreal)
static QPixmap qt_patternForAlpha(uchar alpha, int screen)
static bool clipLine(QLineF *line, const QRect &rect)
struct _XGC * GC
XID Drawable
QPixmap qt_pixmapForBrush(int style, bool invert)
Definition qbrush.cpp:80
XID Pixmap
int qt_x11SetDefaultScreen(int screen)
QT_BEGIN_NAMESPACE QPainterPath qt_regionToPath(const QRegion &region)
Definition qregion.cpp:1010
#define EvenOddRule
Definition qregion.cpp:1604
#define WindingRule
Definition qregion.cpp:1605
int Q27Dot5
#define Q_XCB_EXPORT
Definition qxcbexport.h:14
void write(QChar *&dest) const
HexString(const T t)
static int size(const HexString< T > &)
static void appendTo(const HexString< T > &str, QChar *&out)
const Vertex * bottomRight
const Vertex * bottomLeft
bool use_xrender
Definition qt_x11_p.h:94