From b25a6a4bb6fb50db15ea00d5fe814a7128d6e961 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 19 Sep 2014 23:28:43 +0000 Subject: [PATCH] I'm not totally sure when they were added, but the cairo_image_surface_get_[width|height] functions are not available in cairo 1.10.2. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/graphicc.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 7a380f23d0..e6ff423693 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -1328,8 +1328,12 @@ wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, cairo_surfac m_surface = bitmap; m_pattern = cairo_pattern_create_for_surface(m_surface); - m_width = cairo_image_surface_get_width(m_surface); - m_height = cairo_image_surface_get_height(m_surface); +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,11,0) + if ( cairo_version() >= CAIRO_VERSION_ENCODE(1, 11, 0) ) + m_width = cairo_image_surface_get_width(m_surface); + m_height = cairo_image_surface_get_height(m_surface); + } +#endif m_buffer = NULL; }