Skip to content

CanvasRenderOptions

Defined in: src/driver/web/canvas-renderer.ts:100

Options for renderBufferToCanvas.

optional defaultBg?: string

Defined in: src/driver/web/canvas-renderer.ts:108

Default background when a cell doesn’t override it.


optional defaultFg?: string

Defined in: src/driver/web/canvas-renderer.ts:106

Default foreground when a cell doesn’t override it.


optional dpr?: number

Defined in: src/driver/web/canvas-renderer.ts:110

Device pixel ratio the context is already scaled by (for crisp strokes).


fontFamily: string

Defined in: src/driver/web/canvas-renderer.ts:104

CSS font-family stack.


fontSize: number

Defined in: src/driver/web/canvas-renderer.ts:102

Font size in px (glyphs are drawn at this size, centered in the cell).


optional requestRepaint?: () => void

Defined in: src/driver/web/canvas-renderer.ts:116

Called when an async-loaded vector icon finishes decoding, so the caller can repaint the last frame (the SVG wasn’t ready on the first draw). Omit on non-browser callers (tests) — SVG cells are simply skipped there.

void