Class Background

Constructors

  • Creates a new background image and overlay

    Parameters

    • board: Board

      The [[Board]]

    Returns Background

Properties

image: ImageModel

Represents the background [[Image | image]]

overlay: RectModel

Represents the background [[Rect | overlay]]

Accessors

  • get nodes(): (Image | Rect)[]
  • Returns background nodes which includes image and overlay

    Returns (Image | Rect)[]

Methods

  • Updates color of overlay

    Parameters

    • color: string

      The given color in Hex or RGB

    Returns void

  • Returns current position of background

    Returns {
        x: number;
        y: number;
    }

    • x: number
    • y: number
  • Loads the background image from given file

    Parameters

    • file: File

      The image file

    • Optional options: Partial<BackgroundOptions>

      The background options

    Returns Promise<void>

  • Loads the background image from url

    Parameters

    • url: string

      The image url

    • options: Partial<BackgroundOptions> = ...

      The background options

    Returns Promise<void>