def __init__(self, outfile, width, height, dpi):
self.outfile = outfile<EOL>self._cached = {}<EOL>self._fontHandle = {}<EOL>self.lastHandle = {'<STR_LIT>':-<NUM_LIT:1>, '<STR_LIT>':-<NUM_LIT:1>, '<STR_LIT>':-<NUM_LIT:1>}<EOL>self.emf=pyemf.EMF(width,height,dpi,'<STR_LIT>')<EOL>self.width=int(width*dpi)<EOL>self.height=int(height*dpi)<EOL>self.dpi = dpi<EOL>self.pointstodpi = dpi/<NUM_LIT><EOL>self.hackPointsForMathExponent = <NUM_LIT><EOL>self.emf.SetBkMode(pyemf.TRANSPARENT)<EOL>self.emf.SetTextAlign( pyemf.TA_BOTTOM|pyemf.TA_LEFT)<EOL>if debugPrint: print("<STR_LIT>" % (self.width,self.height,outfile,dpi))<EOL>
Initialize the renderer with a gd image instance