[PythonReports-checkins] PythonReports/PythonReports RLDrivers.py, 1.3, 1.4
Brought to you by:
a1s
From: alexander s. <a1...@us...> - 2006-12-12 10:44:12
|
Update of /cvsroot/pythonreports/PythonReports/PythonReports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18767 Modified Files: RLDrivers.py Log Message: .size renamed to .height for compatibility with base class (.chop was broken) Index: RLDrivers.py =================================================================== RCS file: /cvsroot/pythonreports/PythonReports/PythonReports/RLDrivers.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RLDrivers.py 6 Dec 2006 16:55:16 -0000 1.3 --- RLDrivers.py 12 Dec 2006 10:44:11 -0000 1.4 *************** *** 6,9 **** --- 6,11 ---- """ """History (most recent first): + 12-dec-2006 [als] .size renamed to .height for compatibility with base class + (.chop was broken) 01-nov-2006 [als] driver classes have backend name property 05-oct-2006 [als] created *************** *** 29,37 **** backend = "RL" - # attributes read directly by PythonReports.PdfWriter - name = None - size = None - leading = None - # 1/5 of character size is default line gap used by ReportLab. DEFAULT_LEADING = .2 --- 31,34 ---- *************** *** 63,67 **** self._registered_fonts.add(_name) self.name = _name ! self.size = _size self.leading = _size * self.DEFAULT_LEADING --- 60,64 ---- self._registered_fonts.add(_name) self.name = _name ! self.height = _size self.leading = _size * self.DEFAULT_LEADING *************** *** 70,75 **** # have to aggregate dimensions manually _lines = text.split("\n") ! _height = (self.size + self.leading) * len(_lines) - self.leading ! _width = max([pdfmetrics.stringWidth(_line, self.name, self.size) for _line in _lines]) return (_width, _height) --- 67,72 ---- # have to aggregate dimensions manually _lines = text.split("\n") ! _height = (self.height + self.leading) * len(_lines) - self.leading ! _width = max([pdfmetrics.stringWidth(_line, self.name, self.height) for _line in _lines]) return (_width, _height) |