Package 

Class CircleCropTransformation

  • All Implemented Interfaces:
    coil.transform.Transformation

    
    public final class CircleCropTransformation
     implements Transformation
                        

    A Transformation that crops an image using a centered circle as the mask.

    If you're using Jetpack Compose, use Modifier.clip(CircleShape) instead of this transformation as it's more efficient.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final String cacheKey
    • Method Summary

      Modifier and Type Method Description
      String getCacheKey() The unique cache key for this transformation.
      Bitmap transform(Bitmap input, Size size) Apply the transformation to input and return the transformed Bitmap.
      Boolean equals(Object other)
      <ERROR CLASS> hashCode()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CircleCropTransformation

        CircleCropTransformation()
    • Method Detail

      • getCacheKey

         String getCacheKey()

        The unique cache key for this transformation.

        The key is added to the image request's memory cache key and should contain any params that are part of this transformation (e.g. size, scale, color, radius, etc.).

      • transform

         Bitmap transform(Bitmap input, Size size)

        Apply the transformation to input and return the transformed Bitmap.

        Parameters:
        input - The input Bitmap to transform.
        size - The size of the image request.