getTexture

fun getTexture(resId: Int, strokeColor: Int, backgroundColor: Int, foregroundColor: Int, callback: (Bitmap) -> Unit)

Get Drawable from resource ID

Description:

  • Search for a resource

Since

2.0

mMapController.getTexture(R.drawable.vme_marker_position, R.color.vme_color_primary, R.color.vme_color_primary_transparent, R.color.vme_text_color_primary ) { result ->
// result is a bitmap
}

Parameters

resId

The resource ID

strokeColor

The stroke color which will replace red in resource

backgroundColor

The background color which will replace blue in resource

foregroundColor

The foreground color which will replace green in resource

callback

The callback that will be called after finding and replacing color