X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad667945478cda0c0a33e154f1d4403402cffb9e..7564225f8bff6e6c2ed27695836035fa85a81189:/src/mac/carbon/dcprint.cpp diff --git a/src/mac/carbon/dcprint.cpp b/src/mac/carbon/dcprint.cpp index 456feb2e30..58b2eb7a13 100644 --- a/src/mac/carbon/dcprint.cpp +++ b/src/mac/carbon/dcprint.cpp @@ -219,7 +219,9 @@ void wxMacCarbonPrinterDC::StartPage( wxPrinterDC* dc ) #if wxMAC_USE_CORE_GRAPHICS PMRect paperRect ; PMGetAdjustedPaperRect( native->m_macPageFormat , &paperRect ) ; - CGContextTranslateCTM( pageContext , -paperRect.left , -paperRect.top + ( rPage.bottom - rPage.top ) ) ; + // make sure (0,0) is at the upper left of the printable area (wx conventions) + // Core Graphics initially has the lower left of the paper as 0,0 + CGContextTranslateCTM( pageContext , -paperRect.left , paperRect.bottom ) ; CGContextScaleCTM( pageContext , 1 , -1 ) ; #else dc->m_macLocalOrigin.x = (int) rPage.left;