Object2D.Rotation - Not in axis

Hi there, there’s my very fiirst post. I have been using Realbasic for work, in the last two years. Now I’m using Xojo and that’s my first issue:
I’m trying to create a torative knob (50x50) using the function Object2D.Rotation on a PixmapShape.
The issue is that when the picture rotate the rotation is not in axis.
Here’s the code:

Dim px as PixmapShape
Dim p as new Picture (knob.Width, knob.Height, 32)
p = knob

px = New PixmapShape§
px.Rotation = Value
g.DrawObject px,25,25

Any solution?

Value is undefined. Can you give us a number for the rotation ?

Remember: Rotation is in Radian

PixmapShape.Rotation Clockwise rotation, in radians, around the X, Y point.

Have you even experimented? Determined what point it WAS rotating around?

I believe it rotates around the CENTER point of the 2D object… that CENTER point is 25,25

the coordinates you provide in the DrawObject are an offset… so you are rotating around 50,50

Try 0,0

Value is a variabile that changes clickin’ and dragging the mouse. The issue is not in the “value” var… It increases correctly.

Actually my knob prototype is a perfect circle. Its sizes are 50x50. As you wrote the coordinates (25,25) are an offset, and they allow me to draw my picture in the center of a canvas (50x50). The rotation center is not 50,50, it’s really close to the image center (25,25) but it’s not perfectly overlapped