Package com.example.qrgo.utilities
Class CircleTransform
- java.lang.Object
-
- com.example.qrgo.utilities.CircleTransform
-
- All Implemented Interfaces:
com.squareup.picasso.Transformation
public class CircleTransform extends java.lang.Object implements com.squareup.picasso.Transformation
A class that transforms a Bitmap into a circular image by cropping and drawing it as a circle.
-
-
Constructor Summary
Constructors Constructor Description CircleTransform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
key()
Returns a unique key for this transformation.android.graphics.Bitmap
transform(android.graphics.Bitmap source)
Transforms the source Bitmap into a circular image by cropping and drawing it as a circle.
-
-
-
Method Detail
-
transform
public android.graphics.Bitmap transform(android.graphics.Bitmap source)
Transforms the source Bitmap into a circular image by cropping and drawing it as a circle.- Specified by:
transform
in interfacecom.squareup.picasso.Transformation
- Parameters:
source
- the Bitmap to be transformed into a circular image- Returns:
- the transformed Bitmap
-
key
public java.lang.String key()
Returns a unique key for this transformation.- Specified by:
key
in interfacecom.squareup.picasso.Transformation
- Returns:
- a String representing the key of this transformation
-
-