Path2D class

The interface of the Canvas 2D API is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired.

Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

Path2D([dynamic path])
factory

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

addPath(Path2D path, [DOMMatrix2DInit? transform]) → void

Available on Path2D, provided by the PropsPath2D extension

arc(dynamic x, dynamic y, dynamic radius, dynamic startAngle, dynamic endAngle, [bool? counterclockwise = false]) → void

Available on CanvasPath, provided by the PropsCanvasPath extension

arcTo(dynamic x1, dynamic y1, dynamic x2, dynamic y2, dynamic radius) → void

Available on CanvasPath, provided by the PropsCanvasPath extension

bezierCurveTo(dynamic cp1x, dynamic cp1y, dynamic cp2x, dynamic cp2y, dynamic x, dynamic y) → void

Available on CanvasPath, provided by the PropsCanvasPath extension

closePath() → void

Available on CanvasPath, provided by the PropsCanvasPath extension

ellipse(dynamic x, dynamic y, dynamic radiusX, dynamic radiusY, dynamic rotation, dynamic startAngle, dynamic endAngle, [bool? counterclockwise = false]) → void

Available on CanvasPath, provided by the PropsCanvasPath extension

lineTo(dynamic x, dynamic y) → void

Available on CanvasPath, provided by the PropsCanvasPath extension

moveTo(dynamic x, dynamic y) → void

Available on CanvasPath, provided by the PropsCanvasPath extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
quadraticCurveTo(dynamic cpx, dynamic cpy, dynamic x, dynamic y) → void

Available on CanvasPath, provided by the PropsCanvasPath extension

rect(dynamic x, dynamic y, dynamic w, dynamic h) → void

Available on CanvasPath, provided by the PropsCanvasPath extension

roundRect(dynamic x, dynamic y, dynamic w, dynamic h, [dynamic radii = 0]) → void

Available on CanvasPath, provided by the PropsCanvasPath extension

toString() String
A string representation of this object.
inherited

Operators

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