How to align rectangles in draw with roboflow in app mobile?

I’m trying to implement a feature to detect manga bubble speech.

I’m taking a screenshot of my device and receiving the response from the API, and as soon as it returns, I draw some rectangles with canvas. But I can’t seem to align these rectangles in any way.

Since I saw that you have used it before, I think you would know what my problem is. Could you help me?

My Code:

internal fun ScreenShotDrawSpeech(
    bubbleDomain: BubbleDomain,
    modifier: Modifier = Modifier,
) {
        modifier = modifier
        onDraw = {
            bubbleDomain.predictions.forEach { prediction ->
                val left = prediction.x
                val top = prediction.y

                    color = Color.Red,
                    topLeft = Offset(left.toFloat(), top.toFloat()),
                    size = Size(prediction.width.toFloat(), prediction.height.toFloat()),
                    style = Stroke(width = 2f),