-
Scale up rotated rectangle to cover comp canvas.
Let’s say I have a comp with the width compWidth and the height compHeight.
In that comp I have a rectangle with the width shapeWidth, the height shapeHeight and rotation shapeRotation.
I now want to rotate the rectangle. But I want to make sure that it always covers the comp.Example: the pink shape should automatically scale up so it covers the black areas.
I’ve already set up so the rectangle scales up to the comp to its “shortest” side with this scale expression:
wCalc = (compWidth / shapeWidth ) * 100;
hCalc = (compHeight / shapeHeight ) * 100;
sca = Math.max(wCalc, hCalc);
[sca, sca]But here is where my math skills meet their limit. How can I incorporate the rotation with my existing scale expression to cover the comp at all times?

