diff options
| author | Marc Jeanmougin <marc.jeanmougin@telecom-paristech.fr> | 2018-04-29 14:25:32 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc.jeanmougin@telecom-paristech.fr> | 2018-04-29 14:25:32 +0000 |
| commit | ab5f8ff5869021958f4ae8b838c3d707a2e85eaa (patch) | |
| tree | 4907675828a5401d013b7587538cc8541edd2764 /src/libcola/tests/FixedRelativeConstraint01.cpp | |
| parent | moved libcroco, libuemf, libdepixelize to 3rdparty folder (diff) | |
| download | inkscape-ab5f8ff5869021958f4ae8b838c3d707a2e85eaa.tar.gz inkscape-ab5f8ff5869021958f4ae8b838c3d707a2e85eaa.zip | |
Put adaptagrams into its own folder
Diffstat (limited to 'src/libcola/tests/FixedRelativeConstraint01.cpp')
| -rwxr-xr-x | src/libcola/tests/FixedRelativeConstraint01.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/libcola/tests/FixedRelativeConstraint01.cpp b/src/libcola/tests/FixedRelativeConstraint01.cpp deleted file mode 100755 index 50c34842e..000000000 --- a/src/libcola/tests/FixedRelativeConstraint01.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include <vector> -#include "libcola/cola.h" -using namespace cola; -int main(void) { - CompoundConstraints ccs; - std::vector<Edge> es; - double defaultEdgeLength=40; - std::vector<vpsc::Rectangle*> rs; - vpsc::Rectangle *rect = NULL; - std::vector<unsigned> fixedShapes; - - double textW = 100; - double textH = 10; - double circleW = 5; - double circleH = 5; - - rect = new vpsc::Rectangle(303-circleW, 303+circleW, 300-circleH, 300+circleH); - rs.push_back(rect); - fixedShapes.push_back(rs.size() - 1); - - rect = new vpsc::Rectangle(310-circleW, 310+circleW, 302-circleH, 302+circleH); - rs.push_back(rect); - fixedShapes.push_back(rs.size() - 1); - - rect = new vpsc::Rectangle(313-circleW, 313+circleW, 297-circleH, 297+circleH); - rs.push_back(rect); - fixedShapes.push_back(rs.size() - 1); - - rect = new vpsc::Rectangle(300-textW, 300+textW, 300-textH, 300+textH); - rs.push_back(rect); - - rect = new vpsc::Rectangle(310-textW, 310+textW, 305-textH, 305+textH); - rs.push_back(rect); - - rect = new vpsc::Rectangle(317-textW, 317+textW, 295-textH, 295+textH); - rs.push_back(rect); - - ConstrainedFDLayout alg(rs, es, defaultEdgeLength); - alg.setAvoidNodeOverlaps(true); - - ccs.push_back(new FixedRelativeConstraint(rs, fixedShapes, true)); - alg.setConstraints(ccs); - - alg.makeFeasible(); - - // Can be used to output a "libcola-debug.svg" file: - //alg.outputInstanceToSVG(); - alg.freeAssociatedObjects(); - - return 0; -}; |
