There are some imperfections with intersecting edges (because the main
algorithm used is scanline, and that is not geared towards drawing
complex shapes), however, it behaves mostly fine for normal use :^)
This will be used to implement painting of 2D paths. This first patch
adds support for line_to(), move_to() and close().
It will try to have the same semantics as the HTML <canvas> element.
To stroke a Path, simply pass it to Painter::stroke_path().