X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/904a68b6f648fc7802b41a8d176c78394252a4b7..0a0fc5b527437ddb5d41057d60506bfb22ea2bd3:/src/generic/printps.cpp diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp index adf67bf80f..a24ea0919f 100644 --- a/src/generic/printps.cpp +++ b/src/generic/printps.cpp @@ -151,8 +151,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro wxSize ScreenPixels = wxGetDisplaySize(); wxSize ScreenMM = wxGetDisplaySizeMM(); - printout->SetPPIScreen( (ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth(), - (ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight() ); + printout->SetPPIScreen( (int) ((ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth()), + (int) ((ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight()) ); printout->SetPPIPrinter( wxPostScriptDC::GetResolution(), wxPostScriptDC::GetResolution() ); @@ -339,8 +339,8 @@ void wxPostScriptPrintPreview::DetermineScaling() wxSize ScreenPixels = wxGetDisplaySize(); wxSize ScreenMM = wxGetDisplaySizeMM(); - m_previewPrintout->SetPPIScreen( (ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth(), - (ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight() ); + m_previewPrintout->SetPPIScreen( (int) ((ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth()), + (int) ((ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight()) ); m_previewPrintout->SetPPIPrinter(wxPostScriptDC::GetResolution(), wxPostScriptDC::GetResolution()); wxSize sizeDevUnits(paper->GetSizeDeviceUnits());