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

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

Accessors โ€‹

minX โ€‹

โ€ข get minX(): number

Returns โ€‹

number

Implementation of โ€‹

IBounds.minX

Defined in โ€‹

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


minY โ€‹

โ€ข get minY(): number

Returns โ€‹

number

Implementation of โ€‹

IBounds.minY

Defined in โ€‹

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


maxX โ€‹

โ€ข get maxX(): number

Returns โ€‹

number

Implementation of โ€‹

IBounds.maxX

Defined in โ€‹

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


maxY โ€‹

โ€ข get maxY(): number

Returns โ€‹

number

Implementation of โ€‹

IBounds.maxY

Defined in โ€‹

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

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


get โ€‹

โ–ธ get(): IBoundsData

Returns โ€‹

IBoundsData

Implementation of โ€‹

IBounds.get

Defined in โ€‹

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


clone โ€‹

โ–ธ clone(): IBounds

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.clone

Defined in โ€‹

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


move โ€‹

โ–ธ move(x, y): IBounds

Parameters โ€‹

NameType
xnumber
ynumber

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.move

Defined in โ€‹

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


scale โ€‹

โ–ธ scale(scaleX, scaleY?): IBounds

Parameters โ€‹

NameType
scaleXnumber
scaleY?number

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.scale

Defined in โ€‹

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


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


toOuterOf โ€‹

โ–ธ toOuterOf(matrix, to?): IBounds

Parameters โ€‹

NameType
matrixIMatrixData
to?IBoundsData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.toOuterOf

Defined in โ€‹

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


toInnerOf โ€‹

โ–ธ toInnerOf(matrix, to?): IBounds

Parameters โ€‹

NameType
matrixIMatrixData
to?IBoundsData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.toInnerOf

Defined in โ€‹

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


getFitMatrix โ€‹

โ–ธ getFitMatrix(put, baseScale?): IMatrix

Parameters โ€‹

NameType
putIBoundsData
baseScale?number

Returns โ€‹

IMatrix

Implementation of โ€‹

IBounds.getFitMatrix

Defined in โ€‹

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


spread โ€‹

โ–ธ spread(fourNumber, side?): IBounds

Parameters โ€‹

NameType
fourNumberIFourNumber
side?ISide

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.spread

Defined in โ€‹

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


shrink โ€‹

โ–ธ shrink(fourNumber, side?): IBounds

Parameters โ€‹

NameType
fourNumberIFourNumber
side?ISide

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.shrink

Defined in โ€‹

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


ceil โ€‹

โ–ธ ceil(): IBounds

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.ceil

Defined in โ€‹

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


unsign โ€‹

โ–ธ unsign(): IBounds

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.unsign

Defined in โ€‹

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


float โ€‹

โ–ธ float(maxLength?): IBounds

Parameters โ€‹

NameType
maxLength?number

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.float

Defined in โ€‹

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


add โ€‹

โ–ธ add(bounds): IBounds

Parameters โ€‹

NameType
boundsIBoundsData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.add

Defined in โ€‹

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


addList โ€‹

โ–ธ addList(boundsList): IBounds

Parameters โ€‹

NameType
boundsListIBoundsData[]

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.addList

Defined in โ€‹

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


setList โ€‹

โ–ธ setList(boundsList): IBounds

Parameters โ€‹

NameType
boundsListIBoundsData[]

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.setList

Defined in โ€‹

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


addListWithFn โ€‹

โ–ธ addListWithFn(list, boundsDataFn): IBounds

Parameters โ€‹

NameType
listIObject[]
boundsDataFnIBoundsDataFn

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.addListWithFn

Defined in โ€‹

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


setListWithFn โ€‹

โ–ธ setListWithFn(list, boundsDataFn): IBounds

Parameters โ€‹

NameType
listIObject[]
boundsDataFnIBoundsDataFn

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.setListWithFn

Defined in โ€‹

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


setPoint โ€‹

โ–ธ setPoint(point): IBounds

Parameters โ€‹

NameType
pointIPointData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.setPoint

Defined in โ€‹

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


setPoints โ€‹

โ–ธ setPoints(points): IBounds

Parameters โ€‹

NameType
pointsIPointData[]

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.setPoints

Defined in โ€‹

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


addPoint โ€‹

โ–ธ addPoint(point): IBounds

Parameters โ€‹

NameType
pointIPointData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.addPoint

Defined in โ€‹

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


getPoints โ€‹

โ–ธ getPoints(): IPointData[]

Returns โ€‹

IPointData[]

Implementation of โ€‹

IBounds.getPoints

Defined in โ€‹

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


hitPoint โ€‹

โ–ธ hitPoint(point, pointMatrix?): boolean

Parameters โ€‹

NameType
pointIPointData
pointMatrix?IMatrixData

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.hitPoint

Defined in โ€‹

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


hitRadiusPoint โ€‹

โ–ธ hitRadiusPoint(point, pointMatrix?): boolean

Parameters โ€‹

NameType
pointIRadiusPointData
pointMatrix?IMatrixWithLayoutData

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.hitRadiusPoint

Defined in โ€‹

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


hit โ€‹

โ–ธ hit(bounds, boundsMatrix?): boolean

Parameters โ€‹

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.hit

Defined in โ€‹

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


includes โ€‹

โ–ธ includes(bounds, boundsMatrix?): boolean

Parameters โ€‹

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.includes

Defined in โ€‹

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


intersect โ€‹

โ–ธ intersect(bounds, boundsMatrix?): IBounds

Parameters โ€‹

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.intersect

Defined in โ€‹

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


getIntersect โ€‹

โ–ธ getIntersect(bounds, boundsMatrix?): IBounds

Parameters โ€‹

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.getIntersect

Defined in โ€‹

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


isSame โ€‹

โ–ธ isSame(bounds): boolean

Parameters โ€‹

NameType
boundsIBoundsData

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.isSame

Defined in โ€‹

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


isEmpty โ€‹

โ–ธ isEmpty(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.isEmpty

Defined in โ€‹

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


reset โ€‹

โ–ธ reset(): void

Returns โ€‹

void

Implementation of โ€‹

IBounds.reset

Defined in โ€‹

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

Released under the MIT License.