Skip to content

Documentation / @finchart/core / index / Renderer

Interface: Renderer ​

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

The side that piles up one frame and sends it out all at once — everything Plot knows. An inspection window like getCommands() belongs to the implementation, not the contract.

Extends ​

Methods ​

clear() ​

clear(): void

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

Discards the piled-up commands. The screen is still unchanged.

Returns ​

void


clip()? ​

optional clip(area): void

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

From here on, nothing outside this area gets drawn. null releases it.

This lives here, not on DrawTarget — a series or decoration must not know which pane it's in, or where that pane ends. The boundary is owned by whoever allocated the panes (Plot).

It's optional — a renderer that skips it simply doesn't clip. Still, it's right for a renderer that actually draws onto a canvas to implement it: without clipping, a picture that leaks outside the pane stays visible as-is.

Parameters ​

area ​

PlotArea | null

Returns ​

void


commit() ​

commit(): void

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

Clears the screen and replays the piled-up commands.

Returns ​

void


drawCustom()? ​

optional drawCustom(draw): void

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

An extension sends its own primitive. It's optional so existing implementations don't break.

Don't call this directly — use drawCustom(target, draw), which replays the fallback on a surface missing this method. Calling this directly lets optional chaining quietly fall to drawing nothing.

Parameters ​

draw ​

CustomDraw

Returns ​

void

Inherited from ​

DrawTarget.drawCustom


drawLine() ​

drawLine(points, style): void

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

Parameters ​

points ​

Point[]

style ​

LineStyle

Returns ​

void

Inherited from ​

DrawTarget.drawLine


drawShape() ​

drawShape(params): void

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

Parameters ​

params ​

ShapeParams

Returns ​

void

Inherited from ​

DrawTarget.drawShape


drawText() ​

drawText(params): void

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

Places text. Measuring and placement are both the receiver's job.

Parameters ​

params ​

TextParams

Returns ​

void

Inherited from ​

DrawTarget.drawText