Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Cursors

Container for the 8 mouse cursors in the CURS file.

Hierarchy

  • Cursors

Index

Methods

getCursor

  • getCursor(index: number): Cursor
  • Returns the mouse cursor image with the given index.

    Parameters

    • index: number

      The index of the mouse cursor image.

    Returns Cursor

    The mouse cursor image.

getCursors

getNumCursors

  • getNumCursors(): number
  • Returns the number of mouse cursors.

    Returns number

    THe number of mouse cursors.

toCanvas

  • toCanvas(): HTMLCanvasElement
  • Creates and returns a new canvas containing all the mouse cursors.

    Returns HTMLCanvasElement

    The created canvas.

toDataUrl

  • toDataUrl(type?: undefined | string, ...args: any[]): string
  • Creates and returns an image data URL of an image with all mouse cursors.

    Parameters

    • Optional type: undefined | string

      Optional image mime type. Defaults to image/png.

    • Rest ...args: any[]

      Optional additional encoder parameters. For image/jpeg this is the image quality between 0 and 1 with a default value of 0.92.

    Returns string

    The created data URL.

toImage

  • toImage(type?: undefined | string, ...args: any[]): HTMLImageElement
  • Creates and returns a HTML image with all mouse cursors.

    Parameters

    • Optional type: undefined | string

      Optional image mime type. Defaults to image/png.

    • Rest ...args: any[]

      Optional additional encoder parameters. For image/jpeg this is the image quality between 0 and 1 with a default value of 0.92.

    Returns HTMLImageElement

    The created HTML image.

Static fromArray

  • fromArray(array: Uint8Array): Cursors
  • Parses the mouse cursor images from the given array and returns it.

    Parameters

    • array: Uint8Array

    Returns Cursors

    The parsed mouse cursors.

Static fromBlob

  • fromBlob(blob: Blob): Promise<Cursors>
  • Reads mouse cursor images from the given blob and returns it.

    Parameters

    • blob: Blob

    Returns Promise<Cursors>

    The read mouse cursors.

Generated using TypeDoc