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 radiusr
. 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 radiusrx
andry
. 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
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
rotatedangle
radians aroundcenterX
,centerY
.override -
scale(
num scaleX, [num? scaleY]) → Path -
Scales by
scaleX
andscaleY
. 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