I'm trying to draw squares on an Image via `drawWi...
# compose
a
I'm trying to draw squares on an Image via
drawWithContent
modifier, and I have 4 positions values(topLeft, topRight, bottomLeft, bottomRight) for each square, but I don't find the function that takes these parameters, how I can draw a square with these values?
r
You can create a
Rect
object with
topLeft
and
bottomRight
and call
drawRect
with
Rect.topLeft
and
Rect.size
a
Thank you!