diff options
| author | Sylvain Chiron <chironsylvain@orange.fr> | 2017-07-01 11:36:41 +0000 |
|---|---|---|
| committer | Sylvain Chiron <chironsylvain@orange.fr> | 2017-07-01 11:36:41 +0000 |
| commit | fd733201b82f39655488a286c89142f321ef9dc9 (patch) | |
| tree | a12c70f213414f69467f666619b1552103f6370e /src/libavoid/tests/inlineoverlap01.cpp | |
| parent | Hackfest icon work: restore selected menu icons and make theming easier (diff) | |
| download | inkscape-fd733201b82f39655488a286c89142f321ef9dc9.tar.gz inkscape-fd733201b82f39655488a286c89142f321ef9dc9.zip | |
Updated libs from the Adaptagrams project: libavoid, libcola and libvspc; changed the code to match the new API
Signed-off-by: Sylvain Chiron <chironsylvain@orange.fr>
Diffstat (limited to '')
| -rw-r--r-- | src/libavoid/tests/inlineoverlap01.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libavoid/tests/inlineoverlap01.cpp b/src/libavoid/tests/inlineoverlap01.cpp new file mode 100644 index 000000000..ff4a3090f --- /dev/null +++ b/src/libavoid/tests/inlineoverlap01.cpp @@ -0,0 +1,25 @@ +#include "libavoid/libavoid.h" +using namespace Avoid; +int main(void) { + Router *router = new Router(OrthogonalRouting); + router->setRoutingPenalty(segmentPenalty); + router->setRoutingPenalty(fixedSharedPathPenalty); + router->setRoutingParameter(idealNudgingDistance, 20); + Rectangle rect335855988(Point(51140, 50190), Point(51510, 50885)); + new ShapeRef(router, rect335855988, 335855988); + Rectangle rect548374163(Point(51915, 50415), Point(52285, 50885)); + new ShapeRef(router, rect548374163, 548374163); + Rectangle rect942733064(Point(51771, 50790), Point(51829, 50885)); + new ShapeRef(router, rect942733064, 942733064); + ConnEnd srcPt100850179(Point(51925, 50800), 4); + ConnEnd dstPt100850179(Point(51500, 50650), 8); + new ConnRef(router, srcPt100850179, dstPt100850179, 100850179); + ConnEnd srcPt240732432(Point(51925, 50650), 4); + ConnEnd dstPt240732432(Point(51800, 50800), 1); + new ConnRef(router, srcPt240732432, dstPt240732432, 240732432); + router->processTransaction(); + router->outputDiagram("output/inlineoverlap01"); + bool overlap = router->existsOrthogonalTouchingPaths(); + delete router; + return (overlap) ? 1 : 0; +}; |
