Single Layer Rotate

Implemented the single layer rotate function! But it still has
something problem. One is when I rotated some layer, then I change the
view port, something will go wrong!
nothing
Single Later auto adjustment