This commit is contained in:
Michael Fogleman 2018-02-16 16:23:35 -05:00
parent d0903b1bc7
commit 82c01ff78c
1 changed files with 14 additions and 5 deletions

View File

@ -191,6 +191,14 @@ def label(text):
d = d.simplify_paths(0.001) d = d.simplify_paths(0.001)
return d return d
def multiple_label(text):
d = axi.Drawing(axi.text(text, axi.FUTURAL))
d = d.scale_to_fit_height(0.125)
d = d.move(0, 8.5, 0, 1)
d = d.join_paths(0.01)
d = d.simplify_paths(0.001)
return d
def single(number, rule, seed): def single(number, rule, seed):
if seed is None: if seed is None:
seed = int(time.time() * 1000) % 100000 seed = int(time.time() * 1000) % 100000
@ -244,6 +252,7 @@ def multiple():
d = horizontal_stack(ds, 0.25) d = horizontal_stack(ds, 0.25)
d = vertical_stack([title, d], 0.2) d = vertical_stack([title, d], 0.2)
d = d.scale_to_fit(12, 8.5) d = d.scale_to_fit(12, 8.5)
# d.add(multiple_label('#31'))
print len(d.paths) print len(d.paths)
print 'joining paths' print 'joining paths'
d = d.join_paths(0.01) d = d.join_paths(0.01)
@ -263,13 +272,13 @@ def multiple():
# axi.draw(d) # axi.draw(d)
def main(): def main():
number = 29 # number = 29
rule = 90 # rule = 90
seed = None # seed = None
single(number, rule, seed) # single(number, rule, seed)
# for seed in range(10, 20): # for seed in range(10, 20):
# single(number, rule, seed) # single(number, rule, seed)
# multiple() multiple()
if __name__ == '__main__': if __name__ == '__main__':
main() main()