Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Box

Structure that represents a bounding box.

Hierarchy

  • Box

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Box(boxId: number, rect: [number, number, number, number], objectType: string, objectId?: number): Box
  • Parameters

    • boxId: number
    • rect: [number, number, number, number]
    • objectType: string
    • Optional objectId: number

    Returns Box

Properties

boxId

boxId: number

Optional objectId

objectId: number

objectType

objectType: string

rect

rect: [number, number, number, number]

Methods

toSize

  • toSize(width: number, height: number): size
  • Transform tha coordinates that are in between 0 and 1 to coordinates relative to the width and height of the display.

    Parameters

    • width: number

      Width of the display.

    • height: number

      Height of the display.

    Returns size

    A size object containing the relative offset, widht and height.

Made by Horyus. Documentation generated by TypeDoc.