Have a question still about drawBehind, how can I ...
# compose-desktop
s
Have a question still about drawBehind, how can I get the same result but draw on top of some content? It seems like when I use Canvas by itself it puts it after the text, but I don't want it to be behind either. I just want directly over the cross but on top
Copy code
Box {
    Text(
        modifier = if (isVisible.value) Modifier.drawBehind {
            drawCircle(Color.Black, radius = 10f)
        } else Modifier,
        text = text.value,
        color = Color.Gray,
        fontSize = 30.sp
    )
}
androidx.compose.foundation.Canvas(modifier = Modifier.fillMaxSize(), onDraw = {drawCircle(color = Color.Black, radius = 10f)})
d
Take a look at
Modifier.drawWithContent {  }
.
s
Thanks @Dominaezzz, yeah we are making progress, little by little starting to look like a real board lol