Skip to content

Why do the coordinates swap when doing matrix multiplication while rotating a rectangle? #1145

Discussion options

You must be logged in to vote

Your manual multiplication - corner point by corner point - leads to an "infinite" rectangle, see documentation.
The logic takes care that the result rect is defined by the diagonal of the points top-left and bottom-right.
To see the algorithm (which ultimately is written in C), lookup fz_transform_rect in MuPDF source code.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by brandxntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants