How can I rotate a rectangle around its own axis?

Here s the link what I m trying to achieve

Regards.