SurfaceMetrics

A surface's measured box, and the unit every length inside it is expressed against.

@internote/canvas-sdk/reactInterface
On this page
import { SurfaceMetrics } from '@internote/canvas-sdk/react';

#Fields

heightRequired
The SVG's own height in pixels.
number
measuredRequired
Whether the box has been measured, false while it is still the fallback. A surface can skip drawing its content until then: the first measurement lands in a layout effect, before the browser paints, so a picture drawn at the fallback size is thrown away unseen.
boolean
unitRequired
The canvas unit --cnv-unit in pixels: 17 reading, 22 presenting. Sizes in the surface are multiples of it.
number
widthRequired
The SVG's own width in pixels, never the padded container's.
number

Declared in packages/canvas-sdk/src/react/use-surface-metrics.ts:30.

Last updated