Skip to content

Paint

Paint #

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

anti_alias #

anti_alias: bool | None = None

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

Defaults to True.

blend_mode #

blend_mode: BlendMode | None = None

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

Defaults to BlendMode.SRC_OVER.

blur_image #

blur_image: BlurValue | None = None

Blur image when drawing it on a canvas.

color #

color: ColorValue | None = None

The https://flet.dev/docs/reference/colors to use when stroking or filling a shape. Defaults to opaque black.

gradient #

gradient: PaintGradient | None = None

Configures gradient paint.

stroke_cap #

stroke_cap: StrokeCap | None = None

TBD

stroke_dash_pattern #

stroke_dash_pattern: list[Number] | None = None

TBD

stroke_join #

stroke_join: StrokeJoin | None = None

TBD

stroke_miter_limit #

stroke_miter_limit: Number | None = None

TBD

stroke_width #

stroke_width: Number | None = None

TBD

style #

style: PaintingStyle | None = None

TBD

copy_with #

copy_with(
    *,
    color: ColorValue | None = None,
    blend_mode: BlendMode | None = None,
    blur_image: BlurValue | None = None,
    anti_alias: bool | None = None,
    gradient: PaintGradient | None = None,
    stroke_cap: StrokeCap | None = None,
    stroke_join: StrokeJoin | None = None,
    stroke_miter_limit: Number | None = None,
    stroke_width: Number | None = None,
    stroke_dash_pattern: list[Number] | None = None,
    style: PaintingStyle | None = None,
) -> Paint

Returns a copy of this object with the specified properties overridden.