PySide6.QtCanvasPainter.QCanvasBrush¶
- class QCanvasBrush¶
QCanvasBrushis the base class for allQCanvasPainterfill / stroke brushes.Details
QCanvasBrushis the base class for all styles used forfill()andstroke().Inherited by:
QCanvasImagePattern,QCanvasGridPattern,QCanvasGradient,QCanvasRadialGradient,QCanvasLinearGradient,QCanvasConicalGradient,QCanvasCustomBrush,QCanvasBoxShadow,QCanvasBoxGradientSynopsis¶
Methods¶
def
__init__()def
swap()def
type()
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
Interpolates colors between start and end points (
QCanvasLinearGradient)
QCanvasBrush.BrushType.BrushType.RadialGradient
Interpolates colors between a focal point and end points on a circle surrounding it (
QCanvasRadialGradient).
QCanvasBrush.BrushType.BrushType.ConicalGradient
Interpolates colors around a center point (
QCanvasConicalGradient).
QCanvasBrush.BrushType.BrushType.BoxGradient
Interpolates colors on a round rectangle (
QCanvasBoxGradient).
QCanvasBrush.BrushType.BrushType.BoxShadow
Creates a soft round rectangle shadow (
QCanvasBoxShadow).
QCanvasBrush.BrushType.BrushType.ImagePattern
Creates a pattern using the specified image and repetition (
QCanvasImagePattern).
QCanvasBrush.BrushType.BrushType.GridPattern
Creates a pattern using the specified grid (
QCanvasGridPattern).
QCanvasBrush.BrushType.BrushType.Custom
Creates a custom shader brush (
QCanvasCustomBrush).
See also
- __init__()¶
Constructs an invalid brush.
- __init__(brush)
- Parameters:
brush –
QCanvasBrush
Constructs a brush that is a copy of the given
brush.- swap(other)¶
- Parameters:
other –
QCanvasBrush
Swaps this brush with
other. This operation is very fast and never fails.Returns the type of the brush.