This commit is contained in:
Michael Fogleman 2018-04-11 13:03:10 -04:00
parent 60def75465
commit 84cb2f5b32
1 changed files with 16 additions and 0 deletions

16
examples/box.py Normal file
View File

@ -0,0 +1,16 @@
import axi
W, H = 14, 11
BOUNDS = axi.A3_BOUNDS
def main():
paths = [
[(0, 0), (W, 0), (W, H), (0, H), (0, 0)]
]
d = axi.Drawing(paths)
d = d.center(*BOUNDS[-2:])
d.dump('box.axi')
d.render(bounds=BOUNDS).write_to_png('box.png')
if __name__ == '__main__':
main()