[PythonReports-checkins] PythonReports/PythonReports pdf.py, 1.4, 1.5
Brought to you by:
a1s
|
From: Alexey L. <a-...@us...> - 2011-10-11 14:50:23
|
Update of /cvsroot/pythonreports/PythonReports/PythonReports
In directory vz-cvs-3.sog:/tmp/cvs-serv17881/PythonReports
Modified Files:
pdf.py
Log Message:
adapted to PIL 1.1.7
Index: pdf.py
===================================================================
RCS file: /cvsroot/pythonreports/PythonReports/PythonReports/pdf.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pdf.py 7 Dec 2006 12:21:50 -0000 1.4
--- pdf.py 11 Oct 2011 14:50:19 -0000 1.5
***************
*** 2,5 ****
--- 2,6 ----
"""PDF output for PythonReports"""
"""History (most recent first):
+ 11-oct-2011 [luch] adapted to PIL 1.1.7
07-dec-2006 [als] fix: diagonal lines were offset down by the box height
05-dec-2006 [als] sweep pylint warnings;
***************
*** 326,331 ****
else:
(_img_width, _img_height) = _img.size
! _img = _img.crop(
! (0, 0, min(_width, _img_width), min(_height, _img_height)))
self.canvas.drawImage(ImageReader(_img), _x, _y)
--- 327,332 ----
else:
(_img_width, _img_height) = _img.size
! _img = _img.crop((0, 0, int(min(_width, _img_width)),
! int(min(_height, _img_height))))
self.canvas.drawImage(ImageReader(_img), _x, _y)
|