X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e4a197e4c60e461b8068b0619692ea083e30b8b..05e1201cb5943fb9c75f5612e9fb9323358edab5:/wxPython/demo/PrintFramework.py diff --git a/wxPython/demo/PrintFramework.py b/wxPython/demo/PrintFramework.py index 36c3ea5a2b..e0fdd41aa9 100644 --- a/wxPython/demo/PrintFramework.py +++ b/wxPython/demo/PrintFramework.py @@ -69,7 +69,7 @@ class MyPrintout(wxPrintout): # Use x or y scaling factor, whichever fits on the DC actualScale = min(scaleX, scaleY) - # Calculate the position on the DC for centring the graphic + # Calculate the position on the DC for centering the graphic posX = (w - (self.canvas.getWidth() * actualScale)) / 2.0 posY = (h - (self.canvas.getHeight() * actualScale)) / 2.0 @@ -79,7 +79,7 @@ class MyPrintout(wxPrintout): #------------------------------------------- - self.canvas.DoDrawing(dc) + self.canvas.DoDrawing(dc, True) dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY) return True @@ -176,3 +176,12 @@ def runTest(frame, nb, log): overview = """\ """ + + + + +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])]) +