patch 1306473

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2005-11-18 21:23:24 +00:00
parent 7db33dd7ad
commit 8b28584104

View File

@ -150,6 +150,13 @@ bool wxMacCarbonPrintData::TransferFrom( const wxPrintData &data )
// PMDuplexMode not yet accessible via API
// PMQualityMode not yet accessible via API
// todo paperSize
PMResolution res;
PMPrinter printer;
PMTag tag = kPMMaxSquareResolution;
PMSessionGetCurrentPrinter(m_macPrintSession, &printer);
PMPrinterGetPrinterResolution(printer, tag, &res);
PMSetResolution((PMPageFormat) m_macPageFormat, &res);
return true ;
}
@ -343,7 +350,11 @@ 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);
printout->SetPPIPrinter(72, 72);
PMResolution res;
wxMacCarbonPrintData* nativeData = (wxMacCarbonPrintData*)
(m_printDialogData.GetPrintData().GetNativeData());
PMGetResolution((PMPageFormat) (nativeData->m_macPageFormat), &res);
printout->SetPPIPrinter(int(res.hRes), int(res.vRes));
// Set printout parameters
printout->SetDC(dc);