Options
All
  • Public
  • Public/Protected
  • All
Menu

This Canvas 2D API interface 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.

Hierarchy

Index

Methods

  • Adds to the path the path given by the argument.

    Parameters

    Returns void

  • arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void
  • Parameters

    • x: number
    • y: number
    • radius: number
    • startAngle: number
    • endAngle: number
    • Optional counterclockwise: boolean

    Returns void

  • arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void
  • Parameters

    • x1: number
    • y1: number
    • x2: number
    • y2: number
    • radius: number

    Returns void

  • bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void
  • Parameters

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

    Returns void

  • closePath(): void
  • Returns void

  • ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void
  • Parameters

    • x: number
    • y: number
    • radiusX: number
    • radiusY: number
    • rotation: number
    • startAngle: number
    • endAngle: number
    • Optional counterclockwise: boolean

    Returns void

  • lineTo(x: number, y: number): void
  • Parameters

    • x: number
    • y: number

    Returns void

  • moveTo(x: number, y: number): void
  • Parameters

    • x: number
    • y: number

    Returns void

  • quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void
  • Parameters

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

    Returns void

  • rect(x: number, y: number, w: number, h: number): void
  • Parameters

    • x: number
    • y: number
    • w: number
    • h: number

    Returns void

Generated using TypeDoc