From 70949ed554033d4f9512e3e20539ef1397196d58 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 24 Apr 2005 11:44:51 +0000 Subject: [PATCH] 25.4 mm to the inch, not 25.1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/printing/printing.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp index 5315efebea..2654f84397 100644 --- a/samples/printing/printing.cpp +++ b/samples/printing/printing.cpp @@ -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);