This commit is contained in:
Michael Fogleman 2017-01-15 22:03:12 -05:00
parent 35bd0b6c05
commit d625786abe
1 changed files with 16 additions and 0 deletions

16
examples/paths.py Normal file
View File

@ -0,0 +1,16 @@
import axi
import sys
def main():
filename = sys.argv[1]
d = axi.Drawing(axi.load_paths(filename))
d = d.scale(1, -1)
d = d.scale_to_fit(12, 8.5)
d = d.sort_paths()
d = d.join_paths(0.001)
d = d.simplify_paths(0.001)
d.render().write_to_png('out.png')
axi.draw(d)
if __name__ == '__main__':
main()