Nat Strangerweather
03/18/2021, 4:54 PMNat Strangerweather
03/18/2021, 4:55 PMCanvas(modifier = Modifier
.fillMaxWidth()
.height(400.dp)
.clipToBounds(),
onDraw = {
drawRect(Color.Blue)
val paint = Paint()
wordsAndColors.forEach { (word, color) ->
paint.textAlign = Paint.Align.CENTER
paint.textSize = 64f
paint.color = color.toArgb()
drawContext.canvas.nativeCanvas.drawText(
word,
center.x, center.y, paint
)
}
}
)
And if so, how can I avoid words overlapping each other in the center of the canvas?Denis
03/18/2021, 6:06 PMTextDelegate
(search this channel)Nat Strangerweather
03/18/2021, 6:09 PMNat Strangerweather
03/18/2021, 7:55 PM