summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-05-01 09:16:33 +0000
committertavmjong-free <tavmjong@free.fr>2014-05-01 09:16:33 +0000
commit5cd0a6e6d8f397d3cfd56868d1ebe74ab7c6d583 (patch)
treeea18b40389ff96f4899e7e6c1fa427a966986007 /src
parentStyle rewrite: more buglets squashed (thanks Johan). (diff)
downloadinkscape-5cd0a6e6d8f397d3cfd56868d1ebe74ab7c6d583.tar.gz
inkscape-5cd0a6e6d8f397d3cfd56868d1ebe74ab7c6d583.zip
Enable support for 'paint-order', rendering only.
(bzr r13329)
Diffstat (limited to 'src')
-rw-r--r--src/display/drawing-shape.cpp7
-rw-r--r--src/display/drawing-text.cpp9
2 files changed, 4 insertions, 12 deletions
diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp
index 92d71fad3..1a41bdb3a 100644
--- a/src/display/drawing-shape.cpp
+++ b/src/display/drawing-shape.cpp
@@ -149,7 +149,6 @@ DrawingShape::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, u
return STATE_ALL;
}
-#ifdef WITH_SVG2
void
DrawingShape::_renderFill(DrawingContext &dc)
{
@@ -183,7 +182,6 @@ DrawingShape::_renderStroke(DrawingContext &dc)
dc.newPath(); // clear path
}
}
-#endif
void
DrawingShape::_renderMarkers(DrawingContext &dc, Geom::IntRect const &area, unsigned flags, DrawingItem *stop_at)
@@ -222,10 +220,9 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne
}
-#ifdef WITH_SVG2
if( _nrstyle.paint_order_layer[0] == NRStyle::PAINT_ORDER_NORMAL ) {
// This is the most common case, special case so we don't call get_pathvector(), etc. twice
-#endif
+
{
// we assume the context has no path
Inkscape::DrawingContext::Save save(dc);
@@ -255,7 +252,6 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne
_renderMarkers(dc, area, flags, stop_at);
return RENDER_OK;
-#ifdef WITH_SVG2
}
// Handle different paint orders
@@ -276,7 +272,6 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne
}
}
return RENDER_OK;
-#endif
}
void DrawingShape::_clipItem(DrawingContext &dc, Geom::IntRect const & /*area*/)
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp
index a280e221a..4178cb1d8 100644
--- a/src/display/drawing-text.cpp
+++ b/src/display/drawing-text.cpp
@@ -451,7 +451,6 @@ unsigned DrawingText::_renderItem(DrawingContext &dc, Geom::IntRect const &/*are
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 ||
@@ -461,22 +460,20 @@ unsigned DrawingText::_renderItem(DrawingContext &dc, Geom::IntRect const &/*are
} // 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();
}
+
if (has_stroke) {
_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