Allow using a memory dc (or a buffered dc) as the target of

a wx.GraphicsContext.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-02-26 23:28:04 +00:00
parent a927054171
commit ee059415c1

View File

@@ -2012,9 +2012,18 @@ wxGraphicsRenderer* wxGraphicsRenderer::GetDefaultRenderer()
}
wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContext( const wxWindowDC& dc)
{
wxMemoryDC* mdc = wxDynamicCast(&dc, wxMemoryDC);
if ( mdc )
{
return new wxMacCoreGraphicsContext(this,
(CGContextRef)mdc->GetGraphicsContext()->GetNativeContext());
}
else
{
return new wxMacCoreGraphicsContext(this,(CGContextRef)dc.GetWindow()->MacGetCGContextRef() );
}
}
wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContextFromNativeContext( void * context )
{