Anyone? Anyone?

Steve Williams stevewilliams at wwc.com
Tue Sep 16 05:26:39 CEST 2003


The following runs slow, as you might expect. I'm open to advice.

. . .
   def GetTotalPages(self):
       self.PPIPrinterWidth = 100  #whatever
       self.PPIPrinterHeight = 100 #whatever
       self.screenscale = 1.0      #whatever
       bitmap = wxEmptyBitmap(
            PrinterDefinition['PageWidth'] * self.PPIPrinterWidth
           ,PrinterDefinition['PageHeight'] * self.PPIPrinterHeight)
       DC = wxMemoryDC()
       DC.SelectObject(bitmap)
       self.page_total = 0
       while self.DoDrawing(DC) <> False:
           self.page_total += 1
       return self.page_total
. .





More information about the Python-list mailing list