nodeCanvasTextMeasurements()
NodeCanvas provider helper for caller-injected 2D contexts.
This subpath does not import canvas; hosts create and own the native context.
Import
Section titled “Import”import { nodeCanvasTextMeasurements } from "@graphrefly/ts/solutions/reactive-layout/node-canvas";Signature
Section titled “Signature”function nodeCanvasTextMeasurements(opts: NodeCanvasTextMeasurementsOptions): Node<Measurements>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
opts | NodeCanvasTextMeasurementsOptions | Options that configure the helper. |
Returns
Section titled “Returns”A Node<Measurements> value.
Example
Section titled “Example”import { nodeCanvasTextMeasurements } from "@graphrefly/ts/solutions/reactive-layout/node-canvas";Source
Section titled “Source”packages/ts/src/solutions/reactive-layout/node-canvas/index.ts