Maik
10/27/2020, 1:23 PMdrawOpacity
enables clipping in addition to the alpha value. From my point of view this seems to be a mistake, because it is not 100% clear from the modifier name or its description.
/**
* Draw content with modified opacity (alpha) that may be less than 1.
*
* Example usage:
* @sample androidx.compose.ui.samples.OpacitySample
*
* @param opacity the fraction of children's alpha value.
*/
@Stable
fun Modifier.drawOpacity(
@FloatRange(from = 0.0, to = 1.0) opacity: Float
) = drawLayer(alpha = opacity, clip = true)
jim
10/27/2020, 1:58 PMtrue
for opacity, but doesn't elaborate, I wonder if this was for performance reasons. cc @George MountAdam Powell
10/27/2020, 3:44 PMNader Jawad
10/27/2020, 6:15 PM