Documentation / @ripl/terminal / ClipMask
Interface: ClipMask ​
Defined in: terminal/src/clip.ts:16
A raster-space stencil restricting where a context may draw.
A mask is immutable once built, so pushing one onto the context's state stack copies a reference rather than a buffer.
Methods ​
contains() ​
contains(
x,y):boolean
Defined in: terminal/src/clip.ts:24
Whether the given raster pixel is inside the clip region.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
x | number | X coordinate in raster space. |
y | number | Y coordinate in raster space. |
Returns ​
boolean
true when the pixel may be drawn.