Convert rect/circle/ellipse/polygon elements to path element.