parent
3971fecb29
commit
1777cd4b29
@ -1221,7 +1221,9 @@ class FanChartWidget(FanChartBaseWidget):
|
|||||||
cr.scale(scale, scale)
|
cr.scale(scale, scale)
|
||||||
if widget:
|
if widget:
|
||||||
self.center_xy = self.center_xy_from_delta()
|
self.center_xy = self.center_xy_from_delta()
|
||||||
cr.translate(*self.center_xy)
|
cr.translate(*self.center_xy)
|
||||||
|
else:
|
||||||
|
cr.translate(halfdist, halfdist)
|
||||||
|
|
||||||
cr.save()
|
cr.save()
|
||||||
cr.rotate(math.radians(self.rotate_value))
|
cr.rotate(math.radians(self.rotate_value))
|
||||||
|
@ -374,7 +374,9 @@ class FanChart2WayWidget(FanChartWidget, FanChartDescWidget):
|
|||||||
cr.scale(scale, scale)
|
cr.scale(scale, scale)
|
||||||
if widget:
|
if widget:
|
||||||
self.center_xy = self.center_xy_from_delta()
|
self.center_xy = self.center_xy_from_delta()
|
||||||
cr.translate(*self.center_xy)
|
cr.translate(*self.center_xy)
|
||||||
|
else:
|
||||||
|
cr.translate(halfdist, halfdist)
|
||||||
|
|
||||||
cr.save()
|
cr.save()
|
||||||
# Draw background
|
# Draw background
|
||||||
|
@ -528,8 +528,6 @@ class CairoPrintSave():
|
|||||||
pxwidth = round(context.get_width())
|
pxwidth = round(context.get_width())
|
||||||
pxheight = round(context.get_height())
|
pxheight = round(context.get_height())
|
||||||
scale = min(pxwidth/self.widthpx, pxheight/self.heightpx)
|
scale = min(pxwidth/self.widthpx, pxheight/self.heightpx)
|
||||||
if scale > 1:
|
|
||||||
scale = 1
|
|
||||||
self.drawfunc(None, cr, scale=scale)
|
self.drawfunc(None, cr, scale=scale)
|
||||||
|
|
||||||
def on_paginate(self, operation, context):
|
def on_paginate(self, operation, context):
|
||||||
|
@ -516,8 +516,6 @@ class CairoPrintSave:
|
|||||||
pxwidth = round(context.get_width())
|
pxwidth = round(context.get_width())
|
||||||
pxheight = round(context.get_height())
|
pxheight = round(context.get_height())
|
||||||
scale = min(pxwidth/self.widthpx, pxheight/self.heightpx)
|
scale = min(pxwidth/self.widthpx, pxheight/self.heightpx)
|
||||||
if scale > 1:
|
|
||||||
scale = 1
|
|
||||||
self.drawfunc(None, cr, scale=scale)
|
self.drawfunc(None, cr, scale=scale)
|
||||||
|
|
||||||
def on_paginate(self, operation, context):
|
def on_paginate(self, operation, context):
|
||||||
|
@ -523,8 +523,6 @@ class CairoPrintSave:
|
|||||||
pxwidth = round(context.get_width())
|
pxwidth = round(context.get_width())
|
||||||
pxheight = round(context.get_height())
|
pxheight = round(context.get_height())
|
||||||
scale = min(pxwidth/self.widthpx, pxheight/self.heightpx)
|
scale = min(pxwidth/self.widthpx, pxheight/self.heightpx)
|
||||||
if scale > 1:
|
|
||||||
scale = 1
|
|
||||||
self.drawfunc(None, cr, scale=scale)
|
self.drawfunc(None, cr, scale=scale)
|
||||||
|
|
||||||
def on_paginate(self, operation, context):
|
def on_paginate(self, operation, context):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user