Function placement

Source
pub fn placement(
    project: &Project,
    clip: &Clip,
    t: f64,
    native: (u32, u32),
    cw: u32,
    ch: u32,
    contain: bool,
) -> Placement
Expand description

Placement of a clip’s layer on a (cw, ch) canvas at timeline time t. native = the layer image size. With contain (video/images) the image is first fitted inside the canvas preserving aspect; text is already rendered at canvas scale so contain = false. Then: scale about the centre by clip.scale, offset by (clip.x, clip.y) project pixels (scaled to canvas), rotate by clip.rotation.