Paint
A description of the style to use when drawing a shape on the canvas.
Properties
anti_alias- Whether to apply anti-aliasing to lines and images drawn on the canvas.blend_mode- A blend mode to apply when a shape is drawn or a layer is composited.blur_image- Blur image when drawing it on a canvas.color- The color to use when stroking or filling a shape.gradient- Configures gradient paint.stroke_cap- TBDstroke_dash_pattern- TBDstroke_join- TBDstroke_miter_limit- TBDstroke_width- TBDstyle- TBD
Methods
copy- Returns a copy of this object with the specified properties overridden.
Properties
anti_aliasclass-attributeinstance-attribute
anti_alias: bool | None = NoneWhether to apply anti-aliasing to lines and images drawn on the canvas.
Defaults to True.
blend_modeclass-attributeinstance-attribute
blend_mode: BlendMode | None = NoneA blend mode to apply when a shape is drawn or a layer is composited.
Defaults to BlendMode.SRC_OVER.
blur_imageclass-attributeinstance-attribute
blur_image: BlurValue | None = NoneBlur image when drawing it on a canvas.
colorclass-attributeinstance-attribute
color: ColorValue | None = NoneThe color to use when stroking or filling a shape.
Defaults to opaque black.
gradientclass-attributeinstance-attribute
gradient: PaintGradient | None = NoneConfigures gradient paint.
Methods
copy
copy(
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,
) -> PaintReturns a copy of this object with the specified properties overridden.