CircularReveal

data class CircularReveal(highlightColor: Color, val animationSpec: InfiniteRepeatableSpec<Float>) : PlaceholderHighlight

A PlaceholderHighlight that draws a circular reveal effect.

This highlight originates from the center of the placeholder, expanding outwards in a circular ripple.

Parameters

highlightColor

The color of the reveal circle.

animationSpec

The specification for the animation.

Constructors

Link copied to clipboard
constructor(highlightColor: Color, animationSpec: InfiniteRepeatableSpec<Float>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun alpha(@FloatRange(from = 0.0, to = 1.0) progress: Float): Float

The alpha of the entire highlight can also fade out as it expands. This implementation fades out in the second half of the animation.

Link copied to clipboard
open override fun brush(@FloatRange(from = 0.0, to = 1.0) progress: Float, size: Size): Brush

Returns the brush to draw the highlight at the current animation progress.