From 4dd33aa4d5c57706c7f64f63391174954160a308 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 6 Aug 2011 14:18:32 +0200 Subject: Rewrite NRArenaItem hierarchy into C++ (bzr r10347.1.21) --- src/display/drawing-shape.cpp | 340 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 340 insertions(+) create mode 100644 src/display/drawing-shape.cpp (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp new file mode 100644 index 000000000..1a56eea9b --- /dev/null +++ b/src/display/drawing-shape.cpp @@ -0,0 +1,340 @@ +/** + * @file + * @brief Shape (styled path) belonging to an SVG drawing + *//* + * Authors: + * Krzysztof Kosiński + * + * Copyright (C) 2011 Authors + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include +#include <2geom/curves.h> +#include <2geom/pathvector.h> +#include <2geom/svg-path.h> +#include <2geom/svg-path-parser.h> + +#include "display/cairo-utils.h" +#include "display/canvas-arena.h" +#include "display/canvas-bpath.h" +#include "display/curve.h" +#include "display/drawing-context.h" +#include "display/drawing-group.h" +#include "display/drawing-shape.h" +#include "display/nr-arena.h" +#include "helper/geom-curves.h" +#include "helper/geom.h" +#include "libnr/nr-convert2geom.h" +#include "preferences.h" +#include "style.h" +#include "svg/svg.h" + +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(); +} + +void +DrawingShape::setPath(SPCurve *curve) +{ + _markForRendering(); + + if (_curve) { + _curve->unref(); + _curve = NULL; + } + if (curve) { + _curve = curve; + curve->ref(); + } + + _markForUpdate(STATE_ALL, false); +} + +void +DrawingShape::setStyle(SPStyle *style) +{ + _setStyleCommon(_style, style); + _nrstyle.set(style); +} + +void +DrawingShape::setPaintBox(Geom::Rect const &box) +{ + _paintbox = box; + _markForUpdate(STATE_ALL, false); +} + +unsigned +DrawingShape::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, unsigned flags, unsigned reset) +{ + Geom::OptRect boundingbox; + + unsigned beststate = STATE_ALL; + + // update markers + for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { + i->update(area, ctx, flags, reset); + } + + if (!(flags & STATE_RENDER)) { + /* We do not have to create rendering structures */ + if (flags & STATE_BBOX) { + if (_curve) { + boundingbox = bounds_exact_transformed(_curve->get_pathvector(), ctx.ctm); + if (boundingbox) { + _bbox = boundingbox->roundOutwards(); + } else { + _bbox = Geom::OptIntRect(); + } + } + if (beststate & STATE_BBOX) { + for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { + _bbox.unionWith(i->geometricBounds()); + } + } + } + return (flags | _state); + } + + boundingbox = Geom::OptRect(); + bool outline = (_drawing->rendermode == RENDERMODE_OUTLINE); + + // clear Cairo data to force update + _nrstyle.update(); + + if (_curve) { + boundingbox = bounds_exact_transformed(_curve->get_pathvector(), ctx.ctm); + + if (boundingbox && (_nrstyle.stroke.type != NRStyle::PAINT_NONE || outline)) { + float width, scale; + scale = ctx.ctm.descrim(); + width = std::max(0.125f, _nrstyle.stroke_width * scale); + if ( fabs(_nrstyle.stroke_width * scale) > 0.01 ) { // FIXME: this is always true + boundingbox->expandBy(width); + } + // those pesky miters, now + float miterMax = width * _nrstyle.miter_limit; + if ( miterMax > 0.01 ) { + // grunt mode. we should compute the various miters instead + // (one for each point on the curve) + boundingbox->expandBy(miterMax); + } + } + } + + _bbox = boundingbox ? boundingbox->roundOutwards() : Geom::OptIntRect(); + + if (!_curve || + !_style || + _curve->is_empty() || + (( _nrstyle.fill.type != NRStyle::PAINT_NONE ) && + ( _nrstyle.stroke.type != NRStyle::PAINT_NONE && !outline) )) + { + return STATE_ALL; + } + + if (beststate & STATE_BBOX) { + for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { + _bbox.unionWith(i->geometricBounds()); + } + } + + return STATE_ALL; +} + +void +DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigned flags) +{ + if (!_curve || !_style) return; + if (!area.intersects(_bbox)) return; // skip if not within bounding box + + bool outline = (_drawing->rendermode == RENDERMODE_OUTLINE); + + if (outline) { + guint32 rgba = _drawing->outlinecolor; + + { Inkscape::DrawingContext::Save save(ct); + ct.transform(_ctm); + ct.path(_curve->get_pathvector()); + } + { Inkscape::DrawingContext::Save save(ct); + ct.setSource(rgba); + ct.setLineWidth(0.5); + ct.setTolerance(1.25); + ct.stroke(); + } + } else { + bool has_stroke, has_fill; + // we assume the context has no path + Inkscape::DrawingContext::Save save(ct); + ct.transform(_ctm); + + // update fill and stroke paints. + // this cannot be done during nr_arena_shape_update, because we need a Cairo context + // to render svg:pattern + has_fill = _nrstyle.prepareFill(ct, _paintbox); + has_stroke = _nrstyle.prepareStroke(ct, _paintbox); + has_stroke &= (_nrstyle.stroke_width != 0); + + if (has_fill || has_stroke) { + // TODO: remove segments outside of bbox when no dashes present + ct.path(_curve->get_pathvector()); + if (has_fill) { + _nrstyle.applyFill(ct); + ct.fillPreserve(); + } + if (has_stroke) { + _nrstyle.applyStroke(ct); + ct.strokePreserve(); + } + ct.newPath(); // clear path + } // has fill or stroke pattern + } + + // marker rendering + for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { + i->render(ct, area, flags); + } +} + +void +DrawingShape::_clipItem(DrawingContext &ct, Geom::IntRect const &area) +{ + if (!_curve) return; + + Inkscape::DrawingContext::Save save(ct); + // handle clip-rule + if (_style) { + if (_style->clip_rule.computed == SP_WIND_RULE_EVENODD) { + ct.setFillRule(CAIRO_FILL_RULE_EVEN_ODD); + } else { + ct.setFillRule(CAIRO_FILL_RULE_WINDING); + } + } + ct.transform(_ctm); + ct.path(_curve->get_pathvector()); + ct.fill(); +} + +DrawingItem * +DrawingShape::_pickItem(Geom::Point const &p, double delta) +{ + if (_repick_after > 0) + --_repick_after; + + if (_repick_after > 0) // we are a slow, huge path. skip this pick, returning what was returned last time + return _last_pick; + + if (!_curve) return NULL; + if (!_style) return NULL; + + bool outline = (_drawing->rendermode == RENDERMODE_OUTLINE); + + if (SP_SCALE24_TO_FLOAT(_style->opacity.value) == 0 && !outline) + // fully transparent, no pick unless outline mode + return NULL; + + GTimeVal tstart, tfinish; + g_get_current_time (&tstart); + + double width; + if (outline) { + width = 0.5; + } else if (_nrstyle.stroke.type != NRStyle::PAINT_NONE && _nrstyle.stroke.opacity > 1e-3) { + float const scale = _ctm.descrim(); + width = std::max(0.125f, _nrstyle.stroke_width * scale) / 2; + } else { + width = 0; + } + + double dist = Geom::infinity(); + int wind = 0; + bool needfill = (_nrstyle.fill.type != NRStyle::PAINT_NONE + && _nrstyle.fill.opacity > 1e-3 && !outline); + + if (_drawing->canvasarena) { + Geom::Rect viewbox = _drawing->canvasarena->item.canvas->getViewbox(); + viewbox.expandBy (width); + pathv_matrix_point_bbox_wind_distance(_curve->get_pathvector(), _ctm, p, NULL, needfill? &wind : NULL, &dist, 0.5, &viewbox); + } else { + pathv_matrix_point_bbox_wind_distance(_curve->get_pathvector(), _ctm, p, NULL, needfill? &wind : NULL, &dist, 0.5, NULL); + } + + g_get_current_time (&tfinish); + glong this_pick = (tfinish.tv_sec - tstart.tv_sec) * 1000000 + (tfinish.tv_usec - tstart.tv_usec); + //g_print ("pick time %lu\n", this_pick); + + if (this_pick > 10000) { // slow picking, remember to skip several new picks + _repick_after = this_pick / 5000; + } + + // covered by fill? + if (needfill) { + if (!_style->fill_rule.computed) { + if (wind != 0) { + _last_pick = this; + return this; + } + } else { + if (wind & 0x1) { + _last_pick = this; + return this; + } + } + } + + // close to the edge, as defined by strokewidth and delta? + // this ignores dashing (as if the stroke is solid) and always works as if caps are round + if (needfill || width > 0) { // if either fill or stroke visible, + if ((dist - width) < delta) { + _last_pick = this; + return this; + } + } + + // if not picked on the shape itself, try its markers + for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { + DrawingItem *ret = i->pick(p, delta, false); + if (ret) { + _last_pick = this; + return this; + } + } + + _last_pick = NULL; + return NULL; +} + +bool +DrawingShape::_canClip() +{ + return true; +} + +} // end namespace Inkscape + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : -- cgit v1.2.3 From 42c8636a2c5814746c41f1452ffa7df99cf21367 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 6 Aug 2011 15:38:28 +0200 Subject: Document things figured out during the rewriting (bzr r10347.1.22) --- src/display/drawing-shape.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 1a56eea9b..602aa2515 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -232,13 +232,13 @@ DrawingShape::_clipItem(DrawingContext &ct, Geom::IntRect const &area) } DrawingItem * -DrawingShape::_pickItem(Geom::Point const &p, double delta) +DrawingShape::_pickItem(Geom::Point const &p, double delta, bool /*sticky*/) { if (_repick_after > 0) --_repick_after; - if (_repick_after > 0) // we are a slow, huge path. skip this pick, returning what was returned last time - return _last_pick; + if (_repick_after > 0) // we are a slow, huge path + return _last_pick; // skip this pick, returning what was returned last time if (!_curve) return NULL; if (!_style) return NULL; -- cgit v1.2.3 From 75976ea07dba9b97186667524d0a76603de416af Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sun, 7 Aug 2011 12:53:12 +0200 Subject: Rewrite NRArena -> Inkscape::Drawing. Call render and update methods on the Drawing rather than on the root DrawingItem. (bzr r10347.1.25) --- src/display/drawing-shape.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 602aa2515..1e41bf5dd 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -19,10 +19,10 @@ #include "display/canvas-arena.h" #include "display/canvas-bpath.h" #include "display/curve.h" +#include "display/drawing.h" #include "display/drawing-context.h" #include "display/drawing-group.h" #include "display/drawing-shape.h" -#include "display/nr-arena.h" #include "helper/geom-curves.h" #include "helper/geom.h" #include "libnr/nr-convert2geom.h" @@ -32,7 +32,7 @@ namespace Inkscape { -DrawingShape::DrawingShape(Drawing *drawing) +DrawingShape::DrawingShape(Drawing &drawing) : DrawingItem(drawing) , _curve(NULL) , _style(NULL) @@ -112,7 +112,7 @@ DrawingShape::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, u } boundingbox = Geom::OptRect(); - bool outline = (_drawing->rendermode == RENDERMODE_OUTLINE); + bool outline = _drawing.outline(); // clear Cairo data to force update _nrstyle.update(); @@ -163,10 +163,10 @@ DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigne if (!_curve || !_style) return; if (!area.intersects(_bbox)) return; // skip if not within bounding box - bool outline = (_drawing->rendermode == RENDERMODE_OUTLINE); + bool outline = _drawing.outline(); if (outline) { - guint32 rgba = _drawing->outlinecolor; + guint32 rgba = _drawing.outlinecolor; { Inkscape::DrawingContext::Save save(ct); ct.transform(_ctm); @@ -243,7 +243,7 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, bool /*sticky*/) if (!_curve) return NULL; if (!_style) return NULL; - bool outline = (_drawing->rendermode == RENDERMODE_OUTLINE); + bool outline = _drawing.outline(); if (SP_SCALE24_TO_FLOAT(_style->opacity.value) == 0 && !outline) // fully transparent, no pick unless outline mode @@ -267,8 +267,8 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, bool /*sticky*/) bool needfill = (_nrstyle.fill.type != NRStyle::PAINT_NONE && _nrstyle.fill.opacity > 1e-3 && !outline); - if (_drawing->canvasarena) { - Geom::Rect viewbox = _drawing->canvasarena->item.canvas->getViewbox(); + if (_drawing.arena()) { + Geom::Rect viewbox = _drawing.arena()->item.canvas->getViewbox(); viewbox.expandBy (width); pathv_matrix_point_bbox_wind_distance(_curve->get_pathvector(), _ctm, p, NULL, needfill? &wind : NULL, &dist, 0.5, &viewbox); } else { -- cgit v1.2.3 From caa510445fc091c63e1ca0ff8f44f2e81ae0638d Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 13 Aug 2011 20:30:30 +0200 Subject: More generic handling of child type in DrawingItem. Fix clip object selection bug (LP #365458). Fixed bugs: - https://launchpad.net/bugs/365458 (bzr r10347.1.31) --- src/display/drawing-shape.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 1e41bf5dd..b333b50f8 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -232,7 +232,7 @@ DrawingShape::_clipItem(DrawingContext &ct, Geom::IntRect const &area) } DrawingItem * -DrawingShape::_pickItem(Geom::Point const &p, double delta, bool /*sticky*/) +DrawingShape::_pickItem(Geom::Point const &p, double delta, unsigned flags) { if (_repick_after > 0) --_repick_after; @@ -264,8 +264,9 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, bool /*sticky*/) double dist = Geom::infinity(); int wind = 0; - bool needfill = (_nrstyle.fill.type != NRStyle::PAINT_NONE + bool needfill = (flags & PICK_AS_CLIP) || (_nrstyle.fill.type != NRStyle::PAINT_NONE && _nrstyle.fill.opacity > 1e-3 && !outline); + bool wind_evenodd = (flags & PICK_AS_CLIP) ? (_style->clip_rule.computed == SP_WIND_RULE_EVENODD) : (_style->fill_rule.computed == SP_WIND_RULE_EVENODD); if (_drawing.arena()) { Geom::Rect viewbox = _drawing.arena()->item.canvas->getViewbox(); @@ -285,13 +286,13 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, bool /*sticky*/) // covered by fill? if (needfill) { - if (!_style->fill_rule.computed) { - if (wind != 0) { + if (wind_evenodd) { + if (wind & 0x1) { _last_pick = this; return this; } } else { - if (wind & 0x1) { + if (wind != 0) { _last_pick = this; return this; } @@ -309,7 +310,7 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, bool /*sticky*/) // if not picked on the shape itself, try its markers for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { - DrawingItem *ret = i->pick(p, delta, false); + DrawingItem *ret = i->pick(p, delta, flags & ~PICK_STICKY); if (ret) { _last_pick = this; return this; -- cgit v1.2.3 From 01913a7cb9e1f9190fd3f9d2d047cbb88b9aa4ff Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sun, 14 Aug 2011 09:08:30 +0200 Subject: Correctly invalidate cache of objects with background-accessing filters (bzr r10347.1.32) --- src/display/drawing-shape.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index b333b50f8..1b201927f 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -244,8 +244,9 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, unsigned flags) if (!_style) return NULL; bool outline = _drawing.outline(); + bool pick_as_clip = flags & PICK_AS_CLIP; - if (SP_SCALE24_TO_FLOAT(_style->opacity.value) == 0 && !outline) + if (SP_SCALE24_TO_FLOAT(_style->opacity.value) == 0 && !outline && !pick_as_clip) // fully transparent, no pick unless outline mode return NULL; @@ -253,9 +254,14 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, unsigned flags) g_get_current_time (&tstart); double width; - if (outline) { - width = 0.5; + if (pick_as_clip) { + width = 0; // no width should be applied to clip picking + // this overrides display mode and stroke style considerations + } else if (outline) { + width = 0.5; // in outline mode, everything is stroked with the same 0.5px line width } else if (_nrstyle.stroke.type != NRStyle::PAINT_NONE && _nrstyle.stroke.opacity > 1e-3) { + // for normal picking calculate the distance corresponding top the stroke width + // FIXME BUG: this is incorrect for transformed strokes float const scale = _ctm.descrim(); width = std::max(0.125f, _nrstyle.stroke_width * scale) / 2; } else { @@ -264,10 +270,12 @@ DrawingShape::_pickItem(Geom::Point const &p, double delta, unsigned flags) double dist = Geom::infinity(); int wind = 0; - bool needfill = (flags & PICK_AS_CLIP) || (_nrstyle.fill.type != NRStyle::PAINT_NONE - && _nrstyle.fill.opacity > 1e-3 && !outline); - bool wind_evenodd = (flags & PICK_AS_CLIP) ? (_style->clip_rule.computed == SP_WIND_RULE_EVENODD) : (_style->fill_rule.computed == SP_WIND_RULE_EVENODD); + bool needfill = pick_as_clip || (_nrstyle.fill.type != NRStyle::PAINT_NONE && + _nrstyle.fill.opacity > 1e-3 && !outline); + bool wind_evenodd = pick_as_clip ? (_style->clip_rule.computed == SP_WIND_RULE_EVENODD) : + (_style->fill_rule.computed == SP_WIND_RULE_EVENODD); + // actual shape picking if (_drawing.arena()) { Geom::Rect viewbox = _drawing.arena()->item.canvas->getViewbox(); viewbox.expandBy (width); -- cgit v1.2.3 From 0fc028f7050c91bfdb1a50ba8cb6462b2bf03d57 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sun, 21 Aug 2011 17:33:09 +0200 Subject: Filter background rendering now matches the SVG specification. (bzr r10347.1.37) --- src/display/drawing-shape.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 1b201927f..cd7b9150d 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -157,11 +157,11 @@ DrawingShape::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, u return STATE_ALL; } -void -DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigned flags) +unsigned +DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigned flags, DrawingItem *stop_at) { - if (!_curve || !_style) return; - if (!area.intersects(_bbox)) return; // skip if not within bounding box + if (!_curve || !_style) return RENDER_OK; + if (!area.intersects(_bbox)) return RENDER_OK; // skip if not within bounding box bool outline = _drawing.outline(); @@ -208,8 +208,9 @@ DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigne // marker rendering for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { - i->render(ct, area, flags); + i->render(ct, area, flags, stop_at); } + return RENDER_OK; } void -- cgit v1.2.3 From abe953dc63948d78532c0541a56e664dc386810a Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Thu, 25 Aug 2011 19:39:31 +0200 Subject: Remove duplicate bbox data from DrawingShape (bzr r10347.1.38) --- src/display/drawing-shape.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index cd7b9150d..ac0ff2ccb 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -72,13 +72,6 @@ DrawingShape::setStyle(SPStyle *style) _nrstyle.set(style); } -void -DrawingShape::setPaintBox(Geom::Rect const &box) -{ - _paintbox = box; - _markForUpdate(STATE_ALL, false); -} - unsigned DrawingShape::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, unsigned flags, unsigned reset) { @@ -187,8 +180,8 @@ DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigne // update fill and stroke paints. // this cannot be done during nr_arena_shape_update, because we need a Cairo context // to render svg:pattern - has_fill = _nrstyle.prepareFill(ct, _paintbox); - has_stroke = _nrstyle.prepareStroke(ct, _paintbox); + has_fill = _nrstyle.prepareFill(ct, _item_bbox); + has_stroke = _nrstyle.prepareStroke(ct, _item_bbox); has_stroke &= (_nrstyle.stroke_width != 0); if (has_fill || has_stroke) { -- cgit v1.2.3 From d6af1140ee108cc7d7fb6e0ba89ff7e30bb7ad3a Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 27 Aug 2011 18:05:32 +0200 Subject: Completely remove NRRect, NRRectL, in-svg-plane.h (bzr r10582.1.6) --- src/display/drawing-shape.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index ac0ff2ccb..6e28c0184 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -25,7 +25,6 @@ #include "display/drawing-shape.h" #include "helper/geom-curves.h" #include "helper/geom.h" -#include "libnr/nr-convert2geom.h" #include "preferences.h" #include "style.h" #include "svg/svg.h" -- cgit v1.2.3 From 122894f12a4f8214207f533ed26569fbab5ac9f7 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 2 Oct 2011 01:26:17 -0700 Subject: Warning cleanup. (bzr r10655) --- src/display/drawing-shape.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 6e28c0184..93a4846e0 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -205,8 +205,7 @@ DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigne return RENDER_OK; } -void -DrawingShape::_clipItem(DrawingContext &ct, Geom::IntRect const &area) +void DrawingShape::_clipItem(DrawingContext &ct, Geom::IntRect const & /*area*/) { if (!_curve) return; -- cgit v1.2.3 From b0c0eed3b05e20673469dc7b70cf3a92a42429b2 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 2 Oct 2011 01:34:59 -0700 Subject: Removing redundant doxygen @brief tag. (bzr r10656) --- src/display/drawing-shape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/display/drawing-shape.cpp') diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 93a4846e0..4ca306092 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -1,6 +1,6 @@ /** * @file - * @brief Shape (styled path) belonging to an SVG drawing + * Shape (styled path) belonging to an SVG drawing. *//* * Authors: * Krzysztof Kosiński -- cgit v1.2.3