From 8b2858410444b111cb192d1539ef6c76209091fd Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 18 Nov 2005 21:23:24 +0000 Subject: [PATCH] patch 1306473 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/printmac.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/mac/carbon/printmac.cpp b/src/mac/carbon/printmac.cpp index f6ad66c279..26f3372985 100644 --- a/src/mac/carbon/printmac.cpp +++ b/src/mac/carbon/printmac.cpp @@ -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);