Created
June 14, 2022 09:06
-
-
Save aqua30/163e329499b39574ec7884acba766a91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** drawing the path */ | |
val stroke = Path().apply { | |
reset() | |
moveTo(coordinates.first().x, coordinates.first().y) | |
for (i in 0 until coordinates.size - 1) { | |
cubicTo( | |
controlPoints1[i].x,controlPoints1[i].y, | |
controlPoints2[i].x,controlPoints2[i].y, | |
coordinates[i + 1].x,coordinates[i + 1].y | |
) | |
} | |
} | |
drawPath( | |
stroke, | |
color = Color.Black, | |
style = Stroke( | |
width = 5f, | |
cap = StrokeCap.Round | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment