mattinger
03/08/2022, 3:36 PMBoxWithConstraints(
        modifier = modifier
            .defaultMinSize(RingDefaultMinSize, RingDefaultMinSize)
            .aspectRatio(RingAspectRatio)
            .padding(RingStrokeWidthOffset),
        contentAlignment = Alignment.Center
    ) {
        Canvas(modifier = Modifier.size(constraints.maxWidth.dp, constraints.maxHeight.dp)) {
            drawArc(
                color = ringColor,
                startAngle = rotation.value,
                sweepAngle = -1f * sweepAngle.value,
                useCenter = false,
                style = Stroke(width = RingStrokeWidth.toPx(), cap = StrokeCap.Round)
            )
        }
    }Zach Klippenstein (he/him) [MOD]
03/08/2022, 4:03 PMModifier.sizedefaultMinSizelayoutBoxWithConstraintsmattinger
03/08/2022, 4:24 PMmattinger
03/08/2022, 4:24 PMCanvas(
        modifier = modifier
            .padding(RingStrokeWidthOffset)
            .size(RingDefaultMinSize, RingDefaultMinSize)
            .aspectRatio(RingAspectRatio)
    ) {
        drawArc(
            color = ringColor,
            startAngle = rotation.value,
            sweepAngle = -1f * sweepAngle.value,
            useCenter = false,
            style = Stroke(width = RingStrokeWidth.toPx(), cap = StrokeCap.Round)
        )
    }mattinger
03/08/2022, 4:25 PMmattinger
03/08/2022, 6:57 PMChris Sinco [G]
03/08/2022, 8:56 PMs it turns out, i looked at CircularProgressIndicator, and setting the size and just having a canvas works the way i want it to.Yes, Canvas has a size variable in the drawScope that you should use to base measurements on (which is based on the constraints passed down to it)