X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e4a197e4c60e461b8068b0619692ea083e30b8b..80a81a12af49ab6acdaf0b62f4aa55e56f45ac6d:/wxPython/demo/PrintFramework.py diff --git a/wxPython/demo/PrintFramework.py b/wxPython/demo/PrintFramework.py index 36c3ea5a2b..58e40f8dab 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,8 +79,8 @@ class MyPrintout(wxPrintout): #------------------------------------------- - self.canvas.DoDrawing(dc) - dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY) + 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])]) +