summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ea2d465)
raw | patch | inline | side by side (parent: ea2d465)
author | Michael Wybrow <mjwybrow@users.sf.net> | |
Tue, 26 Oct 2010 02:00:27 +0000 (13:00 +1100) | ||
committer | Michael Wybrow <mjwybrow@users.sf.net> | |
Tue, 26 Oct 2010 02:00:27 +0000 (13:00 +1100) |
src/conn-avoid-ref.cpp | patch | blob | history |
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp
index a918f8745903f3dfeea95cb9fdc9593de80647f4..fe25fa418f5ad29b1f9179ee1eda0fa5ab35af9c 100644 (file)
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
#include "libavoid/router.h"
#include "libavoid/connector.h"
#include "libavoid/geomtypes.h"
+#include "libavoid/shape.h"
#include "xml/node.h"
#include "document.h"
#include "desktop.h"
g_assert(item);
Geom::Point pos;
const Geom::Matrix& transform = sp_item_i2doc_affine(item);
- // TODO investigate why this was asking for the active desktop:
- SPDesktop *desktop = inkscape_active_desktop();
if ( type == ConnPointDefault )
{
{
Geom::Path::const_iterator cit = pit->begin();
while (cit != pit->end())
+ {
+ if (cit == pit->begin())
+ {
+ poly_points.push_back(cit->initialPoint());
+ }
+
if (dynamic_cast<Geom::CubicBezier const*>(&*cit))
{
at += seg_size;
poly_points.push_back(cit->finalPoint());
++cit;
}
+ }
++pit;
}
return poly_points;
prev_parallel_hull_edge.origin(hull_edge.origin()+hull_edge.versor().ccw()*spacing);
prev_parallel_hull_edge.versor(hull_edge.versor());
int hull_size = hull.boundary.size();
- for (int i = 0; i <= hull_size; ++i)
+ for (int i = 0; i < hull_size; ++i)
{
hull_edge.setBy2Points(hull[i], hull[i+1]);
Geom::Line parallel_hull_edge;