Is the toPath() function available in compose mult...
# compose
d
Is the toPath() function available in compose multiplatform?
Copy code
Box(
    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?