Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qpaintengine.cpp
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#include "qpaintengine.h"
4#include "qpaintengine_p.h"
5#include "qpainter_p.h"
6#include "qpolygon.h"
7#include "qbitmap.h"
8#include <qdebug.h>
9#include <qmath.h>
10#include <qguiapplication.h>
11#include <qvarlengtharray.h>
12#include <qpa/qplatformintegration.h>
13#include <qpa/qplatformpixmap.h>
14#include <private/qfontengine_p.h>
15#include <private/qguiapplication_p.h>
16#include <private/qpaintengineex_p.h>
17#include <private/qtextengine_p.h>
18
19#include <memory>
20
22
52{
53 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);
54 return ti->descent.toReal();
55}
56
63{
64 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);
65 return ti->ascent.toReal();
66}
67
74{
75 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);
76 return ti->width.toReal();
77}
78
84QTextItem::RenderFlags QTextItem::renderFlags() const
85{
86 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);
87 return ti->flags;
88}
89
96{
97 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);
98 return QString(ti->chars, ti->num_chars);
99}
100
107{
108 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);
109 return ti->f ? *ti->f : QGuiApplication::font();
110}
111
112
268{
271
272 if (isExtended())
273 static_cast<QPaintEngineEx *>(this)->sync();
274}
275
277struct QT_Point {
278 int x;
279 int y;
280};
282
294{
295 Q_ASSERT_X(qt_polygon_recursion != this, "QPaintEngine::drawPolygon",
296 "At least one drawPolygon function must be implemented");
298 Q_ASSERT(sizeof(QT_Point) == sizeof(QPoint));
299 QVarLengthArray<QT_Point> p(pointCount);
300 for (int i = 0; i < pointCount; ++i) {
301 p[i].x = qRound(points[i].x());
302 p[i].y = qRound(points[i].y());
303 }
304 drawPolygon((QPoint *)p.data(), pointCount, mode);
305 qt_polygon_recursion = nullptr;
306}
307
308struct QT_PointF {
311};
313
323{
324 Q_ASSERT_X(qt_polygon_recursion != this, "QPaintEngine::drawPolygon",
325 "At least one drawPolygon function must be implemented");
327 Q_ASSERT(sizeof(QT_PointF) == sizeof(QPointF));
328 QVarLengthArray<QT_PointF> p(pointCount);
329 for (int i=0; i<pointCount; ++i) {
330 p[i].x = points[i].x();
331 p[i].y = points[i].y();
332 }
333 drawPolygon((QPointF *)p.data(), pointCount, mode);
334 qt_polygon_recursion = nullptr;
335}
336
402void QPaintEngine::drawPoints(const QPointF *points, int pointCount)
403{
404 QPainter *p = painter();
405 if (!p)
406 return;
407
408 qreal penWidth = p->pen().widthF();
409 if (penWidth == 0)
410 penWidth = 1;
411
412 bool ellipses = p->pen().capStyle() == Qt::RoundCap;
413
414 p->save();
415
417 if (p->pen().isCosmetic()) {
418 transform = p->transform();
419 p->setTransform(QTransform());
420 }
421
422 p->setBrush(p->pen().brush());
423 p->setPen(Qt::NoPen);
424
425 for (int i=0; i<pointCount; ++i) {
426 QPointF pos = transform.map(points[i]);
427 QRectF rect(pos.x() - penWidth / 2, pos.y() - penWidth / 2, penWidth, penWidth);
428
429 if (ellipses)
430 p->drawEllipse(rect);
431 else
432 p->drawRect(rect);
433 }
434
435 p->restore();
436}
437
438
446void QPaintEngine::drawPoints(const QPoint *points, int pointCount)
447{
448 Q_ASSERT(sizeof(QT_PointF) == sizeof(QPointF));
449 QT_PointF fp[256];
450 while (pointCount) {
451 int i = 0;
452 while (i < pointCount && i < 256) {
453 fp[i].x = points[i].x();
454 fp[i].y = points[i].y();
455 ++i;
456 }
457 drawPoints((QPointF *)(void *)fp, i);
458 points += i;
459 pointCount -= i;
460 }
461}
462
472{
474 path.addEllipse(rect);
476 drawPath(path);
477 } else {
478 QPolygonF polygon = path.toFillPolygon();
479 drawPolygon(polygon.data(), polygon.size(), ConvexMode);
480 }
481}
482
488{
490}
491
502{
503 QPainter p(tile);
504 p.drawPixmap(0, 0, pixmap);
505 int x = pixmap.width();
506 while (x < tile->width()) {
507 p.drawPixmap(x, 0, *tile, 0, 0, x, pixmap.height());
508 x *= 2;
509 }
510 int y = pixmap.height();
511 while (y < tile->height()) {
512 p.drawPixmap(0, y, *tile, 0, 0, tile->width(), y);
513 y *= 2;
514 }
515}
516
517Q_GUI_EXPORT void qt_draw_tile(QPaintEngine *gc, qreal x, qreal y, qreal w, qreal h,
518 const QPixmap &pixmap, qreal xOffset, qreal yOffset)
519{
520 qreal yPos, xPos, drawH, drawW, yOff, xOff;
521 yPos = y;
522 yOff = yOffset;
523 while(yPos < y + h) {
524 drawH = pixmap.height() - yOff; // Cropping first row
525 if (yPos + drawH > y + h) // Cropping last row
526 drawH = y + h - yPos;
527 xPos = x;
528 xOff = xOffset;
529 while(xPos < x + w) {
530 drawW = pixmap.width() - xOff; // Cropping first column
531 if (xPos + drawW > x + w) // Cropping last column
532 drawW = x + w - xPos;
533 if (drawW > 0 && drawH > 0)
534 gc->drawPixmap(QRectF(xPos, yPos, drawW, drawH), pixmap, QRectF(xOff, yOff, drawW, drawH));
535 xPos += drawW;
536 xOff = 0;
537 }
538 yPos += drawH;
539 yOff = 0;
540 }
541}
542
543
550{
551 int sw = pixmap.width();
552 int sh = pixmap.height();
553
554 if (sw*sh < 8192 && sw*sh < 16*rect.width()*rect.height()) {
555 int tw = sw, th = sh;
556 while (tw*th < 32678 && tw < rect.width()/2)
557 tw *= 2;
558 while (tw*th < 32678 && th < rect.height()/2)
559 th *= 2;
560 QPixmap tile;
561 if (pixmap.depth() == 1) {
562 tile = QBitmap(tw, th);
563 } else {
564 tile = QPixmap(tw, th);
565 if (pixmap.hasAlphaChannel())
566 tile.fill(Qt::transparent);
567 }
568 qt_fill_tile(&tile, pixmap);
569 qt_draw_tile(this, rect.x(), rect.y(), rect.width(), rect.height(), tile, p.x(), p.y());
570 } else {
571 qt_draw_tile(this, rect.x(), rect.y(), rect.width(), rect.height(), pixmap, p.x(), p.y());
572 }
573}
574
584void QPaintEngine::drawImage(const QRectF &r, const QImage &image, const QRectF &sr,
585 Qt::ImageConversionFlags flags)
586{
587 QRectF baseSize(0, 0, image.width(), image.height());
588 QImage im = image;
589 if (baseSize != sr)
590 im = im.copy(qFloor(sr.x()), qFloor(sr.y()),
591 qCeil(sr.width()), qCeil(sr.height()));
593 drawPixmap(r, pm, QRectF(QPointF(0, 0), pm.size()));
594}
595
660QPaintEngine::QPaintEngine(PaintEngineFeatures caps)
661 : state(nullptr),
662 gccaps(caps),
663 active(0),
664 selfDestruct(false),
665 extended(false),
666 d_ptr(new QPaintEnginePrivate)
667{
668 d_ptr->q_ptr = this;
669}
670
675QPaintEngine::QPaintEngine(QPaintEnginePrivate &dptr, PaintEngineFeatures caps)
676 : state(nullptr),
677 gccaps(caps),
678 active(0),
679 selfDestruct(false),
680 extended(false),
681 d_ptr(&dptr)
682{
683 d_ptr->q_ptr = this;
684}
685
690{
691}
692
697{
698 return state ? state->painter() : nullptr;
699}
700
706{
708 qWarning("QPaintEngine::drawPath: Must be implemented when feature PainterPaths is set");
709 }
710}
711
718void QPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)
719{
720 const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);
721 if (ti.glyphs.numGlyphs == 0)
722 return;
723
729 painter()->save();
731 bool((painter()->renderHints() & QPainter::TextAntialiasing)
732 && !(painter()->font().styleStrategy() & QFont::NoAntialias)));
733 for (int i = 0; i < ti.glyphs.numGlyphs; ++i) {
734 QImage glyph = ti.fontEngine->bitmapForGlyph(glyphs[i], QFixedPoint(), QTransform());
735 painter()->drawImage(positions[i].x.toReal(), positions[i].y.toReal(), glyph);
736 }
737 painter()->restore();
738 return;
739 }
740
742 path.setFillRule(Qt::WindingFill);
743 ti.fontEngine->addOutlineToPath(0, 0, ti.glyphs, &path, ti.flags);
744 if (!path.isEmpty()) {
745 painter()->save();
747 bool((painter()->renderHints() & QPainter::TextAntialiasing)
748 && !(painter()->font().styleStrategy() & QFont::NoAntialias)));
749 painter()->translate(p.x(), p.y());
750 painter()->fillPath(path, painter()->pen().brush());
751 painter()->restore();
752 }
753}
754
760void QPaintEngine::drawLines(const QLineF *lines, int lineCount)
761{
762 for (int i=0; i<lineCount; ++i) {
763 QPointF pts[2] = { lines[i].p1(), lines[i].p2() };
764
765 if (pts[0] == pts[1]) {
766 if (state->pen().capStyle() != Qt::FlatCap)
767 drawPoints(pts, 1);
768 continue;
769 }
770
771 drawPolygon(pts, 2, PolylineMode);
772 }
773}
774
782void QPaintEngine::drawLines(const QLine *lines, int lineCount)
783{
784 struct PointF {
785 qreal x;
786 qreal y;
787 };
788 struct LineF {
789 PointF p1;
790 PointF p2;
791 };
792 Q_ASSERT(sizeof(PointF) == sizeof(QPointF));
793 Q_ASSERT(sizeof(LineF) == sizeof(QLineF));
794 LineF fl[256];
795 while (lineCount) {
796 int i = 0;
797 while (i < lineCount && i < 256) {
798 fl[i].p1.x = lines[i].x1();
799 fl[i].p1.y = lines[i].y1();
800 fl[i].p2.x = lines[i].x2();
801 fl[i].p2.y = lines[i].y2();
802 ++i;
803 }
804 drawLines((QLineF *)(void *)fl, i);
805 lines += i;
806 lineCount -= i;
807 }
808}
809
810
818void QPaintEngine::drawRects(const QRect *rects, int rectCount)
819{
820 struct RectF {
821 qreal x;
822 qreal y;
823 qreal w;
824 qreal h;
825 };
826 Q_ASSERT(sizeof(RectF) == sizeof(QRectF));
827 RectF fr[256];
828 while (rectCount) {
829 int i = 0;
830 while (i < rectCount && i < 256) {
831 fr[i].x = rects[i].x();
832 fr[i].y = rects[i].y();
833 fr[i].w = rects[i].width();
834 fr[i].h = rects[i].height();
835 ++i;
836 }
837 drawRects((QRectF *)(void *)fr, i);
838 rects += i;
839 rectCount -= i;
840 }
841}
842
848void QPaintEngine::drawRects(const QRectF *rects, int rectCount)
849{
853 for (int i=0; i<rectCount; ++i) {
855 path.addRect(rects[i]);
856 if (path.isEmpty())
857 continue;
858 drawPath(path);
859 }
860 } else {
861 for (int i=0; i<rectCount; ++i) {
862 QRectF rf = rects[i];
863 QPointF pts[4] = { QPointF(rf.x(), rf.y()),
864 QPointF(rf.x() + rf.width(), rf.y()),
865 QPointF(rf.x() + rf.width(), rf.y() + rf.height()),
866 QPointF(rf.x(), rf.y() + rf.height()) };
867 drawPolygon(pts, 4, ConvexMode);
868 }
869 }
870}
871
877{
878 d_func()->pdev = device;
879}
880
886{
887 return d_func()->pdev;
888}
889
890
901{
902 return QPoint();
903}
904
915{
916 Q_D(QPaintEngine);
917 d->baseSystemClip = region;
918 // Be backward compatible and only call d->systemStateChanged()
919 // if we currently have a system transform/viewport set.
920 d->updateSystemClip();
921 if (d->hasSystemTransform || d->hasSystemViewport) {
922 d->systemStateChanged();
923 }
924}
925
935{
936 return d_func()->systemClip;
937}
938
946{
947 if (isActive()) {
948 qWarning("QPaintEngine::setSystemRect: Should not be changed while engine is active");
949 return;
950 }
951 d_func()->systemRect = rect;
952}
953
961{
962 return d_func()->systemRect;
963}
964
971{
972 if (Q_UNLIKELY(!qobject_cast<QGuiApplication *>(QCoreApplication::instance()))) {
973 qWarning("QPaintEngine::createPixmap: QPixmap cannot be created without a QGuiApplication");
974 return QPixmap();
975 }
976
977 std::unique_ptr<QPlatformPixmap> data(QGuiApplicationPrivate::platformIntegration()->createPlatformPixmap(QPlatformPixmap::PixmapType));
978 data->resize(size.width(), size.height());
979 return QPixmap(data.release());
980}
981
988{
989 if (Q_UNLIKELY(!qobject_cast<QGuiApplication *>(QCoreApplication::instance()))) {
990 qWarning("QPaintEngine::createPixmapFromImage: QPixmap cannot be created without a QGuiApplication");
991 return QPixmap();
992 }
993
994 std::unique_ptr<QPlatformPixmap> data(QGuiApplicationPrivate::platformIntegration()->createPlatformPixmap(QPlatformPixmap::PixmapType));
995 if (image.isDetached())
996 data->fromImageInPlace(image, flags);
997 else
998 data->fromImage(image, flags);
999 return QPixmap(data.release());
1000}
1001
1003{
1004}
1005
1007{
1008 if (!ti.glyphs.numGlyphs)
1009 return;
1010
1011 // any fixes here should probably also be done in QFontEngineBox::draw
1012 const int size = qRound(ti.fontEngine->ascent());
1017 if (glyphs.size() == 0)
1018 return;
1019
1020 QSize s(size - 3, size - 3);
1021
1022 QPainter *painter = q_func()->state->painter();
1023 painter->save();
1025 QPen pen = painter->pen();
1027 painter->setPen(pen);
1028 for (int k = 0; k < positions.size(); k++)
1029 painter->drawRect(QRectF(positions[k].toPointF(), s));
1030 painter->restore();
1031}
1032
IOBluetoothDevice * device
\inmodule QtGui
Definition qbitmap.h:16
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
virtual QImage bitmapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t, const QColor &color=QColor())
virtual QFixed ascent() const
virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags)
void getGlyphPositions(const QGlyphLayout &glyphs, const QTransform &matrix, QTextItem::RenderFlags flags, QVarLengthArray< glyph_t > &glyphs_out, QVarLengthArray< QFixedPoint > &positions)
virtual QFixed lineThickness() const
GlyphFormat glyphFormat
\reentrant
Definition qfont.h:20
@ NoAntialias
Definition qfont.h:45
static QPlatformIntegration * platformIntegration()
static QFont font()
Returns the default application font.
\inmodule QtGui
Definition qimage.h:37
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
\inmodule QtCore
Definition qline.h:182
constexpr QPointF p1() const
Returns the line's start point.
Definition qline.h:289
constexpr QPointF p2() const
Returns the line's end point.
Definition qline.h:294
\inmodule QtCore
Definition qline.h:18
constexpr int x2() const
Returns the x-coordinate of the line's end point.
Definition qline.h:86
constexpr int y2() const
Returns the y-coordinate of the line's end point.
Definition qline.h:91
constexpr int y1() const
Returns the y-coordinate of the line's start point.
Definition qline.h:81
constexpr int x1() const
Returns the x-coordinate of the line's start point.
Definition qline.h:76
QPaintEngine * q_ptr
void drawBoxTextItem(const QPointF &p, const QTextItemInt &ti)
bool brushNeedsResolving() const
QPainter * painter() const
Returns a pointer to the painter currently updating the paint engine.
QPen pen() const
Returns the pen in the current paint engine state.
bool penNeedsResolving() const
\inmodule QtGui
virtual QPixmap createPixmap(QSize size)
void setSystemRect(const QRect &rect)
virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s)
Reimplement this function to draw the pixmap in the given rect, starting at the given p.
virtual void drawRects(const QRect *rects, int rectCount)
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual QPixmap createPixmapFromImage(QImage image, Qt::ImageConversionFlags flags=Qt::AutoColor)
QRect systemRect() const
virtual void updateState(const QPaintEngineState &state)=0
Reimplement this function to update the state of a paint engine.
QPaintEngine(PaintEngineFeatures features=PaintEngineFeatures())
Creates a paint engine with the featureset specified by caps.
virtual void drawLines(const QLine *lines, int lineCount)
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void drawTextItem(const QPointF &p, const QTextItem &textItem)
This function draws the text item textItem at position p.
PolygonDrawMode
\value OddEvenMode The polygon should be drawn using OddEven fill rule.
virtual void drawPoints(const QPointF *points, int pointCount)
Draws the first pointCount points in the buffer points.
virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)=0
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor)
Reimplement this function to draw the part of the image specified by the sr rectangle in the given re...
QPainter * painter() const
Returns the paint engine's painter.
void setPaintDevice(QPaintDevice *device)
virtual QPoint coordinateOffset() const
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...
void setSystemClip(const QRegion &baseClip)
virtual ~QPaintEngine()
Destroys the paint engine.
QPaintEngineState * state
bool isActive() const
Returns true if the paint engine is actively drawing; otherwise returns false.
bool hasFeature(PaintEngineFeatures feature) const
Returns true if the paint engine supports the specified feature; otherwise returns false.
virtual void drawEllipse(const QRectF &r)
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
QRegion systemClip() const
bool isExtended() const
QPaintDevice * paintDevice() const
Returns the device that this engine is painting on, if painting is active; otherwise returns \nullptr...
virtual void drawPath(const QPainterPath &path)
The default implementation ignores the path and does nothing.
QScopedPointer< QPaintEnginePrivate > d_ptr
\inmodule QtGui
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
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.
Definition qpainter.h:519
void setPen(const QColor &color)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void restore()
Restores the current painter state (pops a saved state off the stack).
void save()
Saves the current painter state (pushes the state onto a stack).
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 fillPath(const QPainterPath &path, const QBrush &brush)
Fills the given path using the given brush.
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
@ SmoothPixmapTransform
Definition qpainter.h:54
@ Antialiasing
Definition qpainter.h:52
@ TextAntialiasing
Definition qpainter.h:53
void translate(const QPointF &offset)
Translates the coordinate system by the given offset; i.e.
void setRenderHint(RenderHint hint, bool on=true)
Sets the given render hint on the painter if on is true; otherwise clears the render hint.
\inmodule QtGui
Definition qpen.h:25
void setWidthF(qreal width)
Sets the pen width to the given width in pixels with floating point precision.
Definition qpen.cpp:644
Qt::PenCapStyle capStyle() const
Returns the pen's cap style.
Definition qpen.cpp:662
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
QSize size() const
Returns the size of the pixmap.
Definition qpixmap.cpp:497
int width() const
Returns the width of the pixmap.
Definition qpixmap.cpp:472
void fill(const QColor &fillColor=Qt::white)
Fills the pixmap with the given color.
Definition qpixmap.cpp:854
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Converts the given image to a pixmap using the specified flags to control the conversion.
Definition qpixmap.cpp:1445
\inmodule QtCore\reentrant
Definition qpoint.h:214
\inmodule QtCore\reentrant
Definition qpoint.h:23
The QPolygonF class provides a list of points using floating point precision.
Definition qpolygon.h:96
\inmodule QtCore\reentrant
Definition qrect.h:483
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
Definition qrect.h:658
constexpr qreal height() const noexcept
Returns the height of the rectangle.
Definition qrect.h:718
constexpr qreal width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:715
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
Definition qrect.h:655
\inmodule QtCore\reentrant
Definition qrect.h:30
constexpr int height() const noexcept
Returns the height of the rectangle.
Definition qrect.h:238
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
Definition qrect.h:184
constexpr int width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:235
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
Definition qrect.h:187
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
Internal QTextItem.
RenderFlags flags
const QChar * chars
QGlyphLayout glyphs
const QFont * f
QFontEngine * fontEngine
\inmodule QtGui
QFont font() const
Returns the font that should be used to draw the text.
qreal descent() const
Corresponds to the \l{QFontMetrics::descent()}{descent} of the piece of text that is drawn.
RenderFlags renderFlags() const
Returns the render flags used.
qreal ascent() const
Corresponds to the \l{QFontMetrics::ascent()}{ascent} of the piece of text that is drawn.
QString text() const
Returns the text that should be drawn.
qreal width() const
Specifies the total width of the text to be drawn.
The QTransform class specifies 2D transformations of a coordinate system.
Definition qtransform.h:20
static QTransform fromTranslate(qreal dx, qreal dy)
Creates a matrix which corresponds to a translation of dx along the x axis and dy along the y axis.
constexpr size_type size() const noexcept
QPixmap p2
QPixmap p1
[0]
rect
[4]
else opt state
[0]
Combined button and popup list for selecting options.
@ transparent
Definition qnamespace.h:46
@ NoPen
@ NoBrush
@ WindingFill
@ RoundCap
@ FlatCap
Definition brush.cpp:5
Definition image.cpp:4
#define Q_UNLIKELY(x)
static const QCssKnownValue positions[NumKnownPositionModes - 1]
int qRound(qfloat16 d) noexcept
Definition qfloat16.h:281
#define qWarning
Definition qlogging.h:162
int qFloor(T v)
Definition qmath.h:42
int qCeil(T v)
Definition qmath.h:36
GLint GLint GLint GLint GLint x
[0]
GLenum mode
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLboolean r
[2]
GLint GLsizei width
GLbitfield flags
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint y
GLfloat GLfloat GLfloat GLfloat h
GLuint GLenum GLenum transform
GLfixed GLfixed GLint GLint GLfixed points
GLuint GLenum matrix
GLsizei const GLchar *const * path
GLdouble s
[6]
Definition qopenglext.h:235
GLfloat GLfloat p
[1]
Q_GUI_EXPORT void qt_draw_tile(QPaintEngine *gc, qreal x, qreal y, qreal w, qreal h, const QPixmap &pixmap, qreal xOffset, qreal yOffset)
void qt_fill_tile(QPixmap *tile, const QPixmap &pixmap)
static QPaintEngine * qt_polygon_recursion
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
#define Q_ASSERT_X(cond, x, msg)
Definition qrandom.cpp:48
#define fp
@ Q_PRIMITIVE_TYPE
Definition qtypeinfo.h:144
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
Definition qtypeinfo.h:163
double qreal
Definition qtypes.h:92
QObject::connect nullptr
widget render & pixmap
QPainter painter(this)
[7]
constexpr qreal toReal() const
Definition qfixed_p.h:42