summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-item.cpp
diff options
context:
space:
mode:
authorAlvin Penner <penner@vaxxine.com>2012-12-09 16:53:12 +0000
committerapenner <penner@vaxxine.com>2012-12-09 16:53:12 +0000
commit775dd4552f125326bfbb8873433972f6c37adc9e (patch)
tree2b38f482059b513891df2fa9bb5b2d5c7d736aff /src/display/drawing-item.cpp
parentSecond attempt at fix for #955141, rasterization of clipped/masked objects in... (diff)
downloadinkscape-775dd4552f125326bfbb8873433972f6c37adc9e.tar.gz
inkscape-775dd4552f125326bfbb8873433972f6c37adc9e.zip
stacked clip paths. patch by Ted Janeczko for Bug 1067271
Fixed bugs: - https://launchpad.net/bugs/1067271 (bzr r11943)
Diffstat (limited to 'src/display/drawing-item.cpp')
-rw-r--r--src/display/drawing-item.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp
index 0fb1f0018..1e6e44d6f 100644
--- a/src/display/drawing-item.cpp
+++ b/src/display/drawing-item.cpp
@@ -667,29 +667,24 @@ DrawingItem::clip(Inkscape::DrawingContext &ct, Geom::IntRect const &area)
if (!_visible) return;
if (!area.intersects(_bbox)) return;
- // The item used as the clipping path itself has a clipping path.
- // Render this item's clipping path onto a temporary surface, then composite it
- // with the item using the IN operator
- if (_clip) {
- ct.pushAlphaGroup();
- { Inkscape::DrawingContext::Save save(ct);
- ct.setSource(0,0,0,1);
- _clip->clip(ct, area);
- }
- ct.pushAlphaGroup();
- }
-
+ ct.setSource(0,0,0,1);
+ ct.pushGroup();
// rasterize the clipping path
_clipItem(ct, area);
-
if (_clip) {
+ // The item used as the clipping path itself has a clipping path.
+ // Render this item's clipping path onto a temporary surface, then composite it
+ // with the item using the IN operator
+ ct.pushGroup();
+ _clip->clip(ct, area);
ct.popGroupToSource();
ct.setOperator(CAIRO_OPERATOR_IN);
ct.paint();
- ct.popGroupToSource();
- ct.setOperator(CAIRO_OPERATOR_SOURCE);
- ct.paint();
}
+ ct.popGroupToSource();
+ ct.setOperator(CAIRO_OPERATOR_OVER);
+ ct.paint();
+ ct.setSource(0,0,0,0);
}
/**