Answer the question
In order to leave comments, you need to log in
Rotate and crop image in Canvas?
Hello. Tell me please. How can I rotate and crop an image on Canvas so that it fills the entire area
Here is how in the example the lower and right areas did not fill from the photo
Thank you.
Answer the question
In order to leave comments, you need to log in
remember the school geometry course?
display a larger image so that it is enough for the cut out areas. by multiplying the original size according to the inscribed square formula by the root of two :)
https://codepen.io/anon/pen/NoNpzZ
and you can also calculate the minimum size and offset for each corner, but this is already a problem with an asterisk.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question