-
public final class DrawableExtKt
-
-
Method Summary
-
-
Method Detail
-
toBitmap
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) final static Bitmap toBitmap(Drawable $self, @Px() Integer width, @Px() Integer height, Bitmap.Config config)
Taken from android ktx library [androidx.core.graphics.drawable|.
Return a Bitmap representation of this Drawable.
If this instance is a BitmapDrawable and the width, height, and config match, the underlying Bitmap instance will be returned directly. If any of those three properties differ then a new Bitmap is created. For all other Drawable types, a new Bitmap is created.
- Parameters:
width- Width of the desired bitmap.height- Height of the desired bitmap.config- Bitmap config of the desired bitmap.
-
-
-
-