]> git.saurik.com Git - wxWidgets.git/commitdiff
setting CG origin to printable area
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 31 Aug 2005 14:49:08 +0000 (14:49 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 31 Aug 2005 14:49:08 +0000 (14:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/dcprint.cpp

index 87f5ec2ad44e3c61837176caa742cbb4895c47c6..db3feb33b2967ede7b0d35aeea11e0a1a12ad5ba 100644 (file)
@@ -180,7 +180,9 @@ void wxMacCarbonPrinterDC::StartPage( wxPrinterDC* dc )
         if ( !m_err )
         {
 #if wxMAC_USE_CORE_GRAPHICS
-            CGContextTranslateCTM( pageContext , 0 , rPage.bottom - rPage.top ) ;
+            PMRect paperRect ;
+            PMGetAdjustedPaperRect( native->m_macPageFormat , &paperRect ) ;
+            CGContextTranslateCTM( pageContext , -paperRect.left , -paperRect.top + ( rPage.bottom - rPage.top ) ) ;
             CGContextScaleCTM( pageContext , 1 , -1 ) ;
             CGContextSaveGState( pageContext ) ;
 #else