Tweaks to use inplace arithmetic

svn: r13191
This commit is contained in:
Gerald Britton
2009-09-10 18:49:48 +00:00
parent d5e48cda06
commit 941fff23ae
31 changed files with 56 additions and 60 deletions

View File

@@ -183,7 +183,7 @@ class FanChart(Report):
style_sheet = self.doc.get_style_sheet()
fontsize = pt2cm(style_sheet.get_paragraph_style('FC-Title').get_font().get_size())
# y is vertical distance to center of circle, move center down 1 fontsize
y = y + fontsize
y += fontsize
# min_XY is the diamter of the circle, subtract two fontsize
# so we dont draw outside bottom of the paper
min_xy = min(min_xy,y-2*fontsize)

View File

@@ -591,9 +591,9 @@ class StatisticsChart(Report):
# output data...
radius = middle - 2*margin
yoffset = yoffset + margin + radius
yoffset += margin + radius
ReportUtils.draw_pie_chart(self.doc, middle_w, yoffset, radius, chart_data, -90)
yoffset = yoffset + radius + 2*margin
yoffset += radius + 2*margin
if middle == middle_h: # Landscape
legendx = 1.0
yoffset = margin