Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Canvas2DRenderer

Index

Constructors

  • new Canvas2DRenderer(width: number, height: number, options?: any, devicePixelRatio?: number): Canvas2DRenderer

Properties

canvasElement: HTMLCanvasElement
context: CanvasRenderingContext2D
devicePixelRatio: number
height: number
width: number

Methods

  • clear(v?: string, w?: number, x?: number, y?: number, z?: number): void
  • Parameters

    • Optional v: string
    • w: number = 0
    • x: number = 0
    • y: number = ...
    • z: number = ...

    Returns void

  • createImage(image: any): any
  • drawImage(image: any, sx?: number, sy?: number, sWidth?: number, sHeight?: number, dx?: number, dy?: number, dWidth?: number, dHeight?: number): void
  • Parameters

    • image: any
    • sx: number = 0
    • sy: number = 0
    • sWidth: number = image.width
    • sHeight: number = image.height
    • dx: number = 0
    • dy: number = 0
    • dWidth: number = image.width
    • dHeight: number = image.height

    Returns void

  • resize(width?: number, height?: number, devicePixelRatio?: number): void
  • Parameters

    • width: number = ...
    • height: number = ...
    • devicePixelRatio: number = ...

    Returns void