QCanvasBrush Class
QCanvasBrush è la classe base per tutti i pennelli di riempimento e contorno di QCanvasPainter. Maggiori informazioni...
| Intestazione: | #include <QCanvasBrush> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS CanvasPainter) target_link_libraries(mytarget PRIVATE Qt6::CanvasPainter) |
| A partire da: | Qt 6.11 |
Tipi pubblici
| enum class | BrushType { Invalid, LinearGradient, RadialGradient, ConicalGradient, BoxGradient, …, Custom } |
Funzioni pubbliche
| QCanvasBrush() | |
| QCanvasBrush(QCanvasImage &&other) | |
| QCanvasBrush(const QCanvasBrush &brush) | |
| QCanvasBrush(QCanvasBrush &&other) | |
| void | swap(QCanvasBrush &other) |
| QCanvasBrush::BrushType | type() const |
| QCanvasBrush & | operator=(QCanvasBrush &&other) |
| QCanvasBrush & | operator=(const QCanvasBrush &brush) |
Elementi non membri correlati
| bool | operator!=(const QCanvasBrush &lhs, const QCanvasBrush &rhs) |
| bool | operator==(const QCanvasBrush &lhs, const QCanvasBrush &rhs) |
Descrizione dettagliata
QCanvasBrush è la classe base per tutti gli stili utilizzati nelle funzioni QCanvasPainter::fill() e QCanvasPainter::stroke().
Documentazione sui tipi membro
enum class QCanvasBrush::BrushType
Specifica il tipo di pennello.
| Costante | Valore | Descrizione |
|---|---|---|
QCanvasBrush::BrushType::Invalid | 0 | - Pennello vuoto. |
QCanvasBrush::BrushType::LinearGradient | 1 | - Interpola i colori tra il punto iniziale e quello finale (QCanvasLinearGradient) |
QCanvasBrush::BrushType::RadialGradient | 2 | - Interpola i colori tra un punto focale e i punti finali su un cerchio che lo circonda (QCanvasRadialGradient). |
QCanvasBrush::BrushType::ConicalGradient | 3 | - Interpola i colori attorno a un punto centrale (QCanvasConicalGradient). |
QCanvasBrush::BrushType::BoxGradient | 4 | - Interpola i colori su un rettangolo arrotondato (QCanvasBoxGradient). |
QCanvasBrush::BrushType::BoxShadow | 5 | - Crea un'ombra morbida su un rettangolo arrotondato (QCanvasBoxShadow). |
QCanvasBrush::BrushType::ImagePattern | 6 | - Crea un motivo utilizzando l’immagine specificata e la ripetizione (QCanvasImagePattern). |
QCanvasBrush::BrushType::GridPattern | 7 | - Crea un motivo utilizzando la griglia specificata (QCanvasGridPattern). |
QCanvasBrush::BrushType::Custom | 1000 | - Crea un pennello shader personalizzato (QCanvasCustomBrush). |
Vedi anche type().
Documentazione delle funzioni membro
QCanvasBrush::QCanvasBrush()
Crea un pennello non valido.
[noexcept implicit] QCanvasBrush::QCanvasBrush(QCanvasImage &&other)
Crea un nuovo oggetto `QCanvasBrush` a partire da ` other`.
QCanvasBrush::QCanvasBrush(const QCanvasBrush &brush)
Crea un pennello che è una copia del file “ brush ” specificato.
[constexpr noexcept default] QCanvasBrush::QCanvasBrush(QCanvasBrush &&other)
Crea un'istanza di ` QCanvasBrush` tramite il costrutto `move`.
[noexcept] void QCanvasBrush::swap(QCanvasBrush &other)
Sostituisci questo pennello con other. Questa operazione è molto veloce e non fallisce mai.
QCanvasBrush::BrushType QCanvasBrush::type() const
Restituisce il tipo del pennello.
[noexcept] QCanvasBrush &QCanvasBrush::operator=(QCanvasBrush &&other)
Assegna " other " a questa istanza di " QCanvasBrush ".
QCanvasBrush &QCanvasBrush::operator=(const QCanvasBrush &brush)
Assegna l'brush e specificato a questo pennello e restituisce un riferimento a tale pennello.
Elementi non membri correlati
[noexcept] bool operator!=(const QCanvasBrush &lhs, const QCanvasBrush &rhs)
Restituisce true se il pennello lhs è diverso da rhs; false in caso contrario.
Vedi anche operator==().
[noexcept] bool operator==(const QCanvasBrush &lhs, const QCanvasBrush &rhs)
Restituisce true se il pennello lhs è uguale a rhs; false in caso contrario.
I pennelli vengono confrontati in base al valore e il confronto tra due oggetti ` QCanvasBrush ` restituisce lo stesso risultato del confronto tra i pennelli concreti (ad es., ` QCanvasGridPattern`) da cui sono stati creati.
Vedi anche operator!=().
© 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.