added rotation to shapes/image

I just find out the some basic function is missing. So I make some small modification. I'm not sure whether it's the correct way to do it. Please review. Thanks