ReportLab Graphics and SVG Integratation
ReportLab Graphics and SVG Integratation
ReportLab Graphics and SVG Integratation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
portLab<br />
epor ReportL<br />
portLa<br />
def drawOn(self, canvas):<br />
portLa<br />
Wrapper code for PythonPoint (cont'd)<br />
Repor Rep<br />
d = self.drawing<br />
x, y = self.x, self.y<br />
w, h = self.width, self.height<br />
portL Repor<br />
# maintain aspect ratio<br />
if h == None:<br />
h = w * d.height/d.width<br />
elif w == None:<br />
w = h * d.width/d.height<br />
d.scale(w/d.width, h/d.height)<br />
d.drawOn(canvas, x, y)