summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuki Hoshino <hoshiyuki1964@gmail.com>2018-08-08 13:50:59 +0000
committerYuki Hoshino <hoshiyuki1964@gmail.com>2018-08-30 11:31:02 +0000
commitbaebd77a5c5f942120cdc14880b08f0363c46964 (patch)
treefbb27570ab3f4a5fcface41d081668cadf7d668a /src
parentfix for comment https://gitlab.com/inkscape/inkscape/commit/a12d0aecffa31fa7b... (diff)
downloadinkscape-baebd77a5c5f942120cdc14880b08f0363c46964.tar.gz
inkscape-baebd77a5c5f942120cdc14880b08f0363c46964.zip
Fix bug #167900
https://bugs.launchpad.net/inkscape/+bug/167900 - Tiled imported bitmap textures have errors, also exported By the default extend mode CAIRO_EXTEND_NONE, draw white on a pattern image edge with CAIRO_FILTER_GOOD. Draw an image with CAIRO_EXTEND_PAD.
Diffstat (limited to 'src')
-rw-r--r--src/display/drawing-context.h1
-rw-r--r--src/display/drawing-image.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/display/drawing-context.h b/src/display/drawing-context.h
index b0e99bbdf..8587fbf66 100644
--- a/src/display/drawing-context.h
+++ b/src/display/drawing-context.h
@@ -113,6 +113,7 @@ public:
void patternSetFilter(cairo_filter_t filter) {
cairo_pattern_set_filter(cairo_get_source(_ct), filter);
}
+ void patternSetExtend(cairo_extend_t extend) { cairo_pattern_set_extend(cairo_get_source(_ct), extend); }
Geom::Rect targetLogicalBounds() const;
diff --git a/src/display/drawing-image.cpp b/src/display/drawing-image.cpp
index 2a3777e36..3d3a54bd3 100644
--- a/src/display/drawing-image.cpp
+++ b/src/display/drawing-image.cpp
@@ -111,6 +111,7 @@ unsigned DrawingImage::_renderItem(DrawingContext &dc, Geom::IntRect const &/*ar
dc.translate(_origin);
dc.scale(_scale);
dc.setSource(_pixbuf->getSurfaceRaw(), 0, 0);
+ dc.patternSetExtend(CAIRO_EXTEND_PAD);
if (_style) {
// See: http://www.w3.org/TR/SVG/painting.html#ImageRenderingProperty