axi
axi copied to clipboard
Add Drawing.crop
Unlike Drawing.remove_paths_outside, this will split paths up and include any path segments inside of [0..width], [0..height].
I actually implemented this before in my Makeblock XY plotter library:
https://github.com/fogleman/xy/blob/master/xy/drawing.py#L85-L89
I used Shapely to do a proper crop versus just filtering points.
I'll look into adding this to axi soon.