X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..99646f7ee4afb3d7d929e1d396e56de8c1aed622:/src/generic/printps.cpp diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp index f819ed81ee..9a97d9cc6e 100644 --- a/src/generic/printps.cpp +++ b/src/generic/printps.cpp @@ -162,8 +162,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro logPPIPrinterY = 100; */ - logPPIPrinterX = 72; - logPPIPrinterY = 72; + logPPIPrinterX = wxPostScriptDC::GetResolution(); + logPPIPrinterY = wxPostScriptDC::GetResolution(); printout->SetPPIScreen(logPPIScreenX, logPPIScreenY); printout->SetPPIPrinter(logPPIPrinterX, logPPIPrinterY); @@ -350,9 +350,11 @@ void wxPostScriptPrintPreview::DetermineScaling() { m_previewPrintout->SetPPIScreen(100, 100); // m_previewPrintout->SetPPIPrinter(100, 100); - m_previewPrintout->SetPPIPrinter(72, 72); + m_previewPrintout->SetPPIPrinter(wxPostScriptDC::GetResolution(), wxPostScriptDC::GetResolution()); wxSize sizeDevUnits(paper->GetSizeDeviceUnits()); + sizeDevUnits.x = (wxCoord)((float)sizeDevUnits.x * wxPostScriptDC::GetResolution() / 72.0); + sizeDevUnits.y = (wxCoord)((float)sizeDevUnits.y * wxPostScriptDC::GetResolution() / 72.0); wxSize sizeTenthsMM(paper->GetSize()); wxSize sizeMM(sizeTenthsMM.x / 10, sizeTenthsMM.y / 10); @@ -373,7 +375,7 @@ void wxPostScriptPrintPreview::DetermineScaling() } // At 100%, the page should look about page-size on the screen. - m_previewScale = (float)0.8; + m_previewScale = (float)0.8 * 72.0 / (float)wxPostScriptDC::GetResolution(); } }