Skip to content

Instantly share code, notes, and snippets.

@zurche
Last active September 11, 2023 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zurche/7db5e375b28ba704cc49b0b1f2bc35d5 to your computer and use it in GitHub Desktop.
Save zurche/7db5e375b28ba704cc49b0b1f2bc35d5 to your computer and use it in GitHub Desktop.
Line Drawing
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