Class: Rectangle#

Hierarchy#

Constructors#

constructor#

new Rectangle(minX: number, minY: number, maxX: number, maxY: number): Rectangle

Parameters:#

NameType
minXnumber
minYnumber
maxXnumber
maxYnumber

Returns: Rectangle

Defined in: handles/rect.ts:6

Properties#

handle#

• Readonly handle: rect

Inherited from: Handle.handle

Defined in: handles/handle.ts:6

Accessors#

centerX#

centerX(): number

Returns: number

Defined in: handles/rect.ts:16


centerY#

centerY(): number

Returns: number

Defined in: handles/rect.ts:20


id#

id(): number

Get the unique ID of the handle. The ID is recycled once you destroy the object.

Returns: number

The unique ID of a handle object.

Defined in: handles/handle.ts:18


maxX#

maxX(): number

Returns: number

Defined in: handles/rect.ts:24


maxY#

maxY(): number

Returns: number

Defined in: handles/rect.ts:28


minX#

minX(): number

Returns: number

Defined in: handles/rect.ts:32


minY#

minY(): number

Returns: number

Defined in: handles/rect.ts:36

Methods#

destroy#

destroy(): void

Returns: void

Defined in: handles/rect.ts:40


enumDestructables#

enumDestructables(filter: boolexpr | function, actionFunc: function): void

Parameters:#

NameType
filterboolexpr | () => boolean
actionFunc() => void

Returns: void

Defined in: handles/rect.ts:44


enumItems#

enumItems(filter: boolexpr | function, actionFunc: function): void

Parameters:#

NameType
filterboolexpr | () => boolean
actionFunc() => void

Returns: void

Defined in: handles/rect.ts:48


move#

move(newCenterX: number, newCenterY: number): void

Parameters:#

NameType
newCenterXnumber
newCenterYnumber

Returns: void

Defined in: handles/rect.ts:52


movePoint#

movePoint(newCenterPoint: Point): void

Parameters:#

NameType
newCenterPointPoint

Returns: void

Defined in: handles/rect.ts:56


setRect#

setRect(minX: number, minY: number, maxX: number, maxY: number): void

Parameters:#

NameType
minXnumber
minYnumber
maxXnumber
maxYnumber

Returns: void

Defined in: handles/rect.ts:60


setRectFromPoint#

setRectFromPoint(min: Point, max: Point): void

Parameters:#

NameType
minPoint
maxPoint

Returns: void

Defined in: handles/rect.ts:64


fromHandle#

static fromHandle(handle: rect): Rectangle

Parameters:#

NameType
handlerect

Returns: Rectangle

Defined in: handles/rect.ts:68


fromPoint#

static fromPoint(min: Point, max: Point): Rectangle

Parameters:#

NameType
minPoint
maxPoint

Returns: Rectangle

Defined in: handles/rect.ts:72


getWorldBounds#

static getWorldBounds(): Rectangle

Returns: Rectangle

Defined in: handles/rect.ts:77