3#include <QOpenGLFunctions>
89painter2->
begin(myWidget);
94namespace QPainterWrapper {
107path.cubicTo(80, 0, 50, 50, 80, 80);
126QRectF rectangle(10.0, 20.0, 80.0, 60.0);
138QRectF rectangle(10.0, 20.0, 80.0, 60.0);
150QRectF rectangle(10.0, 20.0, 80.0, 60.0);
162QRectF rectangle(10.0, 20.0, 80.0, 60.0);
163int startAngle = 30 * 16;
164int spanAngle = 120 * 16;
176QRectF rectangle(10.0, 20.0, 80.0, 60.0);
177int startAngle = 30 * 16;
178int spanAngle = 120 * 16;
191QRectF rectangle(10.0, 20.0, 80.0, 60.0);
192int startAngle = 30 * 16;
193int spanAngle = 120 * 16;
320glEnable(GL_SCISSOR_TEST);
321glScissor(0, 0, 64, 64);
323glClearColor(1, 0, 0, 1);
324glClear(GL_COLOR_BUFFER_BIT);
326glDisable(GL_SCISSOR_TEST);
void setPixelSize(int)
Sets the font size to pixelSize pixels, with a maxiumum size of an unsigned 16-bit integer.
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
const QPen & pen() const
Returns the painter's current pen.
void drawRect(const QRectF &rect)
Draws the current rectangle with the current pen and brush.
void drawPath(const QPainterPath &path)
Draws the given painter path using the current pen for outline and the current brush for filling.
void drawConvexPolygon(const QPointF *points, int pointCount)
Draws the convex polygon defined by the first pointCount points in the array points using the current...
void drawPie(const QRectF &rect, int a, int alen)
Draws a pie defined by the given rectangle, startAngle and spanAngle.
void setPen(const QColor &color)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void drawLine(const QLineF &line)
Draws a line defined by line.
void drawChord(const QRectF &rect, int a, int alen)
Draws the chord defined by the given rectangle, startAngle and spanAngle.
bool begin(QPaintDevice *)
Begins painting the paint device and returns true if successful; otherwise returns false.
const QFont & font() const
Returns the currently set font used for drawing text.
void beginNativePainting()
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
Draws the rectangular portion source of the given image into the target rectangle in the paint device...
void setFont(const QFont &f)
Sets the painter's font to the given font.
void drawText(const QPointF &p, const QString &s)
Draws the given text with the currently defined text direction, beginning at the given position.
void drawPolyline(const QPointF *points, int pointCount)
Draws the polyline defined by the first pointCount points in points using the current pen.
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device.
void drawArc(const QRectF &rect, int a, int alen)
Draws the arc defined by the given rectangle, startAngle and spanAngle.
void drawEllipse(const QRectF &r)
Draws the ellipse defined by the given rectangle.
void drawPicture(const QPointF &p, const QPicture &picture)
Replays the given picture at the given point.
void drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule=Qt::OddEvenFill)
Draws the polygon defined by the first pointCount points in the array points using the current pen an...
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode=Qt::AbsoluteSize)
void setStyle(Qt::PenStyle)
[0]
int width() const
Returns the pen width with integer precision.
The QPicture class is a paint device that records and replays QPainter commands.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const noexcept
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
\inmodule QtCore\reentrant
constexpr QRect adjusted(int x1, int y1, int x2, int y2) const noexcept
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
QRectF fillRect(QRect rect, int background)
GLsizei GLsizei GLchar * source
GLfixed GLfixed GLint GLint GLfixed points
GLsizei const GLchar *const * path
static const QRectF boundingRect(const QPointF *points, int pointCount)
void setWorldTransform(QTransform matrix, bool)