Constructors

  • simple data class containing the bounds of an object or region

    Parameters

    • x: number

      horizontal coordinate of upper left corner

    • y: number

      vertical coordinate of upper left corner

    • w: number

      width or horizontal offset of lower right corner

    • h: number

      height or vertical offset of lower right corner

    • OptionaltwoPoints: boolean

      when true, w and h are interpreted as absolute coordinates of lower right corner

    Returns Bounds

Methods

  • compares this object to another instance

    Parameters

    Returns boolean

  • modifies this structure by extending it with the specified bounds

    Parameters

    Returns void

  • modifies this structure by extending it with the specified point

    Parameters

    • x: number
    • y: number

    Returns void

  • returns value of requested config option

    Parameters

    • value: "x" | "y" | "right" | "top" | "width" | "height"

      name of the value

    Returns number

  • sets value of requested config option

    Parameters

    • identifier: "x" | "y" | "right" | "top" | "width" | "height"

      name of the value

    • value: number

    Returns boolean

  • update the bounds rectangle returns true if the bounds changed, false if no update was required

    Parameters

    • x: number

      horizontal coordinate of upper left corner

    • y: number

      vertical coordinate of upper left corner

    • w: number

      width or horizontal offset of lower right corner

    • h: number

      height or vertical offset of lower right corner

    • OptionaltwoPoints: boolean

      when true, w and h are interpreted as absolute coordinates of lower right corner

    Returns boolean