]> git.saurik.com Git - wxWidgets.git/commitdiff
25.4 mm to the inch, not 25.1
authorJulian Smart <julian@anthemion.co.uk>
Sun, 24 Apr 2005 11:44:51 +0000 (11:44 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 24 Apr 2005 11:44:51 +0000 (11:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/printing/printing.cpp

index 5315efebea2d551861308ed44bd1a2e4090e1e3f..2654f843977393544501a05768477a7a3899640d 100644 (file)
@@ -487,14 +487,14 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
 
     // Calculate conversion factor for converting millimetres into
     // logical units.
-    // There are approx. 25.1 mm to the inch. There are ppi
+    // There are approx. 25.4 mm to the inch. There are ppi
     // device units to the inch. Therefore 1 mm corresponds to
-    // ppi/25.1 device units. We also divide by the
+    // ppi/25.4 device units. We also divide by the
     // screen-to-printer scaling factor, because we need to
     // unscale to pass logical units to DrawLine.
 
     // Draw 50 mm by 50 mm L shape
-    float logUnitsFactor = (float)(ppiPrinterX/(scale*25.1));
+    float logUnitsFactor = (float)(ppiPrinterX/(scale*25.4));
     float logUnits = (float)(50*logUnitsFactor);
     dc->SetPen(* wxBLACK_PEN);
     dc->DrawLine(50, 250, (long)(50.0 + logUnits), 250);