Crop

class Crop(val aspect: AspectRatio, val fit: Fit = Fit.Crop, val anchor: Anchor = Anchor.Center) : EffectSpec(source)

Reframe to an aspect ratio, keeping the region around anchor.

Constructors

Link copied to clipboard
constructor(aspect: AspectRatio, fit: Fit = Fit.Crop, anchor: Anchor = Anchor.Center)

Properties

Link copied to clipboard

Where the retained region sits when fit is Fit.Crop. Centred by default.

Link copied to clipboard

The target aspect ratio.

Link copied to clipboard
Link copied to clipboard
val fit: Fit

How the frame is fitted to aspect. Fit.Crop cuts the frame down to it. Fit.Contain and Fit.Stretch make a canvas of aspect and letterbox or stretch the frame into it, and every effect after this one runs on that canvas, bars included.

Link copied to clipboard
open override val id: String
Link copied to clipboard
open val isInert: Boolean
Link copied to clipboard
Link copied to clipboard
open val scope: EffectScope
Link copied to clipboard
open override val stage: EffectStage

Functions

Link copied to clipboard

Computes the region this crop keeps, as a fraction of the frame entering it.