Skip to content

Instantly share code, notes, and snippets.

@zurche
Created June 22, 2023 13:09
Show Gist options
  • Save zurche/e02ba452e7c3813fe0cb7560d2f8a61b to your computer and use it in GitHub Desktop.
Save zurche/e02ba452e7c3813fe0cb7560d2f8a61b to your computer and use it in GitHub Desktop.
Circle radius ready
Canvas(modifier = Modifier.size(cardSize), onDraw = {
drawRect(
color = backgroundColor,
topLeft = Offset(x = size.width - (cardSize.value / 2f) - 7.5f, y = 0f),
size = size / 5f
)
drawCircle(
color = bubbleColor,
radius = circleRadius, //<-------- HERE!
center = Offset(
x = size.width - radius + (radius * 0.2f),
y = radius - (radius * 0.2f)
)
)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment