From 61f4ad6f7569805e50488d4af92756b310c51246 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 16 Dec 2014 17:45:03 +0100 Subject: Code rearrangement to make it clearer what is happening. (bzr r13803) --- src/display/drawing-shape.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 66160638f..5bdc7a323 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -34,15 +34,12 @@ namespace Inkscape { DrawingShape::DrawingShape(Drawing &drawing) : DrawingItem(drawing) , _curve(NULL) - , _style(NULL) , _last_pick(NULL) , _repick_after(0) {} DrawingShape::~DrawingShape() { - if (_style) - sp_style_unref(_style); if (_curve) _curve->unref(); } @@ -67,8 +64,8 @@ DrawingShape::setPath(SPCurve *curve) void DrawingShape::setStyle(SPStyle *style) { - _setStyleCommon(_style, style); _nrstyle.set(style); + DrawingItem::setStyle(style); } unsigned -- cgit v1.2.3 From b6d303d11e572d8888d29c44e11d06d256821a03 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 21 Dec 2014 15:29:02 +0100 Subject: Implement rendering for 'context-fill' and 'context-stroke' (text not handled yet). (bzr r13807) --- src/display/drawing-shape.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 5bdc7a323..63efb3c0d 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -62,10 +62,17 @@ DrawingShape::setPath(SPCurve *curve) } void -DrawingShape::setStyle(SPStyle *style) +DrawingShape::setStyle(SPStyle *style, SPStyle *context_style) { - _nrstyle.set(style); - DrawingItem::setStyle(style); + DrawingItem::setStyle(style, context_style); // Must be first + _nrstyle.set(_style, _context_style); +} + +void +DrawingShape::setChildrenStyle(SPStyle* context_style) +{ + DrawingItem::setChildrenStyle( context_style ); + _nrstyle.set(_style, _context_style); } unsigned @@ -142,7 +149,6 @@ DrawingShape::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, u _bbox.unionWith(i->geometricBounds()); } } - return STATE_ALL; } -- cgit v1.2.3