Path class

A SVG Path object.

Implemented types
Annotations
  • @immutable

Constructors

Path(List<SubPath> subPaths)
Path.empty()
Creates a empty path.
const
Path.fromCircle(double cx, double cy, double r)
Creates a path that represents a circle at (cx, cy) with radius r. That is a path made up for two 180 degree arcs.
factory
Path.fromEllipse(double cx, double cy, double rx, double ry)
Creates a path that represents a ellipse at (cx, cy) with radius rx and ry. That is a path made up for two 180 degree arcs.
factory
Path.fromString(String path)
Create a new path from a string. e.g Path.fromString('M0,0 L1,1 Z')
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
length int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subPaths List<SubPath>
final

Methods

concat(Path other) Path
Joins two paths together. e.g
mirror(Axis axis, [double centerX = 0.0, double centerY = 0.0]) Path
Mirrors this over vertical or horizontal line that goes though centerX,centerY.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reverse() Path
rotate(double angle, [double centerX = 0.0, double centerY = 0.0]) Path
Returns a new T rotated angle radians around centerX,centerY.
override
scale(num scaleX, [num? scaleY]) Path
Scales by scaleX and scaleY. scaleY defaults to scaleX if not provided.
override
toString() String
Returns the Path as a valid SVG path string.
override
translate(num x, num y) Path
Returns a new T translated by x and y.
override

Operators

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