Add rotate shape operation (addresses #838)