From 3925a44ce0e70080252c0abe71a098a219f3dd3c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 6 Nov 2006 07:49:14 +0000 Subject: [PATCH] fixing origin git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dcprint.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.47.2