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-text.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/display/drawing-text.cpp') diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp index afe661b2e..58305477b 100644 --- a/src/display/drawing-text.cpp +++ b/src/display/drawing-text.cpp @@ -55,6 +55,13 @@ DrawingGlyphs::setGlyph(font_instance *font, int glyph, Geom::Affine const &tran _markForUpdate(STATE_ALL, false); } +void +DrawingGlyphs::setStyle(SPStyle *style) +{ + std::cerr << "DrawingGlyphs: Use parent style" << std::endl; +} + + unsigned DrawingGlyphs::_updateItem(Geom::IntRect const &/*area*/, UpdateContext const &ctx, unsigned /*flags*/, unsigned /*reset*/) { DrawingText *ggroup = dynamic_cast(_parent); -- 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-text.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/display/drawing-text.cpp') diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp index 58305477b..e20a7ff2a 100644 --- a/src/display/drawing-text.cpp +++ b/src/display/drawing-text.cpp @@ -56,7 +56,7 @@ DrawingGlyphs::setGlyph(font_instance *font, int glyph, Geom::Affine const &tran } void -DrawingGlyphs::setStyle(SPStyle *style) +DrawingGlyphs::setStyle(SPStyle * /*style*/, SPStyle * /*context_style*/) { std::cerr << "DrawingGlyphs: Use parent style" << std::endl; } @@ -223,10 +223,17 @@ DrawingText::addComponent(font_instance *font, int glyph, Geom::Affine const &tr } void -DrawingText::setStyle(SPStyle *style) +DrawingText::setStyle(SPStyle *style, SPStyle *context_style) { - _nrstyle.set(style); - DrawingGroup::setStyle(style); + DrawingGroup::setStyle(style, context_style); // Must be first + _nrstyle.set(_style, _context_style); +} + +void +DrawingText::setChildrenStyle(SPStyle* context_style) +{ + DrawingGroup::setChildrenStyle( context_style ); + _nrstyle.set(_style, _context_style); } unsigned -- cgit v1.2.3