Are there any docs for text on a canvas? I am usin...
# compose
n
Are there any docs for text on a canvas? I am using
TextDelegate
as kindly suggested here to use text on my canvas. But beyond that I am a little lost and would welcome some examples of how to position words precisely, for instance. Googling is not helping much as yet. 😅
f
I believe the recommended method is to use the nativeCanvas for drawing text at the moment.
Copy code
Canvas(modifier = Modifier.fillMaxSize()) {
    // ...
    drawContext.canvas.nativeCanvas.drawText("text", x, y, Paint())
}
👍 2