diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-05-05 08:45:33 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-05-05 08:45:33 +0000 |
| commit | e3d114cbca503194d41fc8edb86848ea03074089 (patch) | |
| tree | 0019498d47ccb79f7a6f447b8a0f468372006bb7 /src/display | |
| parent | adding VinÃcius work whith node tips (diff) | |
| parent | Documentation. Elements of design tutorial update ((not fully translated); Up... (diff) | |
| download | inkscape-e3d114cbca503194d41fc8edb86848ea03074089.tar.gz inkscape-e3d114cbca503194d41fc8edb86848ea03074089.zip | |
update to trunk
(bzr r11950.1.340)
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/canvas-arena.cpp | 2 | ||||
| -rw-r--r-- | src/display/drawing-item.cpp | 11 | ||||
| -rw-r--r-- | src/display/drawing-shape.cpp | 7 | ||||
| -rw-r--r-- | src/display/drawing-shape.h | 2 | ||||
| -rw-r--r-- | src/display/drawing-text.cpp | 9 | ||||
| -rw-r--r-- | src/display/nr-style.cpp | 4 | ||||
| -rw-r--r-- | src/display/nr-style.h | 2 |
7 files changed, 7 insertions, 30 deletions
diff --git a/src/display/canvas-arena.cpp b/src/display/canvas-arena.cpp index 404a94828..25d35fc6b 100644 --- a/src/display/canvas-arena.cpp +++ b/src/display/canvas-arena.cpp @@ -227,7 +227,7 @@ sp_canvas_arena_point (SPCanvasItem *item, Geom::Point p, SPCanvasItem **actual_ { SPCanvasArena *arena = SP_CANVAS_ARENA (item); - arena->drawing.update(Geom::IntRect::infinite(), arena->ctx, DrawingItem::STATE_PICK); + arena->drawing.update(Geom::IntRect::infinite(), arena->ctx, DrawingItem::STATE_PICK | DrawingItem::STATE_BBOX); DrawingItem *picked = arena->drawing.pick(p, arena->drawing.delta, arena->sticky); arena->picked = picked; diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp index ccf905e81..0bfb00b62 100644 --- a/src/display/drawing-item.cpp +++ b/src/display/drawing-item.cpp @@ -23,7 +23,6 @@ namespace Inkscape { -#ifdef WITH_CSSBLEND void set_cairo_blend_operator( DrawingContext &dc, unsigned blend_mode ) { // All of the blend modes are implemented in Cairo as of 1.10. @@ -81,7 +80,6 @@ void set_cairo_blend_operator( DrawingContext &dc, unsigned blend_mode ) { break; } } -#endif /** * @class DrawingItem @@ -409,7 +407,7 @@ DrawingItem::setItemBounds(Geom::OptRect const &bounds) * @param reset State fields that should be reset before processing them. This is * a means to force a recomputation of internal data even if the item * considers it up to date. Mainly for internal use, such as - * propagating bunding box recomputation to children when the item's + * propagating bounding box recomputation to children when the item's * transform changes. */ void @@ -594,9 +592,8 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag if (_cached) { if (_cache) { _cache->prepare(); -#ifdef WITH_CSSBLEND set_cairo_blend_operator( dc, _blend_mode ); -#endif + _cache->paintFromCache(dc, carea); if (!carea) return RENDER_OK; } else { @@ -625,10 +622,8 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag nir |= (_filter != NULL && render_filters); // 3. it has a filter nir |= needs_opacity; // 4. it is non-opaque nir |= (_cache != NULL); // 5. it is cached -#ifdef WITH_CSSBLEND nir |= (_blend_mode != SP_CSS_BLEND_NORMAL); // 6. Blend mode not normal nir |= (_isolation == SP_CSS_ISOLATION_ISOLATE); // 7. Explicit isolatiom -#endif /* How the rendering is done. * @@ -740,9 +735,7 @@ DrawingItem::render(DrawingContext &dc, Geom::IntRect const &area, unsigned flag } dc.rectangle(*carea); dc.setSource(&intermediate); -#ifdef WITH_CSSBLEND set_cairo_blend_operator( dc, _blend_mode ); -#endif dc.fill(); dc.setSource(0,0,0,0); // the call above is to clear a ref on the intermediate surface held by dc 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-shape.h b/src/display/drawing-shape.h index f37de9ce7..9d93a642f 100644 --- a/src/display/drawing-shape.h +++ b/src/display/drawing-shape.h @@ -39,10 +39,8 @@ protected: virtual DrawingItem *_pickItem(Geom::Point const &p, double delta, unsigned flags); virtual bool _canClip(); -#ifdef WITH_SVG2 void _renderFill(DrawingContext &dc); void _renderStroke(DrawingContext &dc); -#endif void _renderMarkers(DrawingContext &dc, Geom::IntRect const &area, unsigned flags, DrawingItem *stop_at); 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 diff --git a/src/display/nr-style.cpp b/src/display/nr-style.cpp index 3d2d36483..09a28e63c 100644 --- a/src/display/nr-style.cpp +++ b/src/display/nr-style.cpp @@ -69,9 +69,7 @@ NRStyle::NRStyle() , line_through_position(0) , font_size(0) { -#ifdef WITH_SVG2 paint_order_layer[0] = PAINT_ORDER_NORMAL; -#endif } NRStyle::~NRStyle() @@ -165,7 +163,6 @@ void NRStyle::set(SPStyle *style) } -#ifdef WITH_SVG2 for( unsigned i = 0; i < PAINT_ORDER_LAYERS; ++i) { switch (style->paint_order.layer[i]) { case SP_CSS_PAINT_ORDER_NORMAL: @@ -182,7 +179,6 @@ void NRStyle::set(SPStyle *style) break; } } -#endif text_decoration_line = TEXT_DECORATION_LINE_CLEAR; if(style->text_decoration_line.inherit ){ text_decoration_line |= TEXT_DECORATION_LINE_INHERIT; } diff --git a/src/display/nr-style.h b/src/display/nr-style.h index 8b5a0ee3d..ca880c00b 100644 --- a/src/display/nr-style.h +++ b/src/display/nr-style.h @@ -68,7 +68,6 @@ struct NRStyle { cairo_pattern_t *fill_pattern; cairo_pattern_t *stroke_pattern; -#ifdef WITH_SVG2 enum PaintOrderType { PAINT_ORDER_NORMAL, PAINT_ORDER_FILL, @@ -78,7 +77,6 @@ struct NRStyle { static const size_t PAINT_ORDER_LAYERS = 3; PaintOrderType paint_order_layer[PAINT_ORDER_LAYERS]; -#endif #define TEXT_DECORATION_LINE_CLEAR 0x00 #define TEXT_DECORATION_LINE_SET 0x01 |
