From ed98f424de0ec9b80dc5de2f92c2bd3dde11bbb0 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 26 Mar 2012 16:57:05 +0000 Subject: [PATCH] Corrected scale factor for the use of DC PPI instead of printer PPI in wxRTC code git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextprint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/richtext/richtextprint.cpp b/src/richtext/richtextprint.cpp index cc4714cdd3..55c0dbf8cf 100644 --- a/src/richtext/richtextprint.cpp +++ b/src/richtext/richtextprint.cpp @@ -345,8 +345,8 @@ void wxRichTextPrintout::CalculateScaling(wxDC* dc, wxRect& textRect, wxRect& he // The dimensions used for indentation etc. have to be unscaled // during printing to be correct when scaling is applied. - // if (!IsPreview()) - m_richTextBuffer->SetScale(scale); + // Also, correct the conversions in wxRTC using DC instead of print DC. + m_richTextBuffer->SetScale(scale * float(dc->GetPPI().x)/float(ppiPrinterX)); // Calculate margins int marginLeft = wxRichTextObject::ConvertTenthsMMToPixels(ppiPrinterX, m_marginLeft); -- 2.50.0