]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed SetUserScale() calls to use correct scale on Y axis
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 16 Jun 2008 08:10:06 +0000 (08:10 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 16 Jun 2008 08:10:06 +0000 (08:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/htmprint.cpp

index e4dbbcfda7bf39d43a7c516c27b72fde8679c169..158483e3a99481c77800505803fa7058fa0a27e7 100644 (file)
@@ -206,7 +206,8 @@ void wxHtmlPrintout::OnPreparePrinting()
     wxDisplaySize(&scr_w, &scr_h);
     GetDC()->GetSize(&dc_w, &dc_h);
 
-    GetDC()->SetUserScale((double)dc_w / (double)pageWidth, (double)dc_w / (double)pageWidth);
+    GetDC()->SetUserScale((double)dc_w / (double)pageWidth,
+                          (double)dc_h / (double)pageHeight);
 
     /* prepare headers/footers renderer: */
 
@@ -412,7 +413,8 @@ void wxHtmlPrintout::RenderPage(wxDC *dc, int page)
     GetPPIScreen(&ppiScreenX, &ppiScreenY);
     wxUnusedVar(ppiScreenX);
 
-    dc->SetUserScale((double)dc_w / (double)pageWidth, (double)dc_w / (double)pageWidth);
+    dc->SetUserScale((double)dc_w / (double)pageWidth,
+                     (double)dc_h / (double)pageHeight);
 
     m_Renderer->SetDC(dc, (double)ppiPrinterY / (double)ppiScreenY);