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

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): IBounds

Parameters

NameType
fourNumberIFourNumber

Returns

IBounds

Implementation of

IBounds.spread

Defined in

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


shrink

shrink(fourNumber): IBounds

Parameters

NameType
fourNumberIFourNumber

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.