Created
February 23, 2023 22:19
-
-
Save Kpeved/1e87413e8a3ac02558eb2ec4364ec781 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
| Spacer( | |
| ... | |
| .drawBehind { | |
| ... | |
| hours.forEach { | |
| if (!dotsVisibility[it]) return@forEach | |
| val degree = it * 30f | |
| rotate(degree) { | |
| // Based on the hour value, the travel distance will be longer. | |
| val positionY = halfStroke + | |
| stepHeight * it * (1 - disassembleAnimations[it].value) | |
| val start = Offset(size.width / 2, positionY - halfStroke) | |
| val end = Offset(size.width / 2, positionY + halfStroke) | |
| drawLine( | |
| color = Color.White, | |
| start = start, | |
| end = end, | |
| strokeWidth = strokeWidth, | |
| ) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment