Here's my code on codesandbox, https://codesandbox.io/p/sandbox/adoring-shamir-7q32w7?file=%2Fsrc%2FApp.tsx%3A79%2C26
I'm trying to center an image on canvas after rotating the image.
It places image to image's initial top-left x,y position.
so If the image is rotated, it doesn't come to the center anymore.
If there's any workaround, please share. Thanks.
This should work:
https://codesandbox.io/p/sandbox/recursing-margulis-txffh9?file=%2Fsrc%2FApp.tsx%3A66%2C3-78%2C4