Add rotate for 45deg, 135deg, 225deg, 315 deg

Add rotate for 45deg, 135deg, 225deg, 315 deg

See also PR #3771 and #2858