PathElement class
A vector element that draws svg path data.
This element will draw pathData using the various parameters available.
Not every field of this class can be animated through this element properties, strokeCap, strokeJoin and strokeMiterLimit are final as animating them would be either useless or not possible.
- Inheritance
-
- Object
- VectorElement<
PathAnimationProperties> - PathElement
Constructors
- PathElement({required PathData pathData, Color? fillColor, double fillAlpha = 1.0, Color? strokeColor, double strokeAlpha = 1.0, double strokeWidth = 1.0, StrokeCap strokeCap = StrokeCap.butt, StrokeJoin strokeJoin = StrokeJoin.miter, double strokeMiterLimit = 4.0, double trimStart = 0.0, double trimEnd = 1.0, double trimOffset = 0.0, PathAnimationProperties properties = const PathAnimationProperties()})
-
Constructs a new instance of PathElement.
const
Properties
- fillAlpha → double
-
The opacity to use when drawing the path fill. Useful when you want to
animate fades without having to mess with fillColor.
final
- fillColor → Color?
-
A color to apply to the path data as its fill.
If null the path won't have any fill drawn, having the same effect of
passing a transparent color.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- pathData → PathData
-
The path data to animate. It is expressed through the use of svg path commands.
Refer to the documentation on PathData for more.
final
- properties → PathAnimationProperties
-
Animation properties for this element.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strokeAlpha → double
-
The opacity to use when drawing the path stroke. Useful when you want to
animate fades without having to mess with strokeColor.
final
- strokeCap → StrokeCap
-
The cap to use to paint stroke path endings.
See StrokeCap for more complete docs and a list of available values.
final
- strokeColor → Color?
-
A color to apply to the path data as its stroke.
If null the path won't have any stroke drawn, having the same effect of
passing a transparent color.
The path still won't be painted if strokeWidth is equal to zero.
final
- strokeJoin → StrokeJoin
-
The type of join to use to paint the path's stroke.
See StrokeJoin for more complete docs and a list of available values.
final
- strokeMiterLimit → double
-
The angle limit to use when strokeJoin is set to StrokeJoin.miter.
Refer to Paint.strokeMiterLimit for more complete docs.
final
- strokeWidth → double
-
The width of the stroke to be painted.
Valid only if strokeColor is not null.
final
- trimEnd → double
-
How much to trim from the end of the path, defined as a
normalized percentage that is in the range 0.0 - 1.0.
final
- trimOffset → double
-
Where to start applying trims for trimStart and trimEnd.
This value is defined in the range 0.0 - 1.0 and moves the point along
the path using the path contour length as its upper bound.
final
- trimStart → double
-
How much to trim from the start of the path, defined as a
normalized percentage that is in the range 0.0 - 1.0.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paint(
Canvas canvas, Size size, double progress, Duration duration, Matrix4 transform) → void -
Paint this vector element onto a Canvas.
The first two parameters behave the exact same way as CustomPainter.paint.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override