summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-bounding-box.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/live_effects/lpe-bounding-box.cpp')
-rw-r--r--src/live_effects/lpe-bounding-box.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/live_effects/lpe-bounding-box.cpp b/src/live_effects/lpe-bounding-box.cpp
index 43a60d482..c83d7e3bc 100644
--- a/src/live_effects/lpe-bounding-box.cpp
+++ b/src/live_effects/lpe-bounding-box.cpp
@@ -3,18 +3,14 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-
-#include <glibmm/i18n.h>
-
#include "live_effects/lpe-bounding-box.h"
#include "display/curve.h"
-#include "sp-item.h"
-#include "2geom/path.h"
#include "sp-shape.h"
#include "sp-text.h"
-#include "2geom/bezier-curve.h"
-#include "lpe-bounding-box.h"
+// TODO due to internal breakage in glibmm headers, this must be last:
+#include <glibmm/i18n.h>
+
namespace Inkscape {
namespace LivePathEffect {
@@ -24,8 +20,8 @@ LPEBoundingBox::LPEBoundingBox(LivePathEffectObject *lpeobject) :
linked_path(_("Linked path:"), _("Path from which to take the original path data"), "linkedpath", &wr, this),
visual_bounds(_("Visual Bounds"), _("Uses the visual bounding box"), "visualbounds", &wr, this)
{
- registerParameter( dynamic_cast<Parameter *>(&linked_path) );
- registerParameter( dynamic_cast<Parameter *>(&visual_bounds) );
+ registerParameter(&linked_path);
+ registerParameter(&visual_bounds);
//perceived_path = true;
}
@@ -45,6 +41,7 @@ void LPEBoundingBox::doEffect (SPCurve * curve)
p.appendNew<Geom::LineSegment>(Geom::Point(bbox->right(), bbox->bottom()));
p.appendNew<Geom::LineSegment>(Geom::Point(bbox->left(), bbox->bottom()));
p.appendNew<Geom::LineSegment>(Geom::Point(bbox->left(), bbox->top()));
+ p.close();
Geom::PathVector out;
out.push_back(p);
curve->set_pathvector(out);