Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about rotations #19

Open
talamaska opened this issue Oct 30, 2023 · 1 comment
Open

Questions about rotations #19

talamaska opened this issue Oct 30, 2023 · 1 comment

Comments

@talamaska
Copy link
Contributor

I find the behavior a bit confusing. So to clean the confusions I want to ask some important questions here, and eventually trigger some docs improvement.

Correct me if I'm wrong with these discoveries:

  • transformation rotate - shows a button to rotate the image 90 degrees at a time/tap.
  • rotation bottom bar shows only when rotateZ is included in the allowedTransformationList
  • you can't transform by x and/or y only.
  • rotationZ provides only +- 45 degrees rotation? Why? Shouldn't it be +-180?
  • I'm able to pan and scale with 2 fingers touch gesture, why I'm not able to rotate the image freely again with the gesture/listener detector?

Suggestions:

  • show the bottom bar when any rotationX, rotationY, rotationZ is included in the allowed transformations - I guess I can do that by creating a custom widget?
  • be able to set min max o the rotation scale, accepting rads maybe?
  • be able to rotate the image with fingers
@kekland
Copy link
Owner

kekland commented Nov 6, 2023

Hey, sorry, I was away for a while and I'm back now. About the discoveries:

  • RotateTransformation rotates the whole canvas by 90 degrees.
  • Not too sure, this could've been altered by the addition of x/y rotations. I'll double-check soon
  • Code-wise it's possible, as x/y rotations are Transformation.rotateX/rotateY. It could be a UI issue that's not showing the buttons. Note that on Material cropper there's no x/y rotations as perspective in Google Photos is handled differently
  • rotationZ provides 45 degree angles because you can reach the other angles by using the 90-degree rotations. This is how it's done in iOS's Photos app
  • I need to double-check, but when I was testing I couldn't able to rotate the image like that on my iPad. But this should be pretty simple to add

About the suggestions:

  • Yes, that can be done with a custom widget. I'll think about making this a bit easier though
  • Can be added by extending the controller, but that's a bit cumbersome. I think I'll add a big object with a lot of different parameters to tweak max/min scale, rotation, etc
  • Will think about this. Probably can also be a customizable behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants