fix bug in renderPM dpi handling & bad syntax in test_table_layout.py version-->3.6.12
authorrobin
Thu, 21 Jul 2022 09:29:56 +0100
changeset 4733 58ea94e4c517
parent 4732 e856f2ea3e93
child 4734 4f30137c136e
fix bug in renderPM dpi handling & bad syntax in test_table_layout.py version-->3.6.12
CHANGES.md
src/reportlab/__init__.py
src/reportlab/graphics/renderPM.py
tests/test_table_layout.py
--- a/CHANGES.md	Fri Jun 24 13:32:17 2022 +0100
+++ b/CHANGES.md	Thu Jul 21 09:29:56 2022 +0100
@@ -11,6 +11,10 @@
 The contributors lists are in no order and apologies to those accidentally not
 mentioned. If we missed you, please let us know!
 
+CHANGES  3.6.12  20/07/2022
+---------------------------
+	* fix dpi handling in renderPM.py; bug found by Terry Zhao Terry dot Zhao at fil dot com
+
 CHANGES  3.6.11  24/06/2022
 ---------------------------
 	* support HORIZONTAL2 & VERTICAL2 table cell backgrounds; as suggested by Sina Khelil < sina at khelil dot com >
--- a/src/reportlab/__init__.py	Fri Jun 24 13:32:17 2022 +0100
+++ b/src/reportlab/__init__.py	Thu Jul 21 09:29:56 2022 +0100
@@ -1,9 +1,9 @@
 #Copyright ReportLab Europe Ltd. 2000-2021
 #see license.txt for license details
 __doc__="""The Reportlab PDF generation library."""
-Version = "3.6.11"
+Version = "3.6.12"
 __version__=Version
-__date__='20220624'
+__date__='20220720'
 
 import sys, os
 
--- a/src/reportlab/graphics/renderPM.py	Fri Jun 24 13:32:17 2022 +0100
+++ b/src/reportlab/graphics/renderPM.py	Thu Jul 21 09:29:56 2022 +0100
@@ -92,7 +92,7 @@
 
     def initState(self,x,y):
         deltas = self._tracker._combined[-1]
-        deltas['transform'] = self._canvas._baseCTM[0:4]+(x,y)
+        deltas['transform'] = deltas['ctm'] = self._canvas._baseCTM[0:4]+(x,y)
         self._tracker.push(deltas)
         self.applyState()
 
--- a/tests/test_table_layout.py	Fri Jun 24 13:32:17 2022 +0100
+++ b/tests/test_table_layout.py	Thu Jul 21 09:29:56 2022 +0100
@@ -671,12 +671,12 @@
                 t = makeTable()
                 S = t.split(4*72,size)
                 if not S:
-                    storyAdd(Paragraph(f"<span color=red>Illustrating splits failed</span>: split(4in,{size}) {splitByRow=} {splitInRow=}", btStyle))
+                    storyAdd(Paragraph(f"<span color=red>Illustrating splits failed</span>: split(4in,{size}) splitByRow={splitByRow} splitInRow={splitInRow}", btStyle))
                     storyAdd(Spacer(0,6))
                     #print('!!!!! Failed')
                 else:
                     #print('##### OK')
-                    storyAdd(Paragraph(f"Illustrating splits: split(4in,{size}) {splitByRow=} {splitInRow=}", btStyle))
+                    storyAdd(Paragraph(f"Illustrating splits: split(4in,{size}) splitByRow={splitByRow} splitInRow={splitInRow}", btStyle))
                     storyAdd(Spacer(0,6))
                     for s in S:
                         storyAdd(s)