Copy link to clipboard
Copied
How to get the Selected Items X, Y position with middle value in adobe xd
<The Title was renamed by moderator>
> (x + w/2, y + h/2) this formula not working for rotated objects.
For rotated objects you would use the formula something like:
CentreX = X + (W/2 * cos(Rotation * pi/180)) - (H/2 * sin(Rotation * pi/180))
CenterY = Y - (W/2 * sin(Rotation * pi/180)) + (H/2 * cos(Rotation * pi/180))
Copy link to clipboard
Copied
Can you post a screenshot what you want to achive? Thank you
Copy link to clipboard
Copied
Thanks, Aras
For your reply, here is the screenshot.
Copy link to clipboard
Copied
You cannot change the registration point of objects in XD. When you code a website or an app, the coordination of an object is always based on the top left corner, so it's logical. You can calculate it through, i.e. (x + w/2, y + h/2)
Copy link to clipboard
Copied
Thanks a lot!
Copy link to clipboard
Copied
hello, Kennethkawamoto2
(x + w/2, y + h/2) this formula not working for rotated objects.
Copy link to clipboard
Copied
> (x + w/2, y + h/2) this formula not working for rotated objects.
For rotated objects you would use the formula something like:
CentreX = X + (W/2 * cos(Rotation * pi/180)) - (H/2 * sin(Rotation * pi/180))
CenterY = Y - (W/2 * sin(Rotation * pi/180)) + (H/2 * cos(Rotation * pi/180))