Skip to content

Class: Bounds โ€‹

Implements โ€‹

Table of contents โ€‹

Constructors โ€‹

Properties โ€‹

Accessors โ€‹

Methods โ€‹

Constructors โ€‹

constructor โ€‹

โ€ข new Bounds(x?, y?, width?, height?): Bounds

Parameters โ€‹

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

Returns โ€‹

Bounds

Defined in โ€‹

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

Properties โ€‹

x โ€‹

โ€ข x: number

Implementation of โ€‹

IBounds.x

Defined in โ€‹

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


y โ€‹

โ€ข y: number

Implementation of โ€‹

IBounds.y

Defined in โ€‹

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


width โ€‹

โ€ข width: number

Implementation of โ€‹

IBounds.width

Defined in โ€‹

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


height โ€‹

โ€ข height: number

Implementation of โ€‹

IBounds.height

Defined in โ€‹

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

Accessors โ€‹

minX โ€‹

โ€ข get minX(): number

Returns โ€‹

number

Implementation of โ€‹

IBounds.minX

Defined in โ€‹

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


minY โ€‹

โ€ข get minY(): number

Returns โ€‹

number

Implementation of โ€‹

IBounds.minY

Defined in โ€‹

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


maxX โ€‹

โ€ข get maxX(): number

Returns โ€‹

number

Implementation of โ€‹

IBounds.maxX

Defined in โ€‹

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


maxY โ€‹

โ€ข get maxY(): number

Returns โ€‹

number

Implementation of โ€‹

IBounds.maxY

Defined in โ€‹

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

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 โ€‹

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


get โ€‹

โ–ธ get(): IBoundsData

Returns โ€‹

IBoundsData

Implementation of โ€‹

IBounds.get

Defined in โ€‹

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


clone โ€‹

โ–ธ clone(): IBounds

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.clone

Defined in โ€‹

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


move โ€‹

โ–ธ move(x, y): IBounds

Parameters โ€‹

NameType
xnumber
ynumber

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.move

Defined in โ€‹

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


scale โ€‹

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

Parameters โ€‹

NameType
scaleXnumber
scaleY?number
onlySize?boolean

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.scale

Defined in โ€‹

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


scaleOf โ€‹

โ–ธ scaleOf(origin, scaleX, scaleY?): IBounds

Parameters โ€‹

NameType
originIPointData
scaleXnumber
scaleY?number

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.scaleOf

Defined in โ€‹

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


toOuterOf โ€‹

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

Parameters โ€‹

NameType
matrixIMatrixData
to?IBoundsData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.toOuterOf

Defined in โ€‹

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


toInnerOf โ€‹

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

Parameters โ€‹

NameType
matrixIMatrixData
to?IBoundsData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.toInnerOf

Defined in โ€‹

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


getFitMatrix โ€‹

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

Parameters โ€‹

NameType
putIBoundsData
baseScale?number

Returns โ€‹

IMatrix

Implementation of โ€‹

IBounds.getFitMatrix

Defined in โ€‹

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


put โ€‹

โ–ธ put(put, align?, putScale?): void

Parameters โ€‹

NameType
putIBoundsData
align?IDirection
putScale?number | "fit" | "cover"

Returns โ€‹

void

Implementation of โ€‹

IBounds.put

Defined in โ€‹

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


spread โ€‹

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

Parameters โ€‹

NameType
fourNumberIFourNumber
side?ISide

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.spread

Defined in โ€‹

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


shrink โ€‹

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

Parameters โ€‹

NameType
fourNumberIFourNumber
side?ISide

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.shrink

Defined in โ€‹

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


ceil โ€‹

โ–ธ ceil(): IBounds

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.ceil

Defined in โ€‹

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


unsign โ€‹

โ–ธ unsign(): IBounds

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.unsign

Defined in โ€‹

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


float โ€‹

โ–ธ float(maxLength?): IBounds

Parameters โ€‹

NameType
maxLength?number

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.float

Defined in โ€‹

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


add โ€‹

โ–ธ add(bounds): IBounds

Parameters โ€‹

NameType
boundsIBoundsData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.add

Defined in โ€‹

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


addList โ€‹

โ–ธ addList(boundsList): IBounds

Parameters โ€‹

NameType
boundsListIBoundsData[]

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.addList

Defined in โ€‹

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


setList โ€‹

โ–ธ setList(boundsList): IBounds

Parameters โ€‹

NameType
boundsListIBoundsData[]

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.setList

Defined in โ€‹

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


addListWithFn โ€‹

โ–ธ addListWithFn(list, boundsDataFn): IBounds

Parameters โ€‹

NameType
listIObject[]
boundsDataFnIBoundsDataFn

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.addListWithFn

Defined in โ€‹

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


setListWithFn โ€‹

โ–ธ setListWithFn(list, boundsDataFn): IBounds

Parameters โ€‹

NameType
listIObject[]
boundsDataFnIBoundsDataFn

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.setListWithFn

Defined in โ€‹

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


setPoint โ€‹

โ–ธ setPoint(point): IBounds

Parameters โ€‹

NameType
pointIPointData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.setPoint

Defined in โ€‹

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


setPoints โ€‹

โ–ธ setPoints(points): IBounds

Parameters โ€‹

NameType
pointsIPointData[]

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.setPoints

Defined in โ€‹

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


addPoint โ€‹

โ–ธ addPoint(point): IBounds

Parameters โ€‹

NameType
pointIPointData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.addPoint

Defined in โ€‹

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


getPoints โ€‹

โ–ธ getPoints(): IPointData[]

Returns โ€‹

IPointData[]

Implementation of โ€‹

IBounds.getPoints

Defined in โ€‹

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


hitPoint โ€‹

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

Parameters โ€‹

NameType
pointIPointData
pointMatrix?IMatrixData

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.hitPoint

Defined in โ€‹

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


hitRadiusPoint โ€‹

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

Parameters โ€‹

NameType
pointIRadiusPointData
pointMatrix?IMatrixWithLayoutData

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.hitRadiusPoint

Defined in โ€‹

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


hit โ€‹

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

Parameters โ€‹

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.hit

Defined in โ€‹

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


includes โ€‹

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

Parameters โ€‹

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.includes

Defined in โ€‹

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


intersect โ€‹

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

Parameters โ€‹

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.intersect

Defined in โ€‹

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


getIntersect โ€‹

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

Parameters โ€‹

NameType
boundsIBoundsData
boundsMatrix?IMatrixData

Returns โ€‹

IBounds

Implementation of โ€‹

IBounds.getIntersect

Defined in โ€‹

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


isSame โ€‹

โ–ธ isSame(bounds): boolean

Parameters โ€‹

NameType
boundsIBoundsData

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.isSame

Defined in โ€‹

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


isEmpty โ€‹

โ–ธ isEmpty(): boolean

Returns โ€‹

boolean

Implementation of โ€‹

IBounds.isEmpty

Defined in โ€‹

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


reset โ€‹

โ–ธ reset(): void

Returns โ€‹

void

Implementation of โ€‹

IBounds.reset

Defined in โ€‹

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

Released under the MIT License.