You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at supporting basic rotation of images on a canvas via the rotation parameter of an image service request and roughly using the way this works in the atlas world object as my guide.
While I'm able to provide a rotation value in CanvasPanel via a prop that will renders an image with the appropriate degree of rotation (*currently only concerned with increments of 90), the piece of this that I'm unsure of and feel like I'm missing is exactly where to capture that rotation value from the image service param so that it can be passed through to the world object. Is this something that should/could be handled in the rendering strategy in react-iiif-vault or does it potentially already exist elsewhere that I'm overlooking?
The text was updated successfully, but these errors were encountered:
So it's a property of the selector itself. However, the order that its applied isn't handled anywhere yet. Manifest editor did have an implementation that applied the rotation before positioning. So a 100x200 box that's been rotated 90deg was expected to have a target of 200x100 (again - this turned out to be wrong!).
Atlas allows you to rotate an object similar to how you can rotate an DOM element, it doesn't change it's position, just rotates around it's center. However, according to the specification, it needs to rotate but still fit inside the target (with the associated maths).
So a path to full rotation support:
Extracting the rotation, similar to the cropping
Adding rotation to the BoxSelector when parsing
Adding rotation to the ImageStrategy (placeholder in the types now)
Code for calculating an Atlas compatible translation + rotation (scaling down + translating from a BoxSelector + Rotation)
Changing the draw calls to use these new parameters
Looking at supporting basic rotation of images on a canvas via the rotation parameter of an image service request and roughly using the way this works in the atlas world object as my guide.
While I'm able to provide a rotation value in CanvasPanel via a prop that will renders an image with the appropriate degree of rotation (*currently only concerned with increments of 90), the piece of this that I'm unsure of and feel like I'm missing is exactly where to capture that rotation value from the image service param so that it can be passed through to the world object. Is this something that should/could be handled in the rendering strategy in react-iiif-vault or does it potentially already exist elsewhere that I'm overlooking?
The text was updated successfully, but these errors were encountered: