make x11 dc could get cairo context, so the graphic module could use in x11. This use cairo xlib backend.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-09-23 17:44:06 +00:00
parent 3704547684
commit 51309ad50a
3 changed files with 21 additions and 0 deletions

View File

@@ -1744,6 +1744,12 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC&
#endif
#endif
#ifdef __WXX11__
cairo_t* cr = static_cast<cairo_t*>(dc.GetImpl()->GetCairoContext());
if ( cr )
Init(cairo_reference(cr));
#endif
#ifdef __WXMAC__
CGContextRef cgcontext = (CGContextRef)dc.GetWindow()->MacGetCGContextRef();
cairo_surface_t* surface = cairo_quartz_surface_create_for_cg_context(cgcontext, width, height);