PySide6.QtCanvasPainter.QCanvasBrush

class QCanvasBrush

QCanvasBrush is the base class for all QCanvasPainter fill / stroke brushes.

Details

QCanvasBrush is the base class for all styles used for fill() and stroke() .

Inherited by: QCanvasImagePattern, QCanvasGridPattern, QCanvasGradient, QCanvasRadialGradient, QCanvasLinearGradient, QCanvasConicalGradient, QCanvasCustomBrush, QCanvasBoxShadow, QCanvasBoxGradient

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

class BrushType

Specifies the type of brush.

Constant

Description

QCanvasBrush.BrushType.BrushType.Invalid

  • Empty brush.

QCanvasBrush.BrushType.BrushType.LinearGradient

QCanvasBrush.BrushType.BrushType.RadialGradient

  • Interpolates colors between a focal point and end points on a circle surrounding it ( QCanvasRadialGradient ).

QCanvasBrush.BrushType.BrushType.ConicalGradient

QCanvasBrush.BrushType.BrushType.BoxGradient

QCanvasBrush.BrushType.BrushType.BoxShadow

QCanvasBrush.BrushType.BrushType.ImagePattern

QCanvasBrush.BrushType.BrushType.GridPattern

QCanvasBrush.BrushType.BrushType.Custom

See also

type()

__init__()

Constructs an invalid brush.

__init__(brush)
Parameters:

brushQCanvasBrush

Constructs a brush that is a copy of the given brush.

swap(other)
Parameters:

otherQCanvasBrush

Swaps this brush with other. This operation is very fast and never fails.

type()
Return type:

BrushType

Returns the type of the brush.