I would like to rotate long image representing hand of a clock. I have following code:
val hand = Image(handBitmap).apply {
scaledHeight = 50.0
scaledWidth = 400.0
anchor(.0, 0.5)
addUpdater {
rotation = Angle.fromDegrees( rotation.degrees + 1)
}
}
I expected result like on this image:
but I got this:
What should I change to achieve a hand of clock like effect?
The problem looked more like this:
o
|
o------- -------o
|
o
It occurs when I set scaledHeight and scaledWidth.
Finally setting scale(1.0) helped.