Package-level declarations

Types

Link copied to clipboard
class CornerInset(val corner: Corner, val margin: Float)

A corner of the frame and how far in from it an overlay sits.

Link copied to clipboard
class ImageOverlay(val image: ImageSource, val corner: Corner, val margin: Float = DEFAULT_MARGIN, val scale: Float = DEFAULT_SCALE, val opacity: Float = 1.0f, val visibleDuring: TimeRange? = null, val animation: OverlayAnimation? = null) : OverlayEffect

Composite an image over the video.

Link copied to clipboard
fun interface OverlayAnimation

How an overlay is drawn at one instant.

Link copied to clipboard

An effect drawn over the frame once geometry has settled.

Link copied to clipboard
class OverlayFrame(val opacity: Float = 1.0f, val offset: OverlayOffset = OverlayOffset.Zero, val scale: Float = 1.0f)

The three things an animation may change about one drawn frame.

Link copied to clipboard
class OverlayOffset(val x: Float, val y: Float)

A displacement from where an overlay would otherwise sit, as a fraction of the frame it is drawn on.

Link copied to clipboard
class OverlayPlacement(val size: Size, val overlayAnchor: Anchor, val frameAnchor: Anchor)

Where a composited overlay lands, in real pixels of the frame it is drawn on.

Link copied to clipboard
class OverlayTime(val elapsed: Duration, val remaining: Duration, val composition: Duration)

Where one frame sits inside the range an overlay is drawn over.

Link copied to clipboard
class TextOverlay(val text: String, val style: TextStyle = TextStyle.Default, val anchor: Anchor = Anchor.BottomCenter, val visibleDuring: TimeRange? = null, val animation: OverlayAnimation? = null) : OverlayEffect

Burn text into the video.

Functions

Link copied to clipboard
fun fade(inDuration: Duration = Duration.ZERO, outDuration: Duration = Duration.ZERO): OverlayAnimation

Fades the overlay in over inDuration and back out over outDuration.

Link copied to clipboard
fun EffectsBuilder.imageOverlay(image: ImageSource, corner: Corner, margin: Float = ImageOverlay.DEFAULT_MARGIN, scale: Float = ImageOverlay.DEFAULT_SCALE, opacity: Float = 1.0f, visibleDuring: TimeRange? = null, animation: OverlayAnimation? = null): EffectsBuilder

Composite image into corner, sized and inset as fractions of the frame it is drawn on.

fun EffectsBuilder.imageOverlay(image: ImageSource, corner: Corner, at: ClosedRange<Duration>, margin: Float = ImageOverlay.DEFAULT_MARGIN, scale: Float = ImageOverlay.DEFAULT_SCALE, opacity: Float = 1.0f, animation: OverlayAnimation? = null): EffectsBuilder

Composite image into corner, visible only during at.

Link copied to clipboard

The corner and margin that bring an image overlay's own corner to this point.

Link copied to clipboard

Resolves this text against the frame it is burned into.

Resolves this overlay against the frame it is composited onto.

Link copied to clipboard

Runs both animations on every frame and merges what they answer.

Link copied to clipboard

Where this placement puts the overlay on frame, as a fraction of it.

Link copied to clipboard

Slides the overlay from from to where it was authored over duration, counted from its first drawn frame.

Link copied to clipboard

Slides the overlay from where it was authored to to over duration, counted back from its last drawn frame.

Link copied to clipboard
fun EffectsBuilder.textOverlay(text: String, style: TextStyle = TextStyle.Default, anchor: Anchor = Anchor.BottomCenter, visibleDuring: TimeRange? = null, animation: OverlayAnimation? = null): EffectsBuilder

Burn text into the video at anchor.

fun EffectsBuilder.textOverlay(text: String, at: ClosedRange<Duration>, style: TextStyle = TextStyle.Default, anchor: Anchor = Anchor.BottomCenter, animation: OverlayAnimation? = null): EffectsBuilder

Burn text into the video, visible only during at.