When rendering the rotated result use SOURCE operator instead of OVER.
When top left and bottom right changes at the same time, do it with a set_tl_br function instead of set_tl and then set_br because it could lead to a dimension of zero in one of the dimensions.