Created
August 11, 2023 14:04
-
-
Save zurche/1ae72a1ceedb10e9b92f35b1218c1adb 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
@Composable | |
@Preview(showBackground = true) | |
fun BezierTest() { | |
Canvas(modifier = Modifier.size(300.dp), onDraw = { | |
val path = Path().apply { | |
val width = size.width // Capturing all the available width | |
val height = size.height // Capturing all the available height | |
// Top left corner | |
// Move the start point to 2% of height for x and 25% of the height for y | |
moveTo(x = height.times(.02f), y = height.times(.25f)) | |
} | |
drawPath(path = path, color = CryptoOrange) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment