The Path2D interface of the Canvas 2D API is used to declare paths that are then later used on CanvasRenderingContext2D objects. The path methods of the CanvasRenderingContext2D interface are present on this interface as well and are allowing you to create paths that you can retain and replay as required on a canvas.

Documentation Path2D by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Constructor

new(pathString:String)

new()

new(other:Path2D)

Throws:

null

DOMError

Methods

addPath(path:Path2D, ?transformation:Matrix):Void

Adds a path to the current path.

@:value({ anticlockwise : false })arc(x:Float, y:Float, radius:Float, startAngle:Float, endAngle:Float, anticlockwise:Bool = false):Void

Throws:

null

DOMError

arcTo(x1:Float, y1:Float, x2:Float, y2:Float, radius:Float):Void

Throws:

null

DOMError

bezierCurveTo(cp1x:Float, cp1y:Float, cp2x:Float, cp2y:Float, x:Float, y:Float):Void

@:value({ anticlockwise : false })ellipse(x:Float, y:Float, radiusX:Float, radiusY:Float, rotation:Float, startAngle:Float, endAngle:Float, anticlockwise:Bool = false):Void

Throws:

null

DOMError