Paint class final

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()
Constructs an empty Paint object with all fields initialized to their defaults.
Paint.from(Paint other)
Constructs a new Paint object with the same fields as other.

Properties

blendMode BlendMode
A blend mode to apply when a shape is drawn or a layer is composited.
getter/setter pair
color Color
The color to use when stroking or filling a shape.
getter/setter pair
colorFilter ColorFilter?
A color filter to apply when a shape is drawn or when a layer is composited.
getter/setter pair
filterQuality FilterQuality
Controls the performance vs quality trade-off to use when sampling bitmaps, as with an ImageShader, or when drawing images, as with Canvas.drawImage, Canvas.drawImageRect, Canvas.drawImageNine or Canvas.drawAtlas.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
imageFilter ImageFilter?
The ImageFilter to use when drawing raster images.
getter/setter pair
invertColors bool
Whether the colors of the image are inverted when drawn.
getter/setter pair
isAntiAlias bool
Whether to apply anti-aliasing to lines and images drawn on the canvas.
getter/setter pair
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.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shader Shader?
The shader to use when stroking or filling a shape.
getter/setter pair
strokeCap StrokeCap
The kind of finish to place on the end of lines drawn when style is set to PaintingStyle.stroke.
getter/setter pair
strokeJoin StrokeJoin
The kind of finish to place on the joins between segments.
getter/setter pair
strokeMiterLimit double
The limit for miters to be drawn on segments when the join is set to StrokeJoin.miter and the style is set to PaintingStyle.stroke. If this limit is exceeded, then a StrokeJoin.bevel join will be drawn instead. This may cause some 'popping' of the corners of a path if the angle between line segments is animated, as seen in the diagrams below.
getter/setter pair
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.
getter/setter pair
style PaintingStyle
Whether to paint inside shapes, the edges of shapes, or both.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited