Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Rectangle

Hierarchy

Index

Constructors

constructor

  • new Rectangle(x?: number, y?: number, width?: number, height?: number): Rectangle
  • The rectangle class.

    Parameters

    • Optional x: number

      The x coordinate for the upper-left corner

    • Optional y: number

      The y coordinate for the upper-left corner

    • Optional width: number

      The width of the rectangle

    • Optional height: number

      The height of the rectangle

    Returns Rectangle

Properties

bottom

bottom: number

height

height: number

left

left: number

right

right: number

top

top: number

type

type: number

width

width: number

x

x: number

y

y: number

Static EMPTY

EMPTY: Rectangle

Static emptyRectangle

emptyRectangle: Rectangle
static
property

emptyRectangle

Methods

clone

contains

  • contains(x: number, y: number): boolean

copy

enlarge

fit

pad

  • pad(paddingX: number, paddingY: number): void

Generated using TypeDoc