moving context methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -197,7 +197,6 @@ void wxMacCarbonPrinterDC::StartPage( wxPrinterDC* dc )
|
|||||||
kPMGraphicsContextCoreGraphics,
|
kPMGraphicsContextCoreGraphics,
|
||||||
(void**) &pageContext );
|
(void**) &pageContext );
|
||||||
#endif
|
#endif
|
||||||
dc->MacSetCGContext(pageContext) ;
|
|
||||||
#else
|
#else
|
||||||
m_err = PMSessionGetGraphicsContext(native->m_macPrintSession,
|
m_err = PMSessionGetGraphicsContext(native->m_macPrintSession,
|
||||||
kPMGraphicsContextQuickdraw,
|
kPMGraphicsContextQuickdraw,
|
||||||
@@ -222,7 +221,6 @@ void wxMacCarbonPrinterDC::StartPage( wxPrinterDC* dc )
|
|||||||
PMGetAdjustedPaperRect( native->m_macPageFormat , &paperRect ) ;
|
PMGetAdjustedPaperRect( native->m_macPageFormat , &paperRect ) ;
|
||||||
CGContextTranslateCTM( pageContext , -paperRect.left , -paperRect.top + ( rPage.bottom - rPage.top ) ) ;
|
CGContextTranslateCTM( pageContext , -paperRect.left , -paperRect.top + ( rPage.bottom - rPage.top ) ) ;
|
||||||
CGContextScaleCTM( pageContext , 1 , -1 ) ;
|
CGContextScaleCTM( pageContext , 1 , -1 ) ;
|
||||||
CGContextSaveGState( pageContext ) ;
|
|
||||||
#else
|
#else
|
||||||
dc->m_macLocalOrigin.x = (int) rPage.left;
|
dc->m_macLocalOrigin.x = (int) rPage.left;
|
||||||
dc->m_macLocalOrigin.y = (int) rPage.top;
|
dc->m_macLocalOrigin.y = (int) rPage.top;
|
||||||
@@ -231,6 +229,9 @@ void wxMacCarbonPrinterDC::StartPage( wxPrinterDC* dc )
|
|||||||
// since this is a non-critical error, we set the flag back
|
// since this is a non-critical error, we set the flag back
|
||||||
m_err = noErr ;
|
m_err = noErr ;
|
||||||
}
|
}
|
||||||
|
#if wxMAC_USE_CORE_GRAPHICS
|
||||||
|
dc->MacSetCGContext(pageContext) ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacCarbonPrinterDC::EndPage( wxPrinterDC* dc )
|
void wxMacCarbonPrinterDC::EndPage( wxPrinterDC* dc )
|
||||||
@@ -245,6 +246,9 @@ void wxMacCarbonPrinterDC::EndPage( wxPrinterDC* dc )
|
|||||||
{
|
{
|
||||||
PMSessionEndDocument(native->m_macPrintSession);
|
PMSessionEndDocument(native->m_macPrintSession);
|
||||||
}
|
}
|
||||||
|
#if wxMAC_USE_CORE_GRAPHICS
|
||||||
|
dc->MacSetCGContext(NULL) ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacCarbonPrinterDC::GetSize( int *w , int *h) const
|
void wxMacCarbonPrinterDC::GetSize( int *w , int *h) const
|
||||||
|
Reference in New Issue
Block a user