ClipPathElement class

An element that applies a clip to other elements based on its pathData.

This clip is applied to every element inside a GroupElement or RootVectorElement that lies after this element in the list.

For example:

GroupElement([ ... ]), // not affected by the clipping element
ClipPathElement( ... ), // applies to every element after this one
PathElement( ... ), // clipped
GroupElement([ ... ]), // every element inside this group will be clipped
Inheritance

Constructors

ClipPathElement({required PathData pathData, ClipPathAnimationProperties properties = const ClipPathAnimationProperties()})
Constructs a new instance of ClipPathElement.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
pathData PathData
The path data to use to clip this item. The visible portion is defined by the area of this path that would be painted if it were to be painted by a PathElement with a non null fill.
final
properties ClipPathAnimationProperties
Animation properties for this element.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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