compose-audiowaveform icon indicating copy to clipboard operation
compose-audiowaveform copied to clipboard

Wrong behavior when using an alpha color

Open Jhiertz opened this issue 1 year ago • 2 comments

Hi, thank you for this compose library

I've got an issue when using a colour with an alpha in waveformBrush, the alpha is also carried over to the progressBrush.

A small example to reproduce:

var waveformProgress by remember { mutableStateOf(0F) }

AudioWaveform(
    amplitudes = amplitude,
    waveformBrush = SolidColor(Color.White.copy(alpha = .5f)),
    progressBrush = SolidColor(Color.Red),
    amplitudeType = AmplitudeType.Max,
    progress = waveformProgress,
    onProgressChange = { waveformProgress = it }
)

And here is the actual rendering, the red does not match, it also has the alpha channel

image

Jhiertz avatar Apr 27 '23 08:04 Jhiertz

is there any updates on those bugs?

IbrahimEzzatSaad avatar Apr 28 '24 11:04 IbrahimEzzatSaad