0Pricing
Jetpack Compose Academy · Lesson

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

  1. The Image Composable
  2. Material Icons with Icon
  3. ContentScale & Cropping
  4. Clip & Shape Your Images
← Back to Jetpack Compose Academy