summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-03-29 12:02:12 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-03-29 12:02:12 +0100
commit662b3b77621c5e9648439f958a37bfd5de1110a2 (patch)
treed9ba76d1511e4ef9db6b6df3afc01cb93c49c630 /canvas
parent8ed148f64afee06a3b0c82e73af430d4d54b3485 (diff)
build against old cairos (with warning)
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index b3ae649b9512..5de2d4ccf789 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -788,7 +788,12 @@ namespace cairocanvas
else if ( aTexture.RepeatModeX == rendering::TexturingMode::CLAMP &&
aTexture.RepeatModeY == rendering::TexturingMode::CLAMP )
{
+#if CAIRO_VERSION >= 10200
cairo_pattern_set_extend( pPattern, CAIRO_EXTEND_PAD );
+#else
+#warning "fallback for cairo before version 1.2"
+ cairo_pattern_set_extend( pPattern, CAIRO_EXTEND_NONE );
+#endif
}
aScaledTextureMatrix.x0 = basegfx::fround( aScaledTextureMatrix.x0 );
@@ -1396,7 +1401,9 @@ namespace cairocanvas
::rtl::math::approxEqual( aMatrix.x0, 0 ) &&
::rtl::math::approxEqual( aMatrix.y0, 0 ) )
cairo_set_operator( mpCairo.get(), CAIRO_OPERATOR_SOURCE );
+#if CAIRO_VERSION >= 10200
cairo_pattern_set_extend( cairo_get_source(mpCairo.get()), CAIRO_EXTEND_PAD );
+#endif
cairo_rectangle( mpCairo.get(), 0, 0, aBitmapSize.Width, aBitmapSize.Height );
cairo_clip( mpCairo.get() );