interface MultiAspectCarouselScope
A scope containing all methods used to create a multi-aspect carousel from a androidx.compose.foundation.lazy.LazyRow or androidx.compose.foundation.lazy.LazyColumn.
For each item in a lazy list, remember a MultiAspectCarouselItemDrawInfo using and then modify items with maskClip to create a parallax masking effect as items enter and exit the scrolling container.
Functions
maskClip
@ExperimentalMaterial3Api
fun Modifier.maskClip(
shape: Shape,
multiAspectItemDrawInfo: MultiAspectCarouselItemDrawInfo,
): Modifier
Clip and parallax a composable item in a LazyLayout to the given shape according to mask and parallax values from multiAspectItemDrawInfo.
Parameters
| shape | the shape to be applied to the composable |
| multiAspectItemDrawInfo | The draw info whose details will be used for the shape's bounds in the main axis and the parallax effect |
maskBorder
@ExperimentalMaterial3Api
@Composable
fun Modifier.maskBorder(
border: BorderStroke,
shape: Shape,
multiAspectItemDrawInfo: MultiAspectCarouselItemDrawInfo,
): Modifier
Draw a border on a composable item in a LazyLayout using the given shape according to the mask values from multiAspectItemDrawInfo.
Apply maskBorder before maskClip to avoid clipping the border.
Parameters
| border | the border to be drawn around the composable |
| shape | the shape of the border |
| multiAspectItemDrawInfo | the draw info whose details will be used for the shape's bounds in the main axis |