PMResolution res;
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if ( PMPrinterGetOutputResolution != NULL )
{
PMPrinter printer;
else
#endif
{
-#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
m_err = PMGetResolution((PMPageFormat) (native->m_macPageFormat), &res);
#endif
}
-
+
m_ppi = wxSize(int(res.hRes), int(res.vRes));
}
m_err = PMSessionBeginCGDocumentNoDialog(native->m_macPrintSession,
native->m_macPrintSettings,
- native->m_macPageFormat);
+ native->m_macPageFormat);
if ( m_err != noErr )
return false;
m_maxY = wxCoord(rPage.bottom - rPage.top);
PMResolution res;
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if ( PMPrinterGetOutputResolution != NULL )
{
PMPrinter printer;
else
#endif
{
-#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
m_err = PMGetResolution((PMPageFormat) (native->m_macPageFormat), &res);
#endif
}
*h = m_maxY ;
}
-wxSize wxMacCarbonPrinterDC::GetPPI() const
+wxSize wxMacCarbonPrinterDC::GetPPI() const
{
return m_ppi ;
};
{
wxSize sz = GetPPI();
m_mm_to_pix_x = mm2inches * sz.x;
- m_mm_to_pix_y = mm2inches * sz.y;
+ m_mm_to_pix_y = mm2inches * sz.y;
}
// we need at least a measuring context because people start measuring before a page
// gets printed at all
}
}
-wxRect wxPrinterDCImpl::GetPaperRect()
+wxRect wxPrinterDCImpl::GetPaperRect() const
{
wxCoord w, h;
GetOwner()->GetSize(&w, &h);