En esta página

QCanvasBrush Class

QCanvasBrush es la clase base para todos los pinceles de relleno / trazo de QCanvasPainter. Más...

Cabecera: #include <QCanvasBrush>
CMake: find_package(Qt6 REQUIRED COMPONENTS CanvasPainter)
target_link_libraries(mytarget PRIVATE Qt6::CanvasPainter)
Desde: Qt 6.11
Heredado por:

QCanvasBoxShadow, QCanvasCustomBrush, QCanvasGradient, QCanvasGridPattern, y QCanvasImagePattern

Estado: Technical Preview Technical Preview

Tipos públicos

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

Funciones públicas

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)

Descripción Detallada

QCanvasBrush es la clase base para todos los estilos usados en QCanvasPainter::fill() y QCanvasPainter::stroke().

Documentación de Tipos de Miembros

enum class QCanvasBrush::BrushType

Especifica el tipo de pincel.

ConstanteValorDescripción
QCanvasBrush::BrushType::Invalid0- Pincel vacío.
QCanvasBrush::BrushType::LinearGradient1- Interpola colores entre los puntos inicial y final (QCanvasLinearGradient)
QCanvasBrush::BrushType::RadialGradient2- Interpola colores entre un punto central y los puntos finales de un círculo que lo rodea (QCanvasRadialGradient).
QCanvasBrush::BrushType::ConicalGradient3- Interpola colores alrededor de un punto central (QCanvasConicalGradient).
QCanvasBrush::BrushType::BoxGradient4- Interpola colores en un rectángulo redondo (QCanvasBoxGradient).
QCanvasBrush::BrushType::BoxShadow5- Crea una sombra suave de rectángulo redondo (QCanvasBoxShadow).
QCanvasBrush::BrushType::ImagePattern6- Crea un patrón utilizando la imagen especificada y la repetición (QCanvasImagePattern).
QCanvasBrush::BrushType::GridPattern7- Crea un patrón utilizando la cuadrícula especificada (QCanvasGridPattern).
QCanvasBrush::BrushType::Custom1000- Crea un pincel de sombreado personalizado (QCanvasCustomBrush).

Véase también type().

Documentación de las funciones miembro

QCanvasBrush::QCanvasBrush()

Construye un pincel no válido.

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

Move-construye un nuevo QCanvasBrush a partir de other.

QCanvasBrush::QCanvasBrush(const QCanvasBrush &brush)

Construye un pincel que es una copia del dado brush.

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

Cambia este cepillo por other. Esta operación es muy rápida y nunca falla.

QCanvasBrush::BrushType QCanvasBrush::type() const

Devuelve el tipo de pincel.

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

Mover-asigna other a esta instancia QCanvasBrush.

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

Asigna el brush dado a este pincel y devuelve una referencia a este pincel.

© 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.