]> granicus.if.org Git - graphviz/commitdiff
remove unused Rectangle {x|y}Border
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Jun 2021 18:59:04 +0000 (11:59 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 30 Jun 2021 04:28:45 +0000 (21:28 -0700)
lib/vpsc/CMakeLists.txt
lib/vpsc/Makefile.am
lib/vpsc/generate-constraints.h
lib/vpsc/remove_rectangle_overlap.cpp [deleted file]
lib/vpsc/vpsc.vcxproj
lib/vpsc/vpsc.vcxproj.filters

index 5cdea446adb13727a950addfacfac811e7ec39b8..5fb917bcadfede7598d3b513cb5b9292db76c90e 100644 (file)
@@ -19,7 +19,6 @@ add_library(vpsc STATIC
     csolve_VPSC.cpp
     generate-constraints.cpp
     pairingheap/PairingHeap.cpp
-    remove_rectangle_overlap.cpp
     solve_VPSC.cpp
     variable.cpp
 )
index 92ab2559c982d08278ff705d02ddf85b0371c077..f00b70604855d239b1f5635edb07109096d98b7b 100644 (file)
@@ -14,7 +14,7 @@ noinst_HEADERS = \
 
 libvpsc_C_la_SOURCES = \
        block.cpp blocks.cpp constraint.cpp generate-constraints.cpp \
-       pairingheap/PairingHeap.cpp remove_rectangle_overlap.cpp \
+       pairingheap/PairingHeap.cpp \
        solve_VPSC.cpp csolve_VPSC.cpp variable.cpp
 
 EXTRA_DIST = vpsc.vcxproj*
index 0b326c4bb74497fbeb87c34548ce0af3ec91f53c..fef98a2063f20e0c64e04b48c416657ac0a931d7 100644 (file)
 class Rectangle {      
        friend std::ostream& operator <<(std::ostream &os, const Rectangle &r);
 public:
-       static double xBorder,yBorder;
        Rectangle(double x, double X, double y, double Y);
-       double getMaxX() const { return maxX+xBorder; }
-       double getMaxY() const { return maxY+yBorder; }
+       double getMaxX() const { return maxX; }
+       double getMaxY() const { return maxY; }
        double getMinX() const { return minX; }
        double getMinY() const { return minY; }
        double getMinD(unsigned const d) const {
@@ -38,8 +37,6 @@ public:
        double getCentreY() const { return minY+height()/2.0; }
        double width() const { return getMaxX()-minX; }
        double height() const { return getMaxY()-minY; }
-       static void setXBorder(double x) {xBorder=x;}
-       static void setYBorder(double y) {yBorder=y;}
        void moveCentreX(double x) {
                moveMinX(x-width()/2.0);
        }
@@ -47,11 +44,11 @@ public:
                moveMinY(y-height()/2.0);
        }
        void moveMinX(double x) {
-               maxX=x+width()-xBorder;
+               maxX=x+width();
                minX=x;
        }
        void moveMinY(double y) {
-               maxY=y+height()-yBorder;
+               maxY=y+height();
                minY=y;
        }
        double overlapX(const Rectangle &r) const {
diff --git a/lib/vpsc/remove_rectangle_overlap.cpp b/lib/vpsc/remove_rectangle_overlap.cpp
deleted file mode 100644 (file)
index 8dc74ca..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * \brief remove overlaps between a set of rectangles.
- *
- * Authors:
- *   Tim Dwyer <tgdwyer@gmail.com>
- *
- * Copyright (C) 2005 Authors
- *
- * This version is released under the CPL (Common Public License) with
- * the Graphviz distribution.
- * A version is also available under the LGPL as part of the Adaptagrams
- * project: https://github.com/mjwybrow/adaptagrams.  
- * If you make improvements or bug fixes to this code it would be much
- * appreciated if you could also contribute those changes back to the
- * Adaptagrams repository.
- */
-
-#include <iostream>
-#include <cassert>
-#include <vpsc/generate-constraints.h>
-#include <vpsc/solve_VPSC.h>
-#include <vpsc/variable.h>
-#include <vpsc/constraint.h>
-#include <fstream>
-#include <vpsc/blocks.h>
-#include <vector>
-using std::ios;
-using std::ofstream;
-
-#ifndef RECTANGLE_OVERLAP_LOGGING
-       #define RECTANGLE_OVERLAP_LOGGING 0
-#endif
-
-#define EXTRA_GAP 0.0001
-
-double Rectangle::xBorder=0;
-double Rectangle::yBorder=0;
index 93bbb5fa5e5726133e20301e86e8c4e1fefb36ce..94e298a5eee028f3b46def6aa0e9597cdfca5530 100644 (file)
@@ -93,7 +93,6 @@
     <ClCompile Include="csolve_VPSC.cpp" />
     <ClCompile Include="generate-constraints.cpp" />
     <ClCompile Include="pairingheap\PairingHeap.cpp" />
-    <ClCompile Include="remove_rectangle_overlap.cpp" />
     <ClCompile Include="solve_VPSC.cpp" />
     <ClCompile Include="variable.cpp" />
   </ItemGroup>
index 6503c66e77476ee7f0347110b36065b0f11d93e6..f37f17e170d08a063db970182df1f3a4c10ef649 100644 (file)
@@ -62,9 +62,6 @@
     <ClCompile Include="pairingheap\PairingHeap.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="remove_rectangle_overlap.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="solve_VPSC.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>