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
@Emile
Value is a variabile that changes clickin’ and dragging the mouse. The issue is not in the “value” var… It increases correctly.
@Dave
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