TimelineRuler

fun TimelineRuler(scale: TimelineScale, modifier: Modifier = Modifier, scrollPx: () -> Float = { 0f }, height: Dp = FilmstripTimelineDefaults.RulerHeight, colors: TimelineColors = FilmstripTimelineDefaults.Palette, minTickSpacing: Dp = FilmstripTimelineDefaults.MinTickSpacing, label: (time: Duration, interval: Duration) -> String = FilmstripTimelineDefaults::clockLabel)(source)

Tick marks and time labels above the strip.

The tick unit follows the zoom rather than being fixed, so the labels stay a readable distance apart whether the whole source is on screen or a fraction of a second is. Scroll is read while drawing, so a scrolling timeline redraws the ruler without recomposing it.

Parameters

scale

What the ticks are laid out against.

modifier

Modifier for the ruler.

scrollPx

How far the timeline has scrolled, in content pixels.

height

How tall the ruler is drawn.

colors

What the ruler paints with.

minTickSpacing

How close two ticks may be drawn before a coarser unit is chosen.

label

What each tick says.