Skip to main content

Paint

A description of the style to use when drawing a shape on the canvas.

Paint class has the following properties:

anti_alias

Whether to apply anti-aliasing to lines and images drawn on the canvas.

Defaults to True.

blend_mode

A blend mode to apply when a shape is drawn or a layer is composited.

Value is of type BlendMode and defaults to BlendMode.SRC_OVER.

blur_image

Blur image when drawing it on a canvas.

See Container.blur for more information.

color

The color to use when stroking or filling a shape. Defaults to opaque black.

gradient

Configures gradient paint. Value is an instance of one of the following classes: