summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fbe3351)
raw | patch | inline | side by side (parent: fbe3351)
author | mjwybrow <mjwybrow@users.sourceforge.net> | |
Tue, 24 Jan 2006 05:54:19 +0000 (05:54 +0000) | ||
committer | mjwybrow <mjwybrow@users.sourceforge.net> | |
Tue, 24 Jan 2006 05:54:19 +0000 (05:54 +0000) |
src/libavoid/shape.cpp, src/libavoid/graph.cpp,
src/libavoid/incremental.cpp, src/libavoid/incremental.h,
src/libavoid/static.cpp, src/libavoid/visibility.cpp,
src/libavoid/makepath.cpp:
Some minor upstream libavoid fixes.
src/libavoid/incremental.cpp, src/libavoid/incremental.h,
src/libavoid/static.cpp, src/libavoid/visibility.cpp,
src/libavoid/makepath.cpp:
Some minor upstream libavoid fixes.
diff --git a/ChangeLog b/ChangeLog
index 18df22f3fd8673595a2979cf31b446dd3da65a84..438f94fde54e7559401d6c24f49111c7c83d522b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2006-01-24 Michael Wybrow <mjwybrow@users.sourceforge.net>
+
+ * src/libavoid/connector.cpp, src/libavoid/connector.h,
+ src/libavoid/shape.cpp, src/libavoid/graph.cpp,
+ src/libavoid/incremental.cpp, src/libavoid/incremental.h,
+ src/libavoid/static.cpp, src/libavoid/visibility.cpp,
+ src/libavoid/makepath.cpp:
+
+ Some minor upstream libavoid fixes.
+
2006-01-23 Carl Hetherington <inkscape@carlh.net>
* src/selection.cpp: fix a typo in one of my previous commits.
src/sp-namedview.h, src/attributes.cpp, src/attributes.h,
src/attributes-test.cpp:
- Added a "Spacing" control to the connector toolbar which allows
- the user to adjust the amount of space left around avoided shapes
- for the purpose of determining auto-routing connector paths.
+ Added a "Spacing" control to the connector toolbar which allows
+ the user to adjust the amount of space left around avoided shapes
+ for the purpose of determining auto-routing connector paths.
2006-01-17 Marco Scholten <mscholtn@xs4all.nl>
index cde387c5b5be6443193aa6c2516b8acc8461df13..87009541593c4b8a65be7071e0fd8ad84d05d027 100644 (file)
ConnRefList connRefs;
-ConnRef::ConnRef(const uint id)
+ConnRef::ConnRef(const unsigned int id)
: _id(id)
, _needs_reroute_flag(true)
, _false_path(false)
}
-ConnRef::ConnRef(const uint id, const Point& src, const Point& dst)
+ConnRef::ConnRef(const unsigned int id, const Point& src, const Point& dst)
: _id(id)
, _needs_reroute_flag(true)
, _false_path(false)
}
}
-void ConnRef::updateEndPoint(const uint type, const Point& point)
+void ConnRef::updateEndPoint(const unsigned int type, const Point& point)
{
- assert((type == (uint) VertID::src) || (type == (uint) VertID::tar));
+ assert((type == (unsigned int) VertID::src) ||
+ (type == (unsigned int) VertID::tar));
//assert(IncludeEndpoints);
+ if (!_initialised)
+ {
+ makeActive();
+ _initialised = true;
+ }
+
VertInf *altered = NULL;
VertInf *partner = NULL;
bool isShape = false;
- if (type == (uint) VertID::src)
+ if (type == (unsigned int) VertID::src)
{
if (_srcVert)
{
altered = _srcVert;
partner = _dstVert;
}
- else // if (type == (uint) VertID::dst)
+ else // if (type == (unsigned int) VertID::dst)
{
if (_dstVert)
{
_false_path = false;
_needs_reroute_flag = false;
-
+
VertInf *src = _srcVert;
VertInf *tar = _dstVert;
-
+
if (!IncludeEndpoints)
{
lateSetup(p0, p1);
index 6abb01d497e67fdd070b0753b2dd37a18a66cd2d..71713ae414ac61552d5d0b7012b2c1269160eaa5 100644 (file)
--- a/src/libavoid/connector.h
+++ b/src/libavoid/connector.h
namespace Avoid {
-typedef unsigned int uint;
-
class ConnRef;
typedef std::list<ConnRef *> ConnRefList;
class ConnRef
{
public:
- ConnRef(const uint id);
- ConnRef(const uint id, const Point& src, const Point& dst);
+ ConnRef(const unsigned int id);
+ ConnRef(const unsigned int id, const Point& src, const Point& dst);
~ConnRef();
PolyLine& route(void);
void moveRoute(const int& diff_x, const int& diff_y);
void freeRoute(void);
void calcRouteDist(void);
- void updateEndPoint(const uint type, const Point& point);
+ void updateEndPoint(const unsigned int type, const Point& point);
void makeActive(void);
void makeInactive(void);
void lateSetup(const Point& src, const Point& dst);
friend void markConnectors(ShapeRef *shape);
private:
- uint _id;
+ unsigned int _id;
bool _needs_reroute_flag;
bool _false_path;
bool _active;
diff --git a/src/libavoid/graph.cpp b/src/libavoid/graph.cpp
index 9b1d602bea2cd4b875363289f265cec1c73c2bf4..05b59a79d71b0bc06f3e084fe167ea3f7c96ad5c 100644 (file)
--- a/src/libavoid/graph.cpp
+++ b/src/libavoid/graph.cpp
VertID kID = k->id;
if ((ss.find(kID.objID) != ss.end()))
{
- uint shapeID = kID.objID;
+ unsigned int shapeID = kID.objID;
db_printf("Endpoint is inside shape %u so ignore shape edges.\n",
kID.objID);
// One of the endpoints is inside this shape so ignore it.
fprintf(fp, "\nVisibility Graph info:\n");
fprintf(fp, "----------------------\n");
- uint currshape = 0;
+ unsigned int currshape = 0;
int st_shapes = 0;
int st_vertices = 0;
int st_endpoints = 0;
index 3830c70ee91fe2aeca2bb2c5c61adf75f8687aab..f7d48ac70a55efa4cc8fd502617625bbbdd2ff3e 100644 (file)
void addShape(ShapeRef *shape)
{
- uint pid = shape->id();
+ unsigned int pid = shape->id();
Polygn poly = shape->poly();
adjustContainsWithAdd(poly, pid);
void delShape(ShapeRef *shape)
{
- uint pid = shape->id();
+ unsigned int pid = shape->id();
// o Remove entries related to this shape's vertices
shape->removeFromGraph();
}
-ShapeRef *moveShape(ShapeRef *oldShape, Polygn *newPoly)
+ShapeRef *moveShape(ShapeRef *oldShape, Polygn *newPoly, const bool first_move)
{
- uint pid = oldShape->id();
+ unsigned int pid = oldShape->id();
// o Remove entries related to this shape's vertices
oldShape->removeFromGraph();
- if (SelectiveReroute && !(PartialFeedback && PartialTime))
+ if (SelectiveReroute && (!(PartialFeedback && PartialTime) || first_move))
{
markConnectors(oldShape);
}
index 50ef8f7dc374169740dc50e9142e6aa38c566e89..6bc69a6a79179954adf66f502a3d2bcc84c949d3 100644 (file)
extern void addShape(ShapeRef *shape);
extern void delShape(ShapeRef *shape);
-extern ShapeRef *moveShape(ShapeRef *oldShape, Polygn *newPoly);
+extern ShapeRef *moveShape(ShapeRef *oldShape, Polygn *newPoly,
+ const bool first_move = false);
}
index 776ffd307e681ec2c113121192a36dbdfa4914f6..37b4f18018f4bb3e55aaf6e3a468beb02cc77fb2 100644 (file)
// each other. This is true if we are here.
if (!IncludeEndpoints && InvisibilityGrph)
{
+ if (!directEdge)
+ {
+ directEdge = new EdgeInf(src, tar);
+ }
directEdge->addBlocker(0);
}
diff --git a/src/libavoid/shape.cpp b/src/libavoid/shape.cpp
index b08e75f3ea4b1b7832abdef31bf03c67257a70e8..43195080183e19c5a1365f9a51b7509e95ef5a1c 100644 (file)
--- a/src/libavoid/shape.cpp
+++ b/src/libavoid/shape.cpp
ShapeRefList shapeRefs;
-ShapeRef::ShapeRef(uint id, Polygn& ply)
+ShapeRef::ShapeRef(unsigned int id, Polygn& ply)
: _id(id)
, _poly(copyPoly(ply))
, _active(false)
}
-uint ShapeRef::id(void)
+unsigned int ShapeRef::id(void)
{
return _id;
}
index d424a2e7f5ac9d94b20a375f206c73fda8c80889..72d3e3b079097a73d328d682b1c4ca417ee9d87c 100644 (file)
--- a/src/libavoid/static.cpp
+++ b/src/libavoid/static.cpp
{
for (int poly_i = 0; poly_i < n_obs; poly_i++)
{
- uint id = obs[poly_i]->id;
+ unsigned int id = obs[poly_i]->id;
new ShapeRef(id, *(obs[poly_i]));
}
index e13656f5f8995b55bf0c66f8cbd1ffab6d25fc1b..84e38037d2531f8a8fa3b13931ac622d2b841e58 100644 (file)
VertID kID = k->id;
if (!(centerID.isShape) && (ss.find(kID.objID) != ss.end()))
{
- uint shapeID = kID.objID;
+ unsigned int shapeID = kID.objID;
db_printf("Center is inside shape %u so ignore shape edges.\n",
shapeID);
// One of the endpoints is inside this shape so ignore it.