package js.html
Available on js
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:
new(pathString:String)new()new(other:Path2D)Throws:
null |
DOMError |
|---|
addPath(path:Path2D, ?transformation:Matrix):VoidAdds a path to the current path.
arc(x:Float, y:Float, radius:Float, startAngle:Float, endAngle:Float, anticlockwise:Bool = false):VoidThrows:
null |
DOMError |
|---|
arcTo(x1:Float, y1:Float, x2:Float, y2:Float, radius:Float):VoidThrows:
null |
DOMError |
|---|
bezierCurveTo(cp1x:Float, cp1y:Float, cp2x:Float, cp2y:Float, x:Float, y:Float):VoidclosePath():Voidellipse(x:Float, y:Float, radiusX:Float, radiusY:Float, rotation:Float, startAngle:Float, endAngle:Float, anticlockwise:Bool = false):VoidThrows:
null |
DOMError |
|---|
lineTo(x:Float, y:Float):VoidmoveTo(x:Float, y:Float):VoidquadraticCurveTo(cpx:Float, cpy:Float, x:Float, y:Float):Voidrect(x:Float, y:Float, w:Float, h:Float):Void
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Path2D.html