]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmprint.cpp
added check for self-assignment to wxPrintData::operator=() (thanks HP aCC for a...
[wxWidgets.git] / src / html / htmprint.cpp
index e4dbbcfda7bf39d43a7c516c27b72fde8679c169..80277e0336a00b95be043087e04af43aca9a524c 100644 (file)
@@ -132,7 +132,7 @@ int wxHtmlDCRenderer::Render(int x, int y,
         m_DC->SetClippingRegion(x, y, m_Width, hght);
         m_Cells->Draw(*m_DC,
                       x, (y - from),
-                      y, pbreak + (y /*- from*/),
+                      y, y + hght,
                       rinfo);
         m_DC->DestroyClippingRegion();
     }
@@ -200,13 +200,16 @@ void wxHtmlPrintout::OnPreparePrinting()
 
     int ppiPrinterX, ppiPrinterY;
     GetPPIPrinter(&ppiPrinterX, &ppiPrinterY);
+    wxUnusedVar(ppiPrinterX);
     int ppiScreenX, ppiScreenY;
     GetPPIScreen(&ppiScreenX, &ppiScreenY);
+    wxUnusedVar(ppiScreenX);
 
     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 +415,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);