@rendley/sdk - v1.15.19
    Preparing search index...

    Interface ClipBoundingInfo

    Unified, host-facing bounding description of a clip in composition space.

    All fields describe ONE box: the clip's interactive geometry (width × height, always non-negative — flips are visible through style.getScale() signs, not here). Visual extent beyond the geometry (e.g. a shape's centered stroke and drop shadow) is reported separately through contentPadding and is NOT included in width/height/center, so toggling a shadow never moves selection handles, guidelines or the rotation pivot.

    Coordinate contract:

    • position is the clip's anchor point (style.getPosition() semantics) and is the pivot that rotation (and any scale-from-anchor transform) happens around — NOT center. They coincide for all clip types with anchor (0.5, 0.5); do not rely on that.
    • anchor is normalized (0..1): where position sits inside the box. (0.5, 0.5) for most clips, (0.5, 1.0) for subtitles (bottom-center).
    • center is the geometry-box center, for layout, guidelines and snapping: center = [position[0] + (0.5 − anchor[0]) × width, position[1] + (0.5 − anchor[1]) × height].

    Deriving the unrotated box: topLeft = [position[0] − anchor[0] × width, position[1] − anchor[1] × height] Corners are then rotated around position (the anchor point) — NOT around the box center — by rotation.

    Deriving the visual (padding-inclusive) box when contentPadding is present: expand each side of the geometry box by its padding; that box's center is center + [(pad.right − pad.left) / 2, (pad.bottom − pad.top) / 2].

    Freshness contract: the returned values are derived from the clip's logical style state, which style setters update synchronously — reading immediately after setScale/setWordWrapWidth/etc. reflects the change.

    interface ClipBoundingInfo {
        anchor: [number, number];
        center: [number, number];
        contentPadding?: {
            bottom: number;
            left: number;
            right: number;
            top: number;
        };
        height: number;
        position: [number, number];
        rotation: number;
        width: number;
        zIndex: number;
    }
    Index

    Properties

    anchor: [number, number]

    Normalized (0..1) location of position inside the box.

    center: [number, number]

    Geometry-box center in composition space (excludes contentPadding).

    contentPadding?: { bottom: number; left: number; right: number; top: number }

    Per-side visual extent beyond the geometry box (e.g. shape stroke/shadow), composition pixels.

    height: number

    Unrotated geometry-box height in composition pixels (always ≥ 0).

    position: [number, number]

    The clip's anchor point in composition space — the rotation/scale pivot.

    rotation: number

    Rotation in radians, applied around position.

    width: number

    Unrotated geometry-box width in composition pixels (always ≥ 0).

    zIndex: number

    Visual stacking order among concurrently visible clips: the stage-level z-index of the clip's rendering container (its layer, kept in sync with the timeline layer order; the subtitles container always stacks above all layers). Comparable across clips.

    Note this is NOT the clip's own style.getZIndex() — that value only orders clips within one layer, and clips on a layer never overlap in time, so it is meaningless for host stacking. Read it from the style directly if you need the serialized value.