--- a/src/reportlab/platypus/doctemplate.py Tue Jul 02 10:17:00 2013 +0100
+++ b/src/reportlab/platypus/doctemplate.py Tue Jul 02 10:47:30 2013 +0100
@@ -240,15 +240,16 @@
_ZEROSIZE=True
width=0
height=0
- def __init__(self, bg=None, left=0, right=0, start=True):
- self.bgLeft = _evalMeasurement(left)
- self.bgRight = _evalMeasurement(right)
- self.bg = bg
+ def __init__(self, color=None, left=0, right=0, start=True):
self.start = start
+ if start:
+ self.left = _evalMeasurement(left)
+ self.right = _evalMeasurement(right)
+ self.color = color
def frameAction(self, frame):
if self.start:
- frame._frameBGs.append((self.bgLeft,self.bgRight,self.bg))
+ frame._frameBGs.append((self.left,self.right,self.color))
elif frame._frameBGs:
frame._frameBGs.pop()
--- a/tests/test_platypus_tables.py Tue Jul 02 10:17:00 2013 +0100
+++ b/tests/test_platypus_tables.py Tue Jul 02 10:47:30 2013 +0100
@@ -50,7 +50,7 @@
styNormal = styleSheet['Normal']
styBackground = ParagraphStyle('background', parent=styNormal, backColor=colors.pink)
styH1 = styleSheet['Heading1']
- lst.append(FrameBG(bg=colors.red))
+ lst.append(FrameBG(color=colors.red))
lst.append(Paragraph("First, a test of how tables align their content...", styH1))
lst.append(Paragraph("""Generated with version %s""" % Version,
styNormal))
@@ -58,7 +58,7 @@
text differently to cells with Paragraphs using the
same font. Hopefully now they are back on the same baseline""",
styNormal))
- lst.append(FrameBG(bg=colors.blue))
+ lst.append(FrameBG(color=colors.blue))
ts1 = TableStyle([
('ALIGN', (0,0), (-1,0), 'RIGHT'),
('BACKGROUND', (0,0), (-1,0), colors.lightgrey),