window.Path2D
See: Web APIs - Path2D for more details<br></br> Also, refer to the interface HTMLCanvasElement<br></br>
Since: v7.0.0
Path2D(path)
Creates an instance of Path2D.
Path2DOptional Path2D Object from another Path2D InstanceaddPath(path)
Adds one Path2D object to another Path2D object.<br></br>
See: Path2D - addPath for more details
Path2DclosePath()
Add a straight line from the current point to the start of the current sub-path.
See: CanvasRenderingContext2D - closePath for more details
moveTo(x, y)
Begins a new sub-path at the point specified by the given (x, y) coordinates.
See: CanvasRenderingContext2D - moveTo for more details
numbernumberlineTo(x, y)
Adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates.
See: CanvasRenderingContext2D - lineTo for more details
numbernumberbezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y)
Adds a cubic Bézier curve to the current sub-path.
See: CanvasRenderingContext2D - bezierCurveTo for more details
numbernumbernumbernumbernumbernumberquadraticCurveTo(cpx, cpy, x, y)
Adds a quadratic Bézier curve to the current sub-path.
See: CanvasRenderingContext2D - quadraticCurveTo for more details
numbernumbernumbernumberarc(x, y, radius, startAngle, endAngle, counterclockwise)
Adds a circular arc to the current sub-path.
See: CanvasRenderingContext2D - arc for more details
numbernumbernumbernumbernumberbooleanfalsearcTo(x1, y1, x2, y2, radius)
Adds a circular arc to the current sub-path, using the given control points and radius.
See: CanvasRenderingContext2D - arcTo for more details
numbernumbernumbernumbernumberrect(x, y, width, height)
Adds a rectangle to the current path.
See: CanvasRenderingContext2D - rect for more details
numbernumbernumbernumber