Skip to content

Documentation / @finchart/core / index / DrawSurface

Interface: DrawSurface ​

Defined in: packages/core/src/render/types.ts:165

The surface a picture actually lands on. The single owner of size.

context exists only when there's a canvas — a surface that doesn't replay commands (headless — a recording renderer just receives commands) only holds size. Whoever actually requires a context (createCanvasRenderer, createCanvasTextMeasurer) throws at construction if it's missing — a wiring error, not a quiet null object.

Properties ​

context? ​

readonly optional context?: Canvas2DContext

Defined in: packages/core/src/render/types.ts:168


height ​

readonly height: number

Defined in: packages/core/src/render/types.ts:167


width ​

readonly width: number

Defined in: packages/core/src/render/types.ts:166