Does D3 has a method that helps to straighten a 2d shape or polygon?
For example given the image
Could it be rotated from any of its corners to have it in perfect straight alignment, like the image below?
Does D3 has a method that helps to straighten a 2d shape or polygon?
For example given the image
Could it be rotated from any of its corners to have it in perfect straight alignment, like the image below?
The rotation angle needed to make it squared is Right Triangle Calculator
The way the rotation is applied depends on the data type of the image, svg, bitmap…