KaraokeLineText

fun KaraokeLineText(line: ERROR CLASS: Symbol not found for KaraokeLine, currentTimeProvider: () -> Int, modifier: ERROR CLASS: Symbol not found for Modifier = Modifier, normalLineTextStyle: ERROR CLASS: Symbol not found for TextStyle = LocalTextStyle.current, accompanimentLineTextStyle: ERROR CLASS: Symbol not found for TextStyle = LocalTextStyle.current, activeColor: ERROR CLASS: Symbol not found for Color = Color.White, blendMode: ERROR CLASS: Symbol not found for BlendMode = BlendMode.SrcOver, showDebugRectangles: Boolean = false, precalculatedLayouts: List<SyllableLayout>? = null, isDuoView: Boolean = false, textMeasurer: ERROR CLASS: Symbol not found for TextMeasurer = rememberTextMeasurer(), fontResource: ERROR CLASS: Symbol not found for FontResource?? = null, sharedNativeEngine: NativeTextEngine? = null, sharedAtlasManager: SdfAtlasManager? = null)

Renders a single karaoke line, capable of handling multi-row wrapping.

This composable pre-calculates the text layout using NativeTextEngine and then renders the frames using an efficient Canvas drawing strategy. It handles:

  • Text measurement and line breaking

  • Syllable and character-level animations (bounce, rise, swell)

  • Karaoke fill gradient application

Parameters

line

The karaoke line data.

currentTimeProvider

Provider for the current playback time.

modifier

Modifier for the layout.

normalLineTextStyle

Style for normal lines.

accompanimentLineTextStyle

Style for accompaniment lines.

activeColor

Color for the active (sung) portion of text.

blendMode

Blend mode for drawing.

showDebugRectangles

Debug flag for layout bounds.

precalculatedLayouts

Optional pre-calculated layouts (optimization).

isDuoView

Whether this line is part of a duet view.

textMeasurer

Text measurer for layout (default provided).

fontResource

Optional font resource for the native engine.

sharedNativeEngine

Optional shared native engine instance.

sharedAtlasManager

Optional shared atlas manager instance.