Also fix coordinate transform for path objects

Factorize the coordinate transformation out of Line2D, and use them also for path drawing.

Sorry for dumping bits-and-pieces. I don't have time for more complete reviews right now - I'm just using your script, and try to fix issues as I encounter them.

Thanks for your project, it's very useful. And also thanks for being so responsive.