Skip to content

Documentation / @ripl/core / applyElementTransform

Function: applyElementTransform()

applyElementTransform(target, element): void

Defined in: packages/core/src/core/element.ts:308

Applies an element's transform (translate, rotate, scale about its transform-origin) to the given target. Used both to drive a Context's transform during rendering and, via a matrix accumulator, to reconstruct an element's world transform for hit testing.

Parameters

ParameterTypeDescription
targetTransformTargetThe Context (or matrix accumulator) to apply the transform to.
elementElementThe element whose transform is applied.

Returns

void