Class Path2D

Declares 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.

Implements

Constructors

  • Parameters

    Returns Path2D

Methods

  • Parameters

    Returns void

  • Parameters

    • x: number
    • y: number
    • r: number
    • start: number
    • end: number
    • ccw: boolean

    Returns void

  • Parameters

    • x1: number
    • y1: number
    • x2: number
    • y2: number
    • r: number

    Returns void

  • Parameters

    • cp1x: number
    • cp1y: number
    • cp2x: number
    • cp2y: number
    • x: number
    • y: number

    Returns void

  • Returns void

  • Parameters

    • x: number
    • y: number
    • rx: number
    • ry: number
    • angle: number
    • start: number
    • end: number
    • ccw: boolean

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • cpx: number
    • cpy: number
    • x: number
    • y: number

    Returns void

  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number

    Returns void

  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number
    • Optionalradii: number | number[]

    Returns void