Documentation / @ripl/terminal / letterboxMatrix
Function: letterboxMatrix() ​
letterboxMatrix(
scale,offsetX,offsetY):Matrix
Defined in: terminal/src/transform.ts:56
Builds the letterbox matrix a terminal context maps logical coordinates through: a uniform scale plus the centring offset that fits the logical space into the character grid.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
scale | number | The uniform logical-to-raster scale factor. |
offsetX | number | Horizontal centring offset, in raster pixels. |
offsetY | number | Vertical centring offset, in raster pixels. |
Returns ​
The letterbox matrix.