X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad667945478cda0c0a33e154f1d4403402cffb9e..677dc0ed1a3ff68af15f6246d6d0708d5264b07a:/src/mac/carbon/dcprint.cpp diff --git a/src/mac/carbon/dcprint.cpp b/src/mac/carbon/dcprint.cpp index 456feb2e30..93102ac245 100644 --- a/src/mac/carbon/dcprint.cpp +++ b/src/mac/carbon/dcprint.cpp @@ -219,11 +219,12 @@ 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; - dc->m_macLocalOrigin.y = (int) rPage.top; + dc->SetDeviceLocalOrigin( (wxCoord) rPage.left, (wxCoord) rPage.top ); #endif } // since this is a non-critical error, we set the flag back