Remove the write_at function. Use draw_text instead. Add center_text to SVGDoc

svn: r8089
This commit is contained in:
Brian Matherly
2007-02-12 04:55:11 +00:00
parent 02096637b8
commit 2a6e0cb197
11 changed files with 41 additions and 94 deletions

View File

@@ -354,19 +354,6 @@ class PSDrawDoc(BaseDoc.BaseDoc):
self.f.write('%s %s %s setrgbcolor stroke\n' % lrgb(stype.get_color()))
self.f.write('grestore\n')
def write_at(self,style,text,x,y):
para_style = self.style_list[style]
x = x + self.lmargin
y = y + self.tmargin
(text,fdef) = self.encode_text(para_style,text)
self.f.write('gsave\n')
self.f.write('%s cm %s cm moveto\n' % coords(self.translate(x,y)))
self.f.write(fdef)
self.f.write('(%s) show grestore\n' % text)
def draw_bar(self,style,x1,y1,x2,y2):
x1 = x1 + self.lmargin
x2 = x2 + self.lmargin