Function
Android
public fun CurvedModifier.size(
    @FloatRange(from = 0.0, to = 360.0) sweepDegrees: Float,
    thickness: Dp,
): CurvedModifier

Specify the dimensions (sweep and thickness) for the content.

Parameters

sweepDegrees Indicates the sweep (angular size) of the content.
thickness Indicates the thickness (radial size) of the content.

Code Examples

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),
        )
    }
}