summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-shape.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-01-21 23:33:24 +0000
committerJabiertxof <jtx@jtx>2017-01-21 23:33:24 +0000
commiteeb5405c1b2734322ca9ed506e8a8e16a87c2a4f (patch)
tree5f98cdb1ee5633b69ec1f5c21d0d5e69f8770ad2 /src/display/drawing-shape.cpp
parentOrganize doeffect function (diff)
parentFix "swap fill and stroke" for multiple objects in selection (diff)
downloadinkscape-eeb5405c1b2734322ca9ed506e8a8e16a87c2a4f.tar.gz
inkscape-eeb5405c1b2734322ca9ed506e8a8e16a87c2a4f.zip
Update to trunk
(bzr r13645.1.165)
Diffstat (limited to 'src/display/drawing-shape.cpp')
-rw-r--r--src/display/drawing-shape.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp
index 63efb3c0d..d7329e670 100644
--- a/src/display/drawing-shape.cpp
+++ b/src/display/drawing-shape.cpp
@@ -180,6 +180,10 @@ DrawingShape::_renderStroke(DrawingContext &dc)
if( has_stroke ) {
// TODO: remove segments outside of bbox when no dashes present
dc.path(_curve->get_pathvector());
+ if (_style && _style->vector_effect.computed == SP_VECTOR_EFFECT_NON_SCALING_STROKE) {
+ dc.restore();
+ dc.save();
+ }
_nrstyle.applyStroke(dc);
dc.strokePreserve();
dc.newPath(); // clear path
@@ -231,20 +235,24 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne
Inkscape::DrawingContext::Save save(dc);
dc.transform(_ctm);
+
// update fill and stroke paints.
// this cannot be done during nr_arena_shape_update, because we need a Cairo context
// to render svg:pattern
bool has_fill = _nrstyle.prepareFill(dc, _item_bbox, _fill_pattern);
bool has_stroke = _nrstyle.prepareStroke(dc, _item_bbox, _stroke_pattern);
has_stroke &= (_nrstyle.stroke_width != 0);
-
if (has_fill || has_stroke) {
- // TODO: remove segments outside of bbox when no dashes present
dc.path(_curve->get_pathvector());
+ // TODO: remove segments outside of bbox when no dashes present
if (has_fill) {
_nrstyle.applyFill(dc);
dc.fillPreserve();
}
+ if (_style && _style->vector_effect.computed == SP_VECTOR_EFFECT_NON_SCALING_STROKE) {
+ dc.restore();
+ dc.save();
+ }
if (has_stroke) {
_nrstyle.applyStroke(dc);
dc.strokePreserve();