Warn if wxCairoContext(wxPrinterDC) ctor is not implemented
Use an explicit #warning to explain the problem. This is more informative and avoids errors when building with -Werror (but also -Wno-error=cpp).
This commit is contained in:
@@ -1917,9 +1917,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC&
|
|||||||
// Since we switched from MM_ANISOTROPIC to MM_TEXT mapping mode
|
// Since we switched from MM_ANISOTROPIC to MM_TEXT mapping mode
|
||||||
// we have to apply rescaled DC's device origin to Cairo context.
|
// we have to apply rescaled DC's device origin to Cairo context.
|
||||||
ApplyTransformFromDC(dc, Apply_scaled_dev_origin);
|
ApplyTransformFromDC(dc, Apply_scaled_dev_origin);
|
||||||
#endif // __WXMSW__
|
#elif defined(__WXGTK20__)
|
||||||
|
|
||||||
#ifdef __WXGTK20__
|
|
||||||
const wxDCImpl *impl = dc.GetImpl();
|
const wxDCImpl *impl = dc.GetImpl();
|
||||||
cairo_t* cr = static_cast<cairo_t*>(impl->GetCairoContext());
|
cairo_t* cr = static_cast<cairo_t*>(impl->GetCairoContext());
|
||||||
Init(cr ? cairo_reference(cr) : NULL);
|
Init(cr ? cairo_reference(cr) : NULL);
|
||||||
@@ -1930,6 +1928,9 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC&
|
|||||||
|
|
||||||
// Transfer transformation settings from source DC to Cairo context.
|
// Transfer transformation settings from source DC to Cairo context.
|
||||||
ApplyTransformFromDC(dc);
|
ApplyTransformFromDC(dc);
|
||||||
|
#else
|
||||||
|
#warning "Constructing wxCairoContext from wxPrinterDC not implemented."
|
||||||
|
wxUnusedVar(dc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user