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

Understanding (left, top) coordinates after rotation #2

Open
tmb5cg opened this issue Mar 21, 2023 · 1 comment
Open

Understanding (left, top) coordinates after rotation #2

tmb5cg opened this issue Mar 21, 2023 · 1 comment

Comments

@tmb5cg
Copy link

tmb5cg commented Mar 21, 2023

Sorry if this is a dumb question, but I can't for the life of me understand the coordinate system after rotation. It works great without any rotation, and is standard top left (X, Y) positioning (or left, top).

Also library is great and props to you for making it.

Moving the crop size/coordinates works great via left, top, width and height. But upon rotation, I do not understand why the (left, top) coordinate changes. It doesn't appear to be the location of the top left corner, nor the center of the image.

Is there something I'm missing in the documentation or anything someone can point me to for more context? Thanks in advance

@Norserium
Copy link
Collaborator

@tmb5cg, it's not a dumb question at all.

There is the peculiarity, that the coordinates are relative to the bounding box of an image.
croppper-01

That's the most straightforward and rational approach, that can be easily implemented on the backend by the way. In an other case we need to deal with the coordinates of the rotated rectangle inside the another rectangle.

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