Skip to content

Instantly share code, notes, and snippets.

@akexorcist
Last active January 28, 2021 07:32
Show Gist options
  • Save akexorcist/d4202a722ba27415120410e8f791adcd to your computer and use it in GitHub Desktop.
Save akexorcist/d4202a722ba27415120410e8f791adcd to your computer and use it in GitHub Desktop.
val canvas: Canvas = /* ... */
val areaWidth = canvas.width
val areaHeight = canvas.height
val borderWidth = 2
val cornerRadius = 10
val semiCircleRadius = 20
val path = Path().apply {
/* ... */
moveTo(
x = areaWidth - (cornerRadius + (borderWidth / 2f)),
y = borderWidth / 2f
)
/* ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment