https://kotlinlang.org logo
#compose
Title
# compose
a

AmrJyniat

01/24/2023, 8:03 AM
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

Rafs

01/24/2023, 9:28 AM
You can create a
Rect
object with
topLeft
and
bottomRight
and call
drawRect
with
Rect.topLeft
and
Rect.size
a

AmrJyniat

01/24/2023, 10:18 AM
Thank you!
4 Views