Dovydas
01/23/2025, 1:11 PMBox(
modifier = Modifier
.drawWithCache {
val roundedPolygon = RoundedPolygon(
numVertices = 6,
radius = size.minDimension / 2,
centerX = size.width / 2,
centerY = size.height / 2
)
val roundedPolygonPath = roundedPolygon.toPath().asComposePath()
onDrawBehind {
drawPath(roundedPolygonPath, color = Color.Blue)
}
}
.fillMaxSize()
)
Using the above example, in compose multiplatform code, the toPath() function doesn't exits, but in android it does. Is there some way to convert a polygon to a Path in compose multiplatform?