Compose drawArc 再次理解

75 阅读1分钟
drawArc(
    color = Color(0xFF5A73FF),
    startAngle = 0f,
    sweepAngle = 360f,
    useCenter = true,
    topLeft = Offset(0f,size.height - 2 * sHeight)
)

根据 topLeft 跟 size 确定出一个矩形,然后在矩形中绘制椭圆。如果是正方形绘制的就是圆。

image.png