guix
guix copied to clipboard
The circle of the needle of circular gauge is not fixed when needle rotates
It can be reproduced by the official example demo_guix_widget_types.
When we change the gauge value, the needle rotates. But we can see that the circle of needle shifts a bit both vertically and horizontally along with the angle change.

Please make sure the property "Needle Xcor" and "Needle Ycor" are set properly.

"Needle Xcor" is the distance from the left of the needle image to the center of rotation of the gauge needle. "Needle Ycor" is the distance from the top of the needle image to the center of rotation of the gauge needle. Please reference the documentation about GX_CIRCULAR_GAUGE_INFO. https://docs.microsoft.com/en-us/azure/rtos/guix/appendix-i#gx_circular_gauge_info
Hi, Ting
Thanks for the quick reply.
I set exactly same params as you, but the shift can still be seen. It's very little shift, looks like just 1 pixel. But we're making a smart watch, and we use it for a second needle of a watch face. The second needle keeps rotating, so the shifts is observable by users.


GUIX supports integer numbers only for the Needle Xcor and Ycor. The specified Xcor and Ycor are not exactly the center of the circle(half pixel error). That may cause drifting when rotating. My recommendation is to change the needle image so that the actual coordinates of the circle center are integer numbers.
Hello @WeizhongFan,
Can you make the change suggested and does this fix the issue? I need to know if we can close the issue or if we need to add a task to our backlog to investigate sub-pixel coordinates.