How can i draw 2d figure(line, rectangle, circle..)?

I made a snippet for those who need it :smiley: