I want to make rounded corner, but i don’t have any idea how do it. I try with cubicTo, arcTo ect.
My current shape
my code to draw this
fun Path.customHexagon(radius: Float, size: Size) {
val triangleHeight = (sqrt(3.0) * radius / 2)
val centerX = size.width / 2
val centerY = size.height / 2
moveTo(centerX, centerY + radius)
lineTo((centerX - triangleHeight).toFloat(), centerY + radius/2)
lineTo((centerX - triangleHeight).toFloat(), centerY - radius/2)
lineTo(centerX, centerY - radius)
lineTo((centerX + triangleHeight).toFloat(), centerY - radius/2)
lineTo((centerX + triangleHeight).toFloat(), centerY + radius/2)
close()
}
Maybe you know any android/kotlin library with hexagon shapes?
Help with code or link to library with android shapes