Generalize image rotation code from tesseract
We need to port over the code from tesseract worker here, so that a developer can use it to update the polygon created by its tool according to the parent element rotation.
We need to port over the code from tesseract worker here, so that a developer can use it to update the polygon created by its tool according to the parent element rotation.