-
-
Save StephenVinouze/7465b3956b6d5c2ec253f35d7ac236b4 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
private fun DrawScope.drawSegment(coordinates: SegmentCoordinates, color: SegmentColor) { | |
val path = Path().apply { | |
reset() | |
moveTo(coordinates.topLeftX, 0f) | |
lineTo(coordinates.topRightX, 0f) | |
lineTo(coordinates.bottomRightX, size.height) | |
lineTo(coordinates.bottomLeftX, size.height) | |
close() | |
} | |
drawPath( | |
path = path, | |
color = color.color, | |
alpha = color.alpha, | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment