DrawableTransformation

open class DrawableTransformation : Transformation<T>

Applies a BitmapTransformation to Drawables by first attempting to convert the Drawable to a Bitmap and then running the Transformation on the converted Bitmap.

This class is relatively efficient for BitmapDrawable where the Bitmap is readily accessible. For non-Bitmap based Drawables, this class must first try to draw the Drawable to a Bitmap using android.graphics.Canvas, which is less efficient. Drawables that implement android.graphics.drawable.Animatable will fail with an exception. Drawables that return <= 0 for getIntrinsicHeight and/or getIntrinsicWidth will fail with an exception if the requested size is SIZE_ORIGINAL. Drawables without intrinsic dimensions are drawn using the dimensions provided in transform. As a result, they may be transformed incorrectly or in unexpected ways.

Constructors

Link copied to clipboard
open fun DrawableTransformation(wrapped: Transformation<Bitmap>, isRequired: Boolean)

Functions

Link copied to clipboard
open fun asBitmapDrawable(): Transformation<BitmapDrawable>
Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun transform(    context: Context,     resource: Resource<Drawable>,     outWidth: Int,     outHeight: Int): Resource<Drawable>
Transforms the given resource and returns the transformed resource.
Link copied to clipboard
open fun updateDiskCacheKey(messageDigest: MessageDigest)
Adds all uniquely identifying information to the given digest.

Properties

Link copied to clipboard
val CHARSET: Charset
Link copied to clipboard
val STRING_CHARSET_NAME: String