diff options
Diffstat (limited to 'src/display/drawing-shape.cpp')
| -rw-r--r-- | src/display/drawing-shape.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 63efb3c0d..ba95a63ce 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 @@ -213,7 +217,7 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne } { Inkscape::DrawingContext::Save save(dc); dc.setSource(rgba); - dc.setLineWidth(0.5); + dc.setLineWidth(5); dc.setTolerance(0.5); dc.stroke(); } @@ -230,6 +234,8 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne // we assume the context has no path Inkscape::DrawingContext::Save save(dc); dc.transform(_ctm); + dc.path(_curve->get_pathvector()); + // update fill and stroke paints. // this cannot be done during nr_arena_shape_update, because we need a Cairo context @@ -237,14 +243,16 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne 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()); 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(); |
