Created
December 9, 2024 11:09
-
-
Save Mohammed-Alhams/ff2022eef4b1faa85c04652107cb3a41 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
fun Arrow() { | |
Canvas( | |
modifier = Modifier | |
.size(400.dp) | |
.padding(16.dp) | |
) { | |
val canvasWidth = size.width //full width of drawing area | |
val canvasHeight = size.height //full height of drawing area | |
val path = Path() | |
path.moveTo(0f, 0f) | |
path.lineTo(canvasWidth / 2f, canvasHeight) | |
path.lineTo(canvasWidth, 0f) | |
path.lineTo(0f, 0f) | |
path.close() | |
drawPath(path = path, color = Color.Red) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment