Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tasprite_factory.py
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-11-11 22:09:34 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-11-11 22:09:34 (GMT)
commit921ada788c1e7c4e616dccc848940c5a2b724311 (patch)
tree4ce5098e23efef6cefec27aa8d0d0c83e3a190d3 /TurtleArt/tasprite_factory.py
parent1a5dd20434ab94d727fd0ef390831b5b54e00299 (diff)
== None -> is None
Diffstat (limited to 'TurtleArt/tasprite_factory.py')
-rwxr-xr-xTurtleArt/tasprite_factory.py244
1 files changed, 239 insertions, 5 deletions
diff --git a/TurtleArt/tasprite_factory.py b/TurtleArt/tasprite_factory.py
index 0cbe1cf..4ad377a 100755
--- a/TurtleArt/tasprite_factory.py
+++ b/TurtleArt/tasprite_factory.py
@@ -1197,11 +1197,245 @@ def close_file(f):
def generator(datapath):
- svg0 = SVG()
- f = open_file(datapath, "true.svg")
- svg0.set_scale(2)
- svg0.expand(30, 0, 0, 0)
- svg_str = svg0.boolean_not(True)
+
+ svg = SVG()
+ f = open_file(datapath, "boolean_notnot.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg_str = svg.boolean_not(True)
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "boolean_not.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg_str = svg.boolean_not(False)
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "basic.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "blank.svg")
+ svg.set_scale(2)
+ svg.set_slot(False)
+ svg.set_tab(False)
+ svg.set_tail(False)
+ svg.expand(30, 0, 0, 0)
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "head.svg")
+ svg.set_scale(2)
+ svg.set_slot(False)
+ svg.set_cap(True)
+ svg.expand(30, 0, 0, 0)
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "head1arg.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_innie([True])
+ svg.set_slot(False)
+ svg.set_cap(True)
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "tail1arg.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_innie([True])
+ svg.set_slot(False)
+ svg.set_tail(True)
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "tail.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_slot(False)
+ svg.set_tail(True)
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "basic1arg.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_innie([True])
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "basic2arg.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_innie([True, True])
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "basic3arg.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_innie([True, True, True])
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "box.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg_str = svg.basic_box()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "media.svg")
+ svg.set_scale(2)
+ svg.expand(40, 30, 0, 0)
+ svg_str = svg.basic_box()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "number.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_innie([True, True])
+ svg.set_outie(True)
+ svg.set_tab(False)
+ svg.set_slot(False)
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "number1arg.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_innie([True])
+ svg.set_outie(True)
+ svg.set_tab(False)
+ svg.set_slot(False)
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "number3arg.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_innie([True, True, True])
+ svg.set_outie(True)
+ svg.set_tab(False)
+ svg.set_slot(False)
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "numberp.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_innie([True, True])
+ svg.set_outie(True)
+ svg.set_tab(False)
+ svg.set_slot(False)
+ svg.set_porch(True)
+ svg_str = svg.basic_block()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "comparep.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_porch(True)
+ svg_str = svg.boolean_compare()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "compare.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg_str = svg.boolean_compare()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "andor.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg_str = svg.boolean_and_or()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "clamp.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_slot(True)
+ svg.set_tab(True)
+ svg.second_clamp(False)
+ svg_str = svg.clamp()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "clampn.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_slot(True)
+ svg.set_tab(True)
+ svg.set_innie([True])
+ svg.second_clamp(False)
+ svg_str = svg.clamp()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "clampb.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_slot(True)
+ svg.set_tab(True)
+ svg.set_boolean(True)
+ svg.second_clamp(False)
+ svg_str = svg.clamp()
+ f.write(svg_str)
+ close_file(f)
+
+ svg = SVG()
+ f = open_file(datapath, "clampe.svg")
+ svg.set_scale(2)
+ svg.expand(30, 0, 0, 0)
+ svg.set_slot(True)
+ svg.set_tab(True)
+ svg.set_boolean(True)
+ svg.second_clamp(True)
+ svg_str = svg.clamp()
f.write(svg_str)
close_file(f)