[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9037 - trunk/gnue-common/src/printing/pdftable
From: |
jcater |
Subject: |
[gnue] r9037 - trunk/gnue-common/src/printing/pdftable |
Date: |
Mon, 13 Nov 2006 20:00:05 -0600 (CST) |
Author: jcater
Date: 2006-11-13 20:00:04 -0600 (Mon, 13 Nov 2006)
New Revision: 9037
Modified:
trunk/gnue-common/src/printing/pdftable/pdftable.py
Log:
fixed a scaling logic error (column gaps were being counted prior to being
scaled)
Modified: trunk/gnue-common/src/printing/pdftable/pdftable.py
===================================================================
--- trunk/gnue-common/src/printing/pdftable/pdftable.py 2006-11-13 20:26:46 UTC
(rev 9036)
+++ trunk/gnue-common/src/printing/pdftable/pdftable.py 2006-11-14 02:00:04 UTC
(rev 9037)
@@ -379,8 +379,8 @@
font, size, tracking = self.fontDefs['dataFont']
fontWidth = self.dataFontWidth
- size = size * self.scale
- tracking = tracking * self.scale
+ size *= self.scale
+ tracking *= self.scale
if self.y - tracking < self.miny:
self.newPage()
@@ -507,8 +507,8 @@
font, size, tracking = self.fontDefs['dataFont']
fontWidth = self.dataFontWidth
- size = size * self.scale
- tracking = tracking * self.scale
+ size *= self.scale
+ tracking *= self.scale
if self.y - tracking < self.miny:
self.newPage()
@@ -703,8 +703,8 @@
numRows = len(self._currentSection['headerList'])
font, size, tracking = self.fontDefs['tableHeaderFont']
- size = size * self.scale
- tracking = tracking * self.scale
+ size *= self.scale
+ tracking *= self.scale
canvas.setFont(font, size)
boxy = self.y + tracking - (tracking-size)/2.0
@@ -835,11 +835,11 @@
totalCols = 0.0
for index, size in enumerate(section['columnActualSizes']):
- columnSizes[index] = size
- totalCols += size
+ columnSizes[index] = size + self.columnGap
+ totalCols += size + self.columnGap
for width, height in letter, landscape(letter):
- usable_width = width - 2*leftmargin - self.columnGap *
column_count
+ usable_width = width - 2*leftmargin
if totalCols <= usable_width:
scale = 1.0
else:
@@ -893,11 +893,11 @@
pagesize=(self.width, self.height))
- x = leftmargin + self.columnGap / 2.0
+ x = leftmargin #+ self.columnGap / 2.0
for i, size in enumerate(section['columnSizes']):
colSize = (size / float(totalCols) * usable_width)
- section['columnCoords'].append ( ( x, x + colSize ) )
- x += colSize + self.columnGap
+ section['columnCoords'].append ( ( x + self.columnGap / 2.0, x +
colSize - self.columnGap / 2.0 ) )
+ x += colSize + (has_actual_sizes and [0.0] or [self.columnGap])[0]
self._scalingComplete = True
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9037 - trunk/gnue-common/src/printing/pdftable,
jcater <=