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

How to get the original coordinate after transform #182

Open
richardcoder opened this issue Jul 24, 2023 · 1 comment
Open

How to get the original coordinate after transform #182

richardcoder opened this issue Jul 24, 2023 · 1 comment

Comments

@richardcoder
Copy link

Thanks in advance for such a good transform solution and good tutorial video: https://www.youtube.com/watch?v=yBuhnVDXekQ

I apply pinch/pan gesture detectors as shown in video to enable user to zoom in/zoom out and translate a picture. It works perfectly.

In addition, I want to add a tap detector to enbale user to draw path on the canvas, which is used to allow user to select special area on the picture. However, after transformation, the coordinate of tap detector event.x and event.y also get 3D Affine Transform and the path is not drawn at where user press at.

I want to ask if there is a reverse function of multiply4 which accept the 1x3 vector and transform matrix to get the original coordinate before transformation? Or should I write by myself according to the reference material ?https://www.brainvoyager.com/bv/doc/UsersGuide/CoordsAndTransforms/SpatialTransformationMatrices.html

Thanks a lot and looking forward to your reply!

@wcandillon
Copy link
Owner

I am not sure what you mean exactly, the invert matrix transformation can get you from the result vector to the original vector, not sure if this helps.

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