Added new wxGraphicsContext:Create( wxPrinterDC ) instead of wxDC:CreateGraphicsContext
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1481,6 +1481,7 @@ public :
|
||||
|
||||
virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc);
|
||||
virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc);
|
||||
virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc);
|
||||
|
||||
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context );
|
||||
|
||||
@@ -1562,6 +1563,16 @@ wxGraphicsContext * wxCairoRenderer::CreateContext( const wxMemoryDC& dc)
|
||||
return new wxCairoContext(this,dc);
|
||||
}
|
||||
|
||||
wxGraphicsContext * wxCairoRenderer::CreateContext( const wxPrinterDC& dc)
|
||||
{
|
||||
const wxDCImpl *impl = dc.GetImpl();
|
||||
cairo_t* context = (cairo_t*) impl->GetCairoContext();
|
||||
if (context)
|
||||
return new wxCairoContext(this,context);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wxGraphicsContext * wxCairoRenderer::CreateContextFromNativeContext( void * context )
|
||||
{
|
||||
return new wxCairoContext(this,(cairo_t*)context);
|
||||
|
Reference in New Issue
Block a user