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:
Diffstat (limited to 'TurtleArt/tasprite_factory.py')
-rwxr-xr-xTurtleArt/tasprite_factory.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/TurtleArt/tasprite_factory.py b/TurtleArt/tasprite_factory.py
index 3164140..d9f2cc0 100755
--- a/TurtleArt/tasprite_factory.py
+++ b/TurtleArt/tasprite_factory.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-#Copyright (c) 2009,10 Walter Bender
+#Copyright (c) 2009-12 Walter Bender
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
@@ -393,6 +393,32 @@ class SVG:
self.margins[2] = int(self._stroke_width * self._scale)
return self.header() + svg
+ def triangle_up(self, colors):
+ ''' A triangle that points up '''
+ self.reset_min_max()
+ self._fill, self._stroke = colors[0], colors[1]
+ self._width, self._height = 55, 55
+ svg = self.new_path(0, 55)
+ svg += self._rline_to(27.5, -55)
+ svg += self._rline_to(27.5, 55)
+ svg += self._close_path()
+ svg += self.style()
+ svg += self.footer()
+ return self.header() + svg
+
+ def triangle_down(self, colors):
+ ''' A triangle that points down '''
+ self.reset_min_max()
+ self._fill, self._stroke = colors[0], colors[1]
+ self._width, self._height = 55, 55
+ svg = self.new_path(0, 0)
+ svg += self._rline_to(27.5, 55)
+ svg += self._rline_to(27.5, -55)
+ svg += self._close_path()
+ svg += self.style()
+ svg += self.footer()
+ return self.header() + svg
+
def turtle(self, colors):
''' Turtles are just another block '''
self.reset_min_max()