summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-item.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
commit7ec903c9898f872dbd9426ed7a62e1969fdb7be7 (patch)
treea306139e829118a83516af02279c9eafd3440eaa /src/display/drawing-item.cpp
parentHershey Text: whitespace; py: docstring, modeline; inx: fix attribute value (diff)
parentTranslations.Spanish translation update by Lucas Vieites. (diff)
downloadinkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.tar.gz
inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.zip
merge from trunk (r11955)
(bzr r11687.1.3)
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);
}
/**