X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/904a68b6f648fc7802b41a8d176c78394252a4b7..a949e8fac2666418b2a6eb15e94959563cf8aad6:/src/generic/printps.cpp diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp index adf67bf80f..dfa6611416 100644 --- a/src/generic/printps.cpp +++ b/src/generic/printps.cpp @@ -30,7 +30,7 @@ #include "wx/defs.h" -#if wxUSE_PRINTING_ARCHITECTURE +#if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT #ifndef WX_PRECOMP #include "wx/utils.h" @@ -39,6 +39,7 @@ #include "wx/msgdlg.h" #include "wx/intl.h" #include "wx/progdlg.h" + #include "wx/log.h" #endif #include "wx/generic/printps.h" @@ -56,7 +57,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase) IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase) - + // ============================================================================ // implementation // ============================================================================ @@ -151,8 +152,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 +340,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());