[Compose] Make clipToCompositionBounds API consistent
@@ -65,7 +65,7 @@ import kotlin.math.roundToInt
* @param alignment Define where the animation should be placed within this composable if it has a different
* size than this composable.
* @param contentScale Define how the animation should be scaled if it has a different size than this Composable.
- * @param clipToComposition Determines whether or not Lottie will clip the animation to the original animation composition bounds.
+ * @param clipToCompositionBounds Determines whether or not Lottie will clip the animation to the original animation composition bounds.
*/
@Composable
fun LottieAnimation(
@@ -80,7 +80,7 @@ fun LottieAnimation(
dynamicProperties: LottieDynamicProperties? = null,
alignment: Alignment = Alignment.Center,
contentScale: ContentScale = ContentScale.Fit,
- clipToComposition: Boolean = true,
+ clipToCompositionBounds: Boolean = true,
) {
val drawable = remember { LottieDrawable() }
val matrix = remember { Matrix() }
@@ -116,7 +116,7 @@ fun LottieAnimation(
drawable.isApplyingOpacityToLayersEnabled = applyOpacityToLayers
drawable.useSoftwareRendering(useSoftwareRendering)
drawable.maintainOriginalImageBounds = maintainOriginalImageBounds
- drawable.clipToCompositionBounds = clipToComposition
+ drawable.clipToCompositionBounds = clipToCompositionBounds
drawable.progress = progress
drawable.setBounds(0, 0, composition.bounds.width(), composition.bounds.height())
drawable.draw(canvas.nativeCanvas, matrix)
@@ -148,7 +148,7 @@ fun LottieAnimation(
dynamicProperties: LottieDynamicProperties? = null,
alignment: Alignment = Alignment.Center,
contentScale: ContentScale = ContentScale.Fit,
- clipToComposition: Boolean = true,
+ clipToCompositionBounds: Boolean = true,
) {
val progress by animateLottieCompositionAsState(
composition,
@@ -170,7 +170,7 @@ fun LottieAnimation(
dynamicProperties,
alignment,
contentScale,
- clipToComposition,
+ clipToCompositionBounds,
)
}
