QCBrush Class

QCBrush is the base class for all QCPainter fill / stroke brushes. More...

Header: #include <QCBrush>
Inherited By:

QCBoxShadow, QCCustomBrush, QCGradient, QCGridPattern, and QCImagePattern

Public Types

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

Public Functions

virtual QCBrush::BrushType type() const

Detailed Description

QCBrush is the base class for all styles used for QCPainter::fill() and QCPainter::stroke().

Member Type Documentation

enum class QCBrush::BrushType

Specifies the type of brush.

ConstantValueDescription
QCBrush::BrushType::Brush0- Empty brush.
QCBrush::BrushType::LinearGradient1- Interpolates colors between start and end points (QCLinearGradient)
QCBrush::BrushType::RadialGradient2- Interpolates colors between a focal point and end points on a circle surrounding it (QCRadialGradient).
QCBrush::BrushType::ConicalGradient3- Interpolates colors around a center point (QCConicalGradient).
QCBrush::BrushType::BoxGradient4- Interpolates colors on a round rectangle (QCBoxGradient).
QCBrush::BrushType::BoxShadow5- Creates a soft round rectangle shadow (QCBoxShadow).
QCBrush::BrushType::ImagePattern6- Creates a pattern using the specified image and repetition (QCImagePattern).
QCBrush::BrushType::GridPattern7- Creates a pattern using the specified grid (QCGridPattern).
QCBrush::BrushType::Custom1000- Creates a custom shader brush (QCCustomBrush).

See also type().

Member Function Documentation

[virtual] QCBrush::BrushType QCBrush::type() const

Returns the type of the brush. Subclasses override this method.