I did 90 degrees because it is a straight inversion between width and height. to rotate any other angle you have to apply a bit of trigonometry to calculate the dimension of the rectangles around the rotated widget