Creates a Canvas element of the given size to be used as a target for rendering to.

Memberof

PIXI.utils

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • width: number

      the width for the newly created canvas

    • height: number

      the height for the newly created canvas

    • Optional resolution: number

      The resolution / device pixel ratio of the canvas

    Returns CanvasRenderTarget

Properties

resolution: number

The resolution / device pixel ratio of the canvas

Default

1

Accessors

  • get canvas(): ICanvas
  • The Canvas object that belongs to this CanvasRenderTarget.

    Returns ICanvas

  • get height(): number
  • The height of the canvas buffer in pixels.

    Returns number

    Member

  • set height(val): void
  • Parameters

    • val: number

    Returns void

  • get width(): number
  • The width of the canvas buffer in pixels.

    Returns number

    Member

  • set width(val): void
  • Parameters

    • val: number

    Returns void

Methods

  • Destroys this canvas.

    Returns void

  • Resizes the canvas to the specified width and height.

    Parameters

    • desiredWidth: number

      the desired width of the canvas

    • desiredHeight: number

      the desired height of the canvas

    Returns void

Generated using TypeDoc