Last active
September 11, 2023 19:48
-
-
Save zurche/7db5e375b28ba704cc49b0b1f2bc35d5 to your computer and use it in GitHub Desktop.
Line Drawing
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
Canvas( | |
modifier = Modifier | |
.fillMaxHeight() | |
.weight(1f), | |
onDraw = { | |
val fromPoint = Offset(x = 0f, y = size.height) | |
val toPoint = Offset(x = size.width, y = 0f) | |
drawLine( | |
color = lineColor, | |
start = fromPoint, | |
end = toPoint, | |
strokeWidth = 3f | |
) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment