mcut
@mcut/compositor

SizeHelpers

Generated TypeScript API reference for the public mcut SDK.

mcut SDK


mcut SDK / compositor/src / SizeHelpers

Interface: SizeHelpers

Defined in: packages/compositor/src/geometry.ts:31

Properties

getAssetSize?

optional getAssetSize?: (assetId) => ElementSize | null;

Defined in: packages/compositor/src/geometry.ts:33

Natural pixel size of a media asset (probed metadata).

Parameters

assetId

string

Returns

ElementSize | null


measureText?

optional measureText?: (text, style, box?, runs?) => ElementSize;

Defined in: packages/compositor/src/geometry.ts:35

Measure a text block (unscaled). Required for text element bounds.

Parameters

text

string

style
align

"left" | "center" | "right" = ...

backgroundColor?

string = ...

color

string = ...

fontFamily

string = ...

fontSize

number = ...

fontStyle

"normal" | "italic" = ...

fontWeight

number = ...

letterSpacing

number = ...

Extra space between characters in px (tracking).

lineHeight

number = ...

Line height as a multiple of fontSize.

shadow?

{ blur: number; color: string; offsetX: number; offsetY: number; } = ...

shadow.blur

number = ...

shadow.color

string = ...

Any CSS color (alpha encodes the strength).

shadow.offsetX

number = ...

shadow.offsetY

number = ...

stroke?

{ color: string; width: number; } = ...

stroke.color

string = ...

Any CSS color.

stroke.width

number = ...

Visible width in project px (frames paint it inside the bounds).

textTransform

"lowercase" | "uppercase" | "none" = ...

Case applied at render time; the stored text keeps the user's casing.

box?
height?

number = ...

overflow

"visible" | "clip" = ...

width

number = ...

runs?

readonly object[]

Returns

ElementSize

On this page