Skip to content
导航

Class: Bounds

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Bounds(x?, y?, width?, height?)

Parameters

NameType
x?number | IBoundsData
y?number
width?number
height?number

Defined in

leafer/packages/math/src/Bounds.ts:12

Properties

x

x: number

Implementation of

IBounds.x

Defined in

leafer/packages/math/src/Bounds.ts:7


y

y: number

Implementation of

IBounds.y

Defined in

leafer/packages/math/src/Bounds.ts:8


width

width: number

Implementation of

IBounds.width

Defined in

leafer/packages/math/src/Bounds.ts:9


height

height: number

Implementation of

IBounds.height

Defined in

leafer/packages/math/src/Bounds.ts:10

Methods

set

set(x?, y?, width?, height?): void

Parameters

NameType
x?number
y?number
width?number
height?number

Returns

void

Implementation of

IBounds.set

Defined in

leafer/packages/math/src/Bounds.ts:16


copy

copy(bounds): IBounds

Parameters

NameType
boundsIBoundsData

Returns

IBounds

Implementation of

IBounds.copy

Defined in

leafer/packages/math/src/Bounds.ts:20


clone

clone(): IBounds

Returns

IBounds

Implementation of

IBounds.clone

Defined in

leafer/packages/math/src/Bounds.ts:25


scale

scale(scale): IBounds

Parameters

NameType
scalenumber

Returns

IBounds

Implementation of

IBounds.scale

Defined in

leafer/packages/math/src/Bounds.ts:30


toOuterOf

toOuterOf(matrix, to?): IBounds

Parameters

NameType
matrixIMatrixData
to?IBoundsData

Returns

IBounds

Implementation of

IBounds.toOuterOf

Defined in

leafer/packages/math/src/Bounds.ts:35


getFitMatrix

getFitMatrix(put): IMatrix

Parameters

NameType
putIBoundsData

Returns

IMatrix

Implementation of

IBounds.getFitMatrix

Defined in

leafer/packages/math/src/Bounds.ts:40


spread

spread(size): IBounds

Parameters

NameType
sizenumber

Returns

IBounds

Implementation of

IBounds.spread

Defined in

leafer/packages/math/src/Bounds.ts:44


ceil

ceil(): IBounds

Returns

IBounds

Implementation of

IBounds.ceil

Defined in

leafer/packages/math/src/Bounds.ts:49


add

add(bounds): IBounds

Parameters

NameType
boundsIBoundsData

Returns

IBounds

Implementation of

IBounds.add

Defined in

leafer/packages/math/src/Bounds.ts:56


addList

addList(boundsList): IBounds

Parameters

NameType
boundsListIBounds[]

Returns

IBounds

Implementation of

IBounds.addList

Defined in

leafer/packages/math/src/Bounds.ts:61


setByList

setByList(boundsList, addMode?): IBounds

Parameters

NameType
boundsListIBounds[]
addMode?boolean

Returns

IBounds

Implementation of

IBounds.setByList

Defined in

leafer/packages/math/src/Bounds.ts:66


addListWithHandle

addListWithHandle(list, boundsDataHandle): IBounds

Parameters

NameType
listIObject[]
boundsDataHandleIBoundsDataHandle

Returns

IBounds

Implementation of

IBounds.addListWithHandle

Defined in

leafer/packages/math/src/Bounds.ts:71


setByListWithHandle

setByListWithHandle(list, boundsDataHandle, addMode?): IBounds

Parameters

NameType
listIObject[]
boundsDataHandleIBoundsDataHandle
addMode?boolean

Returns

IBounds

Implementation of

IBounds.setByListWithHandle

Defined in

leafer/packages/math/src/Bounds.ts:76


setByPoints

setByPoints(points): IBounds

Parameters

NameType
pointsIPointData[]

Returns

IBounds

Implementation of

IBounds.setByPoints

Defined in

leafer/packages/math/src/Bounds.ts:81


hitPoint

hitPoint(point, pointMatrix?): boolean

Parameters

NameType
pointIPointData
pointMatrix?IMatrixData

Returns

boolean

Implementation of

IBounds.hitPoint

Defined in

leafer/packages/math/src/Bounds.ts:88


hitRadiusPoint

hitRadiusPoint(point, pointMatrix?): boolean

Parameters

NameType
pointIRadiusPointData
pointMatrix?IMatrixData

Returns

boolean

Implementation of

IBounds.hitRadiusPoint

Defined in

leafer/packages/math/src/Bounds.ts:92


hit

hit(bounds, boundsMatrix?): boolean

Parameters

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns

boolean

Implementation of

IBounds.hit

Defined in

leafer/packages/math/src/Bounds.ts:96


includes

includes(bounds, boundsMatrix?): boolean

Parameters

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns

boolean

Implementation of

IBounds.includes

Defined in

leafer/packages/math/src/Bounds.ts:100


intersect

intersect(bounds, boundsMatrix?): IBounds

Parameters

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns

IBounds

Implementation of

IBounds.intersect

Defined in

leafer/packages/math/src/Bounds.ts:105


getIntersect

getIntersect(bounds, boundsMatrix?): IBounds

Parameters

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns

IBounds

Implementation of

IBounds.getIntersect

Defined in

leafer/packages/math/src/Bounds.ts:110


isSame

isSame(bounds): boolean

Parameters

NameType
boundsIBoundsData

Returns

boolean

Implementation of

IBounds.isSame

Defined in

leafer/packages/math/src/Bounds.ts:115


isEmpty

isEmpty(): boolean

Returns

boolean

Implementation of

IBounds.isEmpty

Defined in

leafer/packages/math/src/Bounds.ts:119


reset

reset(): void

Returns

void

Implementation of

IBounds.reset

Defined in

leafer/packages/math/src/Bounds.ts:123

Released under the MIT License.