-
-
Save KatieBarnett/de6c56474b7d0e1ec8c7190cf99c4784 to your computer and use it in GitHub Desktop.
Zig Zag baseline
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
val zigZagPath = remember { | |
with(density) { | |
Path().apply { | |
val zigZagWidth = shapeWidth.toPx() | |
val zigZagHeight = shapeWidth.toPx() | |
val zigZagLineWidth = (1.dp).toPx() | |
moveTo(0f, 0f) | |
lineTo(zigZagWidth / 2, zigZagHeight) | |
lineTo(zigZagWidth, 0f) | |
lineTo(zigZagWidth, 0f + zigZagLineWidth) | |
lineTo(zigZagWidth / 2, zigZagHeight + zigZagLineWidth) | |
lineTo(0f, 0f + zigZagLineWidth) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment