Jonny
02/05/2023, 12:38 AMvar outerRadius by remember {
mutableStateOf(0f)
}
before the code that calculates the shapes, and then setting
outerRadius = min(size.width, size.height) / 2
at the start of the draw call. This works in app but the previews in Android will show the canvas as empty, which is annoying.
The shape calculation happens before the canvas like this
val shapes by remember(indicatorCount, gapAng, outerRadius) {
// trigonometry etc
}
romainguy
02/05/2023, 12:47 AMJonny
02/05/2023, 12:56 AM