allowing a clear of a graphic context, and set the pen and brush after a graphics restore
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -34,11 +34,6 @@ using namespace std ;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/mac/private.h"
|
#include "wx/mac/private.h"
|
||||||
#include <ATSUnicode.h>
|
|
||||||
#include <TextCommon.h>
|
|
||||||
#include <TextEncodingConverter.h>
|
|
||||||
#include <FixMath.h>
|
|
||||||
#include <CGContext.h>
|
|
||||||
|
|
||||||
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
|
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
|
||||||
|
|
||||||
@@ -300,9 +295,11 @@ CGContextRef wxMacCGContext::GetNativeContext()
|
|||||||
|
|
||||||
void wxMacCGContext::SetNativeContext( CGContextRef cg )
|
void wxMacCGContext::SetNativeContext( CGContextRef cg )
|
||||||
{
|
{
|
||||||
wxASSERT( m_cgContext == NULL ) ;
|
// we allow either setting or clearing but not replacing
|
||||||
|
wxASSERT( m_cgContext == NULL || cg == NULL ) ;
|
||||||
|
if ( cg )
|
||||||
|
CGContextSaveGState( cg ) ;
|
||||||
m_cgContext = cg ;
|
m_cgContext = cg ;
|
||||||
CGContextSaveGState( m_cgContext ) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacCGContext::SetPen( const wxPen &pen )
|
void wxMacCGContext::SetPen( const wxPen &pen )
|
||||||
@@ -671,8 +668,8 @@ void wxDC::DestroyClippingRegion()
|
|||||||
CGContextRef cgContext = ((wxMacCGContext*)(m_graphicContext))->GetNativeContext() ;
|
CGContextRef cgContext = ((wxMacCGContext*)(m_graphicContext))->GetNativeContext() ;
|
||||||
CGContextRestoreGState( cgContext );
|
CGContextRestoreGState( cgContext );
|
||||||
CGContextSaveGState( cgContext );
|
CGContextSaveGState( cgContext );
|
||||||
SetPen( m_pen ) ;
|
m_graphicContext->SetPen( m_pen ) ;
|
||||||
SetBrush( m_brush ) ;
|
m_graphicContext->SetBrush( m_brush ) ;
|
||||||
m_clipping = FALSE;
|
m_clipping = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user