Created
February 23, 2023 20:59
-
-
Save Kpeved/2b75918d2f2b901c1ae6e66b1ba9e761 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
Spacer( | |
... | |
.drawBehind { | |
… | |
// A rotation section of a clock hand | |
rotate(animationAngle, pivot = center){ | |
// Drawing a clock hand itself | |
drawLine( | |
color = Color.White, | |
start = center, | |
end = endOffset, | |
strokeWidth = strokeWidth, | |
) | |
// Drawing a clock hand | |
if (assembleValue != -1f) { | |
val positionY = halfStroke + | |
calculateAssembleDistance(stepHeight, currentHour) * | |
assembleValue | |
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