summaryrefslogtreecommitdiffstats
path: root/src/2geom
diff options
context:
space:
mode:
Diffstat (limited to 'src/2geom')
-rw-r--r--src/2geom/!PLEASE DON'T MAKE CHANGES IN THESE FILES.README14
-rw-r--r--src/2geom/CMakeLists.txt3
-rw-r--r--src/2geom/convex-cover.cpp2
-rw-r--r--src/2geom/path-intersection.cpp2
-rw-r--r--src/2geom/solve-bezier-parametric.cpp12
5 files changed, 17 insertions, 16 deletions
diff --git a/src/2geom/!PLEASE DON'T MAKE CHANGES IN THESE FILES.README b/src/2geom/!PLEASE DON'T MAKE CHANGES IN THESE FILES.README
index fdb2212ae..9e4585078 100644
--- a/src/2geom/!PLEASE DON'T MAKE CHANGES IN THESE FILES.README
+++ b/src/2geom/!PLEASE DON'T MAKE CHANGES IN THESE FILES.README
@@ -1,8 +1,8 @@
-All code files in this directory are *direct* copies of the files in 2geom's svn.
-If you want to change the code, please change it in 2geom, then copy the files here.
-Otherwise, I will probably miss that you changed something in Inkscape's copy, and
-destroy your changes by copying 2geom's files over it during the next time I update
-Inkscape's copy of 2geom.
- - Johan Engelen
-
+All code files in this directory are *direct* copies of the files in 2geom's svn.
+If you want to change the code, please change it in 2geom, then copy the files here.
+Otherwise, I will probably miss that you changed something in Inkscape's copy, and
+destroy your changes by copying 2geom's files over it during the next time I update
+Inkscape's copy of 2geom.
+ - Johan Engelen
+
2geom's SVN = https://lib2geom.svn.sourceforge.net/svnroot/lib2geom/lib2geom/trunk \ No newline at end of file
diff --git a/src/2geom/CMakeLists.txt b/src/2geom/CMakeLists.txt
index c04718e79..bc3f64bdc 100644
--- a/src/2geom/CMakeLists.txt
+++ b/src/2geom/CMakeLists.txt
@@ -46,6 +46,9 @@ set(2geom_SRC
transforms.cpp
utils.cpp
+
+ # -------
+ # Headers
affine.h
angle.h
basic-intersection.h
diff --git a/src/2geom/convex-cover.cpp b/src/2geom/convex-cover.cpp
index 21a5c3107..d50accadf 100644
--- a/src/2geom/convex-cover.cpp
+++ b/src/2geom/convex-cover.cpp
@@ -145,7 +145,7 @@ ConvexHull::graham_scan() {
double o = SignedTriangleArea(boundary[stac-2],
boundary[stac-1],
boundary[i]);
- if(o == 0) { // colinear - dangerous...
+ if(fabs(o) < 1e-8) { // colinear - dangerous...
stac--;
} else if(o < 0) { // anticlockwise
} else { // remove concavity
diff --git a/src/2geom/path-intersection.cpp b/src/2geom/path-intersection.cpp
index 58ee6232b..7aa662abb 100644
--- a/src/2geom/path-intersection.cpp
+++ b/src/2geom/path-intersection.cpp
@@ -228,8 +228,6 @@ intersect_polish_f (const gsl_vector * x, void *params,
static void
intersect_polish_root (Curve const &A, double &s,
Curve const &B, double &t) {
- int status;
- size_t iter = 0;
std::vector<Point> as, bs;
as = A.pointAndDerivatives(s, 2);
bs = B.pointAndDerivatives(t, 2);
diff --git a/src/2geom/solve-bezier-parametric.cpp b/src/2geom/solve-bezier-parametric.cpp
index 76cf65e17..437f073a3 100644
--- a/src/2geom/solve-bezier-parametric.cpp
+++ b/src/2geom/solve-bezier-parametric.cpp
@@ -68,13 +68,13 @@ find_parametric_bezier_roots(Geom::Point const *w, /* The control points */
break;
}
- /* Otherwise, solve recursively after subdividing control polygon */
- Geom::Point Left[degree+1], /* New left and right */
- Right[degree+1]; /* control polygons */
- Bezier(w, degree, 0.5, Left, Right);
+ // Otherwise, solve recursively after subdividing control polygon
+ std::vector<Geom::Point> Left(degree + 1); // New left and right
+ std::vector<Geom::Point> Right(degree + 1); // control polygons
+ Bezier(w, degree, 0.5, &Left[0], &Right[0]);
total_subs ++;
- find_parametric_bezier_roots(Left, degree, solutions, depth+1);
- find_parametric_bezier_roots(Right, degree, solutions, depth+1);
+ find_parametric_bezier_roots(&Left[0], degree, solutions, depth + 1);
+ find_parametric_bezier_roots(&Right[0], degree, solutions, depth + 1);
}