Path class

A path serializer that implements CanvasPathMethods.

Constructors

Path()
Path.round([num? digits = 3])
Like Path.new, except limits the digits after the decimal to the specified number of digits. Useful for reducing the size of generated SVG path data.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

arc(num x, num y, num radius, num startAngle, num endAngle, [bool anticlockwise = false]) → void
Draws a circular arc segment with the specified center ⟨x, y⟩, radius, startAngle and endAngle. If anticlockwise is true, the arc is drawn in the anticlockwise direction; otherwise, it is drawn in the clockwise direction. If the current point is not equal to the starting point of the arc, a straight line is drawn from the current point to the start of the arc.
arcTo(num x1, num y1, num x2, num y2, num radius) → void
Draws a circular arc segment with the specified radius that starts tangent to the line between the current point and the specified point ⟨x1, y1⟩ and ends tangent to the line between the specified points ⟨x1, y1⟩ and ⟨x2, y2⟩. If the first tangent point is not equal to the current point, a straight line is drawn between the current point and the first tangent point.
bezierCurveTo(num cpx1, num cpy1, num cpx2, num cpy2, num x, num y) → void
Draws a cubic Bézier segment from the current point to the specified point ⟨x, y⟩, with the specified control points ⟨cpx1, cpy1⟩ and ⟨cpx2, cpy2⟩.
closePath() → void
Ends the current subpath and causes an automatic straight line to be drawn from the current point to the initial point of the current subpath.
lineTo(num x, num y) → void
Draws a straight line from the current point to the specified point ⟨x, y⟩.
moveTo(num x, num y) → void
Move to the specified point ⟨x, y⟩.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
quadraticCurveTo(num cpx, num cpy, num x, num y) → void
Draws a quadratic Bézier segment from the current point to the specified point ⟨x, y⟩, with the specified control point ⟨cpx, cpy⟩.
rect(num x, num y, num w, num h) → void
Creates a new subpath containing just the four points ⟨x, y⟩, ⟨x + w, y⟩, ⟨x + w, y + h⟩, ⟨x, y + h⟩, with those four points connected by straight lines, and then marks the subpath as closed.
toString() String
Returns the string representation of this path according to SVG’s path data specification.
override

Operators

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