julioromano
03/08/2021, 12:53 PMImageBitmap ?Nader Jawad
03/09/2021, 6:53 AMImageBitmap as a parameter to the Image composablejulioromano
03/09/2021, 8:50 AMImageBitmap with the Image Composable.
I use it in an ImageShader.
Perhaps there’s another shader I can use to apply the tint?julioromano
03/09/2021, 9:18 AM@Composable
fun tiledBrush(
@DrawableRes id: Int
): Brush = ShaderBrush(
shader = ImageShader(
image = ImageBitmap.imageResource(
res = LocalContext.current.resources,
id = id
),
tileModeX = TileMode.Repeated,
tileModeY = TileMode.Repeated
)
)julioromano
03/09/2021, 9:18 AMImageBitmap as a part of this BrushNader Jawad
03/09/2021, 5:37 PMDrawScope.draw<x> method accepts an optional ColorFilter parameter. If you just want to apply a simple tint to the call that draws this Brush just add colorFilter = ColorFilter.tint(myTintColor)Nader Jawad
03/09/2021, 5:38 PMdrawRect(brush = tiledBrush(myDrawableResId), colorFilter = ColorFilter.tint(Color.Red)