diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2014-02-18 21:07:03 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2014-02-18 21:07:03 +0000 |
| commit | acbf8ef832c0891fde2935911968e52a02516c37 (patch) | |
| tree | e9d65aca909e86e343c227f0b729e9a01ce5c12d /src | |
| parent | Copy 'paint-order' property data for Cairo rendering. (diff) | |
| download | inkscape-acbf8ef832c0891fde2935911968e52a02516c37.tar.gz inkscape-acbf8ef832c0891fde2935911968e52a02516c37.zip | |
Implement 'paint-order' for text.
(bzr r13039)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/drawing-text.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp index f5a0f0af5..a280e221a 100644 --- a/src/display/drawing-text.cpp +++ b/src/display/drawing-text.cpp @@ -450,7 +450,20 @@ unsigned DrawingText::_renderItem(DrawingContext &dc, Geom::IntRect const &/*are // we need to apply this object's ctm again Inkscape::DrawingContext::Save save(dc); dc.transform(_ctm); + +#ifdef WITH_SVG2 + // Text doesn't have markers, we can do paint-order quick and dirty. + bool fill_first = false; + if( _nrstyle.paint_order_layer[0] == NRStyle::PAINT_ORDER_NORMAL || + _nrstyle.paint_order_layer[0] == NRStyle::PAINT_ORDER_FILL || + _nrstyle.paint_order_layer[2] == NRStyle::PAINT_ORDER_STROKE ) { + fill_first = true; + } // Won't get "stroke fill stroke" but that isn't 'valid' + + if (has_fill && fill_first) { +#else if (has_fill) { +#endif _nrstyle.applyFill(dc); dc.fillPreserve(); } @@ -458,6 +471,12 @@ unsigned DrawingText::_renderItem(DrawingContext &dc, Geom::IntRect const &/*are _nrstyle.applyStroke(dc); dc.strokePreserve(); } +#ifdef WITH_SVG2 + if (has_fill && !fill_first) { + _nrstyle.applyFill(dc); + dc.fillPreserve(); + } +#endif dc.newPath(); // clear path // draw text decoration |
