I want to go from
Graphics[{Red, Rectangle[{0, 0}, {1, 3}], Blue, Polygon[{{1, 1}, {3, 1}, {2, 2}}]}, Frame -> True]
to
I have rather clumsily written:
RectangleToLines[r_] := With[{n = Flatten @ r},
Line[{{n[[1]], n[[2]]}, {n[[3]], n[[2]]}, {n[[3]], n[[4]]}, {n[[1]],n[[4]]}, {n[[1]], n[[2]]}}]
]
RectangleToLines[{{0, 0}, {1, 3}}]
Line[{{0, 0}, {1, 0}, {1, 3}, {0, 3}, {0, 0}}]
and similar with the triangle. Terrible, because I would end up with many "FormToLines"-definitions.
I feel - that especially with V10 - there should be a much cleverer way to do this.