(Draw)Image used to have `tint` parameter, which i...
# compose
z
(Draw)Image used to have
tint
parameter, which is gone now. I see
colorFilter
which needs a
BlendMode
beyond just passing the color. Looking at the possible values,
hue
is the one I guess I should use (commented "The effect is to tint the destination image with the source image."). To my disappointment this is how it looks:
Copy code
hue(null), // Not Supported
Is there any other suitable replacement to achieve tinting the image?
l
From a colleague:
ColorFilter.tint
We needed to make this API a bit more generic to consume a wider range of values for applying ColorFilter parameters so what was previously
Copy code
Image(image, tint = Color.Red)
is now
Copy code
Image(image, colorFilter = ColorFilter.tint(Color.Red))
z
Thanks! I can't seem to find ColorFilter.tint, was it released with dev07?
l
looks like it just missed the cut. It is just shorthand for
ColorFilter(color, BlendMode.srcIn)
though