Clip & Shape Your Images
Round corners and make circular avatars.
Beyond the Rectangle
Images draw as plain rectangles by default. To get rounded corners or circular avatars, you clip them to a shape.
Modifier.clip Cuts the Shape
The Modifier.clip function masks a composable to a given shape. Anything outside that shape simply is not drawn.
Image(painter = p, contentDescription = null,
modifier = Modifier.clip(CircleShape))All lessons in this course
- The Image Composable
- Material Icons with Icon
- ContentScale & Cropping
- Clip & Shape Your Images