Package-level declarations

Types

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

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

Link copied to clipboard

Crop to an explicit rectangle.

Link copied to clipboard
class Flip(val axis: FlipAxis) : EffectSpec

Mirror the frame across an axis.

Link copied to clipboard
class KenBurns(val from: NormalizedRect, val to: NormalizedRect, val easing: Easing = Easing.EaseInOut) : EffectSpec

Pan and zoom across the frame over the clip's span.

Link copied to clipboard
class Rotate(val degrees: Int) : EffectSpec

Rotate the frame, counter-clockwise.

Link copied to clipboard
class Scale(val heightPx: Int, val fit: Fit = Fit.Contain) : EffectSpec

Set the output height in pixels. The width follows from the composition's aspect.

Functions

Link copied to clipboard
fun NormalizedRect.applyTo(inputSize: Size): Size

Applies this rectangle to inputSize.

Link copied to clipboard

Crop to an explicit rect, expressed in the frame rotation produced.

fun EffectsBuilder.crop(aspect: AspectRatio, fit: Fit = Fit.Crop, anchor: Anchor = Anchor.Center): EffectsBuilder

Reframe to aspect, keeping the region around anchor.

Link copied to clipboard

Mirror across axis.

Link copied to clipboard
fun EffectsBuilder.kenBurns(from: NormalizedRect, to: NormalizedRect, easing: Easing = Easing.EaseInOut): EffectsBuilder

Pan and zoom from from to to over the clip's span.

Link copied to clipboard

Computes the region this pan shows at time, as a fraction of the frame entering it.

Link copied to clipboard

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

Link copied to clipboard

Rotate counter-clockwise by degrees, baked into the pixels.

Link copied to clipboard
fun EffectsBuilder.scale(heightPx: Int, fit: Fit = Fit.Contain): EffectsBuilder

Scale the output to heightPx pixels tall.