from __future__ import division
import SVGdraw
-class Ruler:
+class SVGRuler:
def __init__(self, scale=None, units=None,
ruler_height=None, ruler_length=None):
self.__drawline(0.3)
self.__drawline(0.6)
- self.svg.addElement(SVGdraw.text((self.point - font_height * 1.4),
+ self.svg.addElement(SVGdraw.text((self.point - font_height * 1.15),
(self.ruler_height * 0.6 - 5),
str(i + 1), font_height))
self.drawing.setSVG(self.svg)
- def output(self):
+ def getxml(self):
import cStringIO
xml = cStringIO.StringIO()
xml.write("<?xml version='1.0' encoding='UTF-8'?>\n")