angularSizeDp
Function
Android
public fun CurvedModifier.angularSizeDp(angularWidth: Dp): CurvedModifier
Specify the sweep (arc length) for the content in Dp. The arc length will be measured at the
center of the item, except for basicCurvedText
, where it will be measured at the text baseline.
Parameters
angularWidth | Indicates the arc length of the content in Dp. |
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),
)
}
}