app / sg.edu.ntu.scse.cz2006.gymbuddies.util / ProfilePicHelper / getBitmap

getBitmap

@JvmStatic private fun getBitmap(vectorDrawable: VectorDrawable): Bitmap

Internal method to generate a bitmap from a vectorDrawable

Parameters

vectorDrawable - VectorDrawable Vector Drawable object

Return
Bitmap The generated bitmap

@JvmStatic private fun getBitmap(vectorDrawable: VectorDrawableCompat): Bitmap

Internal method to generate a bitmap from a vectorDrawable

Parameters

vectorDrawable - VectorDrawableCompat Vector Drawable object that is compatible with AppCompat

Return
Bitmap The generated bitmap

@JvmStatic fun getBitmap(context: Context, @DrawableRes drawableResId: Int): Bitmap

Generates a bitmap from a drawableResId in the app drawable folder. Requires an application context to use

Parameters

context - Context Application Context

drawableResId - Int Resource ID for the drawable to generate the bitmap of

Return
Bitmap The generated bitmap