labelPx

Converts an element's text-size: to pixels at the environment's scale factor.

@internote/canvas-sdkFunction
On this page
import { labelPx } from '@internote/canvas-sdk';

The points are the schema's, with a default of LABEL_POINTS, and one of them is the share of LABEL_SIZE that makes the default land on the standard size. u is the ratio the environment is scaled by, not the unit itself.

#Signature

(points: unknown, u: number): number

#Parameters

points
The attribute's value, or undefined for the default.
u
The environment's scale factor.

Declared in packages/canvas-sdk/src/text/index.ts:217.

Last updated