@kayahr/wastelib
    Preparing search index...

    Class Cursors

    Container for the 8 mouse cursors in the CURS file.

    Index

    Methods

    • 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.

    • Returns the number of mouse cursors.

      Returns number

      THe number of mouse cursors.

    • Creates and returns a new canvas containing all the mouse cursors.

      Returns HTMLCanvasElement

      The created canvas.

    • Creates and returns an image data URL of an image with all mouse cursors.

      Parameters

      • Optionaltype: string

        Optional image mime type. Defaults to image/png.

      • Optionalquality: number

        Optional quality parameter for encoder. 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.

    • Creates and returns a HTML image with all mouse cursors.

      Parameters

      • Optionaltype: string

        Optional image mime type. Defaults to image/png.

      • Optionalquality: number

        Optional quality parameter for encoder. 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.

    • Parses the mouse cursor images from the given array and returns it.

      Parameters

      • array: Uint8Array

        The array with the CURS file content to parse.

      Returns Cursors

      The parsed mouse cursors.

    • Reads mouse cursor images from the given blob and returns it.

      Parameters

      • blob: Blob

        The CURS blob to read.

      Returns Promise<Cursors>

      The read mouse cursors.