gameforge - v0.1.12
    Preparing search index...

    Class CanvasRenderTarget

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

    PIXI.utils

    Index

    Constructors

    • Parameters

      • width: number

        the width for the newly created canvas

      • height: number

        the height for the newly created canvas

      • Optionalresolution: number

        The resolution / device pixel ratio of the canvas

      Returns CanvasRenderTarget

    Properties

    _canvas: null | ICanvas
    _context: null | ICanvasRenderingContext2D
    resolution: number

    The resolution / device pixel ratio of the canvas

    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

    • set height(val: number): void

      Parameters

      • val: number

      Returns void

    • get width(): number

      The width of the canvas buffer in pixels.

      Returns number

    • set width(val: number): 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