summaryrefslogtreecommitdiffstats
path: root/src/sp-pattern.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2012-12-09 15:39:53 +0000
committertavmjong-free <tavmjong@free.fr>2012-12-09 15:39:53 +0000
commita5db129462657ccdc1cea0f3319f5f812e0a8c40 (patch)
treedcff53f6fa27f0bfc30afe98e1b256f32f3ba712 /src/sp-pattern.cpp
parentnoop: Added some comments, rearranged some lines to make code easier to follow. (diff)
downloadinkscape-a5db129462657ccdc1cea0f3319f5f812e0a8c40.tar.gz
inkscape-a5db129462657ccdc1cea0f3319f5f812e0a8c40.zip
Second attempt at fix for #955141, rasterization of clipped/masked objects in patterns.
(bzr r11942)
Diffstat (limited to 'src/sp-pattern.cpp')
-rw-r--r--src/sp-pattern.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp
index ba171bb05..137864101 100644
--- a/src/sp-pattern.cpp
+++ b/src/sp-pattern.cpp
@@ -695,7 +695,7 @@ sp_pattern_create_pattern(SPPaintServer *ps,
// the scaling component from the complete matrix and use it
// to find the optimum tile size for rendering
// c is number of pixels in buffer x and y.
- Geom::Point c(pattern_tile.dimensions()*vb2ps.descrim()*ps2user.descrim()*full.descrim()*2);
+ Geom::Point c(pattern_tile.dimensions()*vb2ps.descrim()*ps2user.descrim()*full.descrim()*1.1);
c[Geom::X] = ceil(c[Geom::X]);
c[Geom::Y] = ceil(c[Geom::Y]);
@@ -705,6 +705,7 @@ sp_pattern_create_pattern(SPPaintServer *ps,
Inkscape::DrawingSurface pattern_surface(pattern_tile, c.ceil());
Inkscape::DrawingContext ct(pattern_surface);
+ pattern_tile *= pattern_surface.drawingTransform();
Geom::IntRect one_tile = pattern_tile.roundOutwards();
// render pattern.
@@ -714,8 +715,8 @@ sp_pattern_create_pattern(SPPaintServer *ps,
// TODO: make sure there are no leaks.
Inkscape::UpdateContext ctx; // UpdateContext is structure with only ctm!
- ctx.ctm = vb2ps;// * full;
-
+ ctx.ctm = vb2ps * pattern_surface.drawingTransform();
+ ct.transform( pattern_surface.drawingTransform().inverse() );
drawing.update(Geom::IntRect::infinite(), ctx);
// Render drawing to pattern_surface via drawing context, this calls root->render