Skip to content

Class: Bounds

Implements

Table of contents

Constructors

Properties

Accessors

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:18

Properties

x

x: number

Implementation of

IBounds.x

Defined in

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


y

y: number

Implementation of

IBounds.y

Defined in

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


width

width: number

Implementation of

IBounds.width

Defined in

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


height

height: number

Implementation of

IBounds.height

Defined in

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

Accessors

minX

get minX(): number

Returns

number

Implementation of

IBounds.minX

Defined in

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


minY

get minY(): number

Returns

number

Implementation of

IBounds.minY

Defined in

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


maxX

get maxX(): number

Returns

number

Implementation of

IBounds.maxX

Defined in

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


maxY

get maxY(): number

Returns

number

Implementation of

IBounds.maxY

Defined in

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

Methods

set

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

Parameters

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

Returns

IBounds

Implementation of

IBounds.set

Defined in

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


get

get(): IBoundsData

Returns

IBoundsData

Implementation of

IBounds.get

Defined in

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


clone

clone(): IBounds

Returns

IBounds

Implementation of

IBounds.clone

Defined in

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


move

move(x, y): IBounds

Parameters

NameType
xnumber
ynumber

Returns

IBounds

Implementation of

IBounds.move

Defined in

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


scale

scale(scaleX, scaleY?): IBounds

Parameters

NameType
scaleXnumber
scaleY?number

Returns

IBounds

Implementation of

IBounds.scale

Defined in

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


scaleOf

scaleOf(origin, scaleX, scaleY?): IBounds

Parameters

NameType
originIPointData
scaleXnumber
scaleY?number

Returns

IBounds

Implementation of

IBounds.scaleOf

Defined in

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


toOuterOf

toOuterOf(matrix, to?): IBounds

Parameters

NameType
matrixIMatrixData
to?IBoundsData

Returns

IBounds

Implementation of

IBounds.toOuterOf

Defined in

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


toInnerOf

toInnerOf(matrix, to?): IBounds

Parameters

NameType
matrixIMatrixData
to?IBoundsData

Returns

IBounds

Implementation of

IBounds.toInnerOf

Defined in

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


getFitMatrix

getFitMatrix(put, baseScale?): IMatrix

Parameters

NameType
putIBoundsData
baseScale?number

Returns

IMatrix

Implementation of

IBounds.getFitMatrix

Defined in

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


spread

spread(fourNumber, spreadY?): IBounds

Parameters

NameType
fourNumberIFourNumber
spreadY?number

Returns

IBounds

Implementation of

IBounds.spread

Defined in

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


shrink

shrink(fourNumber): IBounds

Parameters

NameType
fourNumberIFourNumber

Returns

IBounds

Implementation of

IBounds.shrink

Defined in

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


ceil

ceil(): IBounds

Returns

IBounds

Implementation of

IBounds.ceil

Defined in

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


unsign

unsign(): IBounds

Returns

IBounds

Implementation of

IBounds.unsign

Defined in

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


float

float(maxLength?): IBounds

Parameters

NameType
maxLength?number

Returns

IBounds

Implementation of

IBounds.float

Defined in

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


add

add(bounds): IBounds

Parameters

NameType
boundsIBoundsData

Returns

IBounds

Implementation of

IBounds.add

Defined in

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


addList

addList(boundsList): IBounds

Parameters

NameType
boundsListIBoundsData[]

Returns

IBounds

Implementation of

IBounds.addList

Defined in

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


setList

setList(boundsList): IBounds

Parameters

NameType
boundsListIBoundsData[]

Returns

IBounds

Implementation of

IBounds.setList

Defined in

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


addListWithFn

addListWithFn(list, boundsDataFn): IBounds

Parameters

NameType
listIObject[]
boundsDataFnIBoundsDataFn

Returns

IBounds

Implementation of

IBounds.addListWithFn

Defined in

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


setListWithFn

setListWithFn(list, boundsDataFn): IBounds

Parameters

NameType
listIObject[]
boundsDataFnIBoundsDataFn

Returns

IBounds

Implementation of

IBounds.setListWithFn

Defined in

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


setPoints

setPoints(points): IBounds

Parameters

NameType
pointsIPointData[]

Returns

IBounds

Implementation of

IBounds.setPoints

Defined in

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


addPoint

addPoint(point): IBounds

Parameters

NameType
pointIPointData

Returns

IBounds

Implementation of

IBounds.addPoint

Defined in

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


getPoints

getPoints(): IPointData[]

Returns

IPointData[]

Implementation of

IBounds.getPoints

Defined in

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


hitPoint

hitPoint(point, pointMatrix?): boolean

Parameters

NameType
pointIPointData
pointMatrix?IMatrixData

Returns

boolean

Implementation of

IBounds.hitPoint

Defined in

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


hitRadiusPoint

hitRadiusPoint(point, pointMatrix?): boolean

Parameters

NameType
pointIRadiusPointData
pointMatrix?IMatrixWithLayoutData

Returns

boolean

Implementation of

IBounds.hitRadiusPoint

Defined in

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


hit

hit(bounds, boundsMatrix?): boolean

Parameters

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns

boolean

Implementation of

IBounds.hit

Defined in

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


includes

includes(bounds, boundsMatrix?): boolean

Parameters

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns

boolean

Implementation of

IBounds.includes

Defined in

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


intersect

intersect(bounds, boundsMatrix?): IBounds

Parameters

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns

IBounds

Implementation of

IBounds.intersect

Defined in

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


getIntersect

getIntersect(bounds, boundsMatrix?): IBounds

Parameters

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns

IBounds

Implementation of

IBounds.getIntersect

Defined in

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


isSame

isSame(bounds): boolean

Parameters

NameType
boundsIBoundsData

Returns

boolean

Implementation of

IBounds.isSame

Defined in

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


isEmpty

isEmpty(): boolean

Returns

boolean

Implementation of

IBounds.isEmpty

Defined in

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


reset

reset(): void

Returns

void

Implementation of

IBounds.reset

Defined in

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

Released under the MIT License.