X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3b9f782ef3949f583e8ac53795d36787f044fc3..b5a9b87e1620e52f1f13d2619b4677f2b365c93f:/src/osx/core/printmac.cpp diff --git a/src/osx/core/printmac.cpp b/src/osx/core/printmac.cpp index 463c61bd74..3e14c848dc 100644 --- a/src/osx/core/printmac.cpp +++ b/src/osx/core/printmac.cpp @@ -125,8 +125,8 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) if ( bestPaper == kPMNoData ) { const PMPaperMargins margins = { 0.0, 0.0, 0.0, 0.0 }; - wxString id, name(_T("Custom paper")); - id.Printf(_T("wxPaperCustom%dx%d"), papersize.x, papersize.y); + wxString id, name(wxT("Custom paper")); + id.Printf(wxT("wxPaperCustom%dx%d"), papersize.x, papersize.y); #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 if ( PMPaperCreateCustom != NULL) @@ -216,12 +216,14 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) PMSetOrientation( m_macPageFormat , ( data.GetOrientation() == wxLANDSCAPE ) ? kPMLandscape : kPMPortrait , false ) ; +#ifndef __LP64__ // PMQualityMode not accessible via API // TODO: use our quality property to determine optimal resolution PMResolution res; PMTag tag = kPMMaxSquareResolution; PMPrinterGetPrinterResolution(printer, tag, &res); PMSetResolution( m_macPageFormat, &res); +#endif // after setting the new resolution the format has to be updated, otherwise the page rect remains // at the 'old' scaling @@ -477,12 +479,13 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) // on the mac we have always pixels as addressing mode with 72 dpi printout->SetPPIScreen(72, 72); +#ifndef __LP64__ PMResolution res; wxOSXPrintData* nativeData = (wxOSXPrintData*) (m_printDialogData.GetPrintData().GetNativeData()); PMGetResolution( (nativeData->GetPageFormat()), &res); printout->SetPPIPrinter(int(res.hRes), int(res.vRes)); - +#endif // Set printout parameters printout->SetDC(dc);