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

Most APIs on Canvas take a Paint object to describe the style to use for that operation.

Constructors

Paint()

Properties

color Color

The color to use when stroking or filling a shape.

read / write
colorFilter ColorFilter

A color filter to apply when a shape is drawn or when a layer is composited.

read / write
filterQuality FilterQuality

Controls the performance vs quality trade-off to use when applying filters, such as maskFilter, or when drawing images, as with Canvas.drawImageRect or Canvas.drawImageNine.

read / write
isAntiAlias bool

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

read / write
maskFilter MaskFilter

A mask filter (for example, a blur) to apply to a shape after it has been drawn but before it has been composited into the image.

read / write
shader Shader

The shader to use when stroking or filling a shape.

read / write
strokeCap StrokeCap

The kind of finish to place on the end of lines drawn when style is set to PaintingStyle.stroke.

read / write
strokeWidth double

How wide to make edges drawn when style is set to PaintingStyle.stroke. The width is given in logical pixels measured in the direction orthogonal to the direction of the path.

read / write
style PaintingStyle

Whether to paint inside shapes, the edges of shapes, or both.

read / write
transferMode TransferMode

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

read / write
hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

toString() String

Returns a string representation of this object.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited