@pdfa-lab/fontkit / BBox
Class: BBox ​
Defined in: src/glyph/bounding-box.ts:126
Alias for BoundingBox to ensure compatibility with @types/fontkit.
Extends ​
Constructors ​
Constructor ​
new BBox(
minX?,minY?,maxX?,maxY?):BBox
Defined in: src/glyph/bounding-box.ts:25
Creates an instance of a bounding box.
Parameters ​
| Parameter | Type | Default value | Description |
|---|---|---|---|
minX | number | Infinity | The initial minimum X position. Defaults to Infinity. |
minY | number | Infinity | The initial minimum Y position. Defaults to Infinity. |
maxX | number | -Infinity | The initial maximum X position. Defaults to -Infinity. |
maxY | number | -Infinity | The initial maximum Y position. Defaults to -Infinity. |
Returns ​
BBox
Inherited from ​
Accessors ​
height ​
Get Signature ​
get height():
number
Defined in: src/glyph/bounding-box.ts:79
The height of the bounding box.
Returns ​
number
Inherited from ​
maxX ​
Get Signature ​
get maxX():
number
Defined in: src/glyph/bounding-box.ts:53
Returns ​
number
Set Signature ​
set maxX(
x):void
Defined in: src/glyph/bounding-box.ts:57
Parameters ​
| Parameter | Type |
|---|---|
x | number |
Returns ​
void
Inherited from ​
maxY ​
Get Signature ​
get maxY():
number
Defined in: src/glyph/bounding-box.ts:61
Returns ​
number
Set Signature ​
set maxY(
y):void
Defined in: src/glyph/bounding-box.ts:65
Parameters ​
| Parameter | Type |
|---|---|
y | number |
Returns ​
void
Inherited from ​
minX ​
Get Signature ​
get minX():
number
Defined in: src/glyph/bounding-box.ts:37
Returns ​
number
Set Signature ​
set minX(
x):void
Defined in: src/glyph/bounding-box.ts:41
Parameters ​
| Parameter | Type |
|---|---|
x | number |
Returns ​
void
Inherited from ​
minY ​
Get Signature ​
get minY():
number
Defined in: src/glyph/bounding-box.ts:45
Returns ​
number
Set Signature ​
set minY(
y):void
Defined in: src/glyph/bounding-box.ts:49
Parameters ​
| Parameter | Type |
|---|---|
y | number |
Returns ​
void
Inherited from ​
width ​
Get Signature ​
get width():
number
Defined in: src/glyph/bounding-box.ts:72
The width of the bounding box.
Returns ​
number
Inherited from ​
Methods ​
addPoint() ​
addPoint(
x,y):void
Defined in: src/glyph/bounding-box.ts:91
Expands the bounding box to include the specified coordinate point. Finite coordinates are ignored if they don't expand the current bounds. Infinite values are explicitly ignored.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
x | number | The X coordinate of the point to add. |
y | number | The Y coordinate of the point to add. |
Returns ​
void
Inherited from ​
copy() ​
copy():
BoundingBox
Defined in: src/glyph/bounding-box.ts:118
Creates a deep copy of the current bounding box instance.
Returns ​
A new BoundingBox instance with matching dimensions.