Auf dieser Seite

QCanvasBrush Class

QCanvasBrush ist die Basisklasse für alle QCanvasPainter fill / stroke brushes. Mehr...

Kopfzeile: #include <QCanvasBrush>
CMake: find_package(Qt6 REQUIRED COMPONENTS CanvasPainter)
target_link_libraries(mytarget PRIVATE Qt6::CanvasPainter)
Seit: Qt 6.11
Geerbt von:

QCanvasBoxShadow, QCanvasCustomBrush, QCanvasGradient, QCanvasGridPattern, und QCanvasImagePattern

Status: Technische Vorschau

Öffentliche Typen

enum class BrushType { Invalid, LinearGradient, RadialGradient, ConicalGradient, BoxGradient, …, Custom }

Öffentliche Funktionen

QCanvasBrush()
QCanvasBrush(QCanvasImage &&other)
QCanvasBrush(const QCanvasBrush &brush)
void swap(QCanvasBrush &other)
QCanvasBrush::BrushType type() const
QCanvasBrush &operator=(QCanvasBrush &&other)
QCanvasBrush &operator=(const QCanvasBrush &brush)

Detaillierte Beschreibung

QCanvasBrush ist die Basisklasse für alle Stile, die für QCanvasPainter::fill() und QCanvasPainter::stroke() verwendet werden.

Dokumentation der Mitgliedstypen

enum class QCanvasBrush::BrushType

Gibt den Typ des Pinsels an.

KonstanteWertBeschreibung
QCanvasBrush::BrushType::Invalid0- Leerer Pinsel.
QCanvasBrush::BrushType::LinearGradient1- Interpoliert Farben zwischen Start- und Endpunkten (QCanvasLinearGradient)
QCanvasBrush::BrushType::RadialGradient2- Interpoliert Farben zwischen einem Brennpunkt und Endpunkten auf einem ihn umgebenden Kreis (QCanvasRadialGradient).
QCanvasBrush::BrushType::ConicalGradient3- Interpoliert Farben um einen Mittelpunkt (QCanvasConicalGradient).
QCanvasBrush::BrushType::BoxGradient4- Interpoliert Farben auf einem runden Rechteck (QCanvasBoxGradient).
QCanvasBrush::BrushType::BoxShadow5- Erzeugt einen weichen, runden Rechteckschatten (QCanvasBoxShadow).
QCanvasBrush::BrushType::ImagePattern6- Erzeugt ein Muster unter Verwendung des angegebenen Bildes und der Wiederholung (QCanvasImagePattern).
QCanvasBrush::BrushType::GridPattern7- Erzeugt ein Muster unter Verwendung des angegebenen Rasters (QCanvasGridPattern).
QCanvasBrush::BrushType::Custom1000- Erzeugt einen benutzerdefinierten Shader-Pinsel (QCanvasCustomBrush).

Siehe auch type().

Dokumentation der Mitgliedsfunktionen

QCanvasBrush::QCanvasBrush()

Konstruiert einen ungültigen Pinsel.

[noexcept default] QCanvasBrush::QCanvasBrush(QCanvasImage &&other)

Move-konstruiert einen neuen QCanvasBrush aus other.

QCanvasBrush::QCanvasBrush(const QCanvasBrush &brush)

Konstruiert einen Pinsel, der eine Kopie des angegebenen brush ist.

[noexcept] void QCanvasBrush::swap(QCanvasBrush &other)

Tauscht diese Bürste gegen other aus. Dieser Vorgang ist sehr schnell und schlägt nie fehl.

QCanvasBrush::BrushType QCanvasBrush::type() const

Gibt den Typ des Pinsels zurück.

[noexcept] QCanvasBrush &QCanvasBrush::operator=(QCanvasBrush &&other)

Verschieben - weist other dieser QCanvasBrush Instanz zu.

QCanvasBrush &QCanvasBrush::operator=(const QCanvasBrush &brush)

Weist diesem Pinsel die angegebene brush zu und gibt eine Referenz auf diesen Pinsel zurück.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.