Specify the sweep (arc length) for the content in Dp.
CurvedFixedSize
@Composable
fun CurvedFixedSize() {
CurvedLayout(modifier = Modifier.fillMaxSize()) {
basicCurvedText(
"45 deg",
style = { CurvedTextStyle(fontSize = 16.sp, color = Color.Black) },
modifier =
CurvedModifier.background(Color.White).size(sweepDegrees = 45f, thickness = 40.dp),
)
basicCurvedText(
"40 dp",
style = { CurvedTextStyle(fontSize = 16.sp, color = Color.Black) },
modifier =
CurvedModifier.background(Color.Yellow).radialSize(40.dp).angularSizeDp(40.dp),
)
}
}