* src/ReportUtils.py: added estimate_age and sanitize_person

* src/BaseDoc.py: Add checks attempting to add styles after initializing
the document
* src/docgen/OpenOfficeDoc.py: add init assertions
* src/docgen/PSDrawDoc.py: fix line style in boxes
* src/docgen/SvgDrawDoc.py: fix line style in boxes

* src/ReportUtils.py: added documentation


svn: r3942
This commit is contained in:
Don Allingham
2005-01-20 04:11:13 +00:00
parent b818a15850
commit c39b6ba091
6 changed files with 220 additions and 25 deletions

View File

@@ -362,13 +362,14 @@ class PSDrawDoc(BaseDoc.BaseDoc):
self.f.write('1 setgray\n')
self.f.write('fill\n')
self.f.write('newpath\n')
self.f.write('%f cm %f cm moveto\n' % self.translate(x,y))
self.f.write('0 -%f cm rlineto\n' % bh)
self.f.write('%f cm 0 rlineto\n' % bw)
self.f.write('0 %f cm rlineto\n' % bh)
self.f.write('closepath\n')
self.f.write('%.4f setlinewidth\n' % box_style.get_line_width())
self.f.write('%.4f %.4f %.4f setrgbcolor stroke\n' % rgb_color(box_style.get_color()))
if box_style.get_line_width():
self.f.write('%f cm %f cm moveto\n' % self.translate(x,y))
self.f.write('0 -%f cm rlineto\n' % bh)
self.f.write('%f cm 0 rlineto\n' % bw)
self.f.write('0 %f cm rlineto\n' % bh)
self.f.write('closepath\n')
self.f.write('%.4f setlinewidth\n' % box_style.get_line_width())
self.f.write('%.4f %.4f %.4f setrgbcolor stroke\n' % rgb_color(box_style.get_color()))
if text != "":
(text,fdef) = self.encode_text(p,text)
self.f.write(fdef)