summaryrefslogtreecommitdiffstats
path: root/src/2geom
diff options
context:
space:
mode:
authorRichard White <rwhite8282@gmail.com>2016-05-19 01:17:29 +0000
committerRichard White <rwhite8282@gmail.com>2016-05-19 01:17:29 +0000
commit1fe9c2603c33fddcd9f2688b30e843f91e1a86fa (patch)
tree13289cbe033a46a40eb829437e115b5393e2ca84 /src/2geom
parentCorrected frame extension stroke and fill values on 64 bit machine. (diff)
parentGTK3: Another widget named. (diff)
downloadinkscape-1fe9c2603c33fddcd9f2688b30e843f91e1a86fa.tar.gz
inkscape-1fe9c2603c33fddcd9f2688b30e843f91e1a86fa.zip
Merge from Inkscape trunk.
(bzr r14668.1.3)
Diffstat (limited to 'src/2geom')
-rw-r--r--src/2geom/Makefile_insert1
-rw-r--r--src/2geom/path-sink.h6
-rw-r--r--src/2geom/sbasis-to-bezier.cpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/2geom/Makefile_insert b/src/2geom/Makefile_insert
index b56942caa..4d41de297 100644
--- a/src/2geom/Makefile_insert
+++ b/src/2geom/Makefile_insert
@@ -45,7 +45,6 @@
2geom/curves.h \
2geom/d2.h \
2geom/d2-sbasis.cpp \
- 2geom/d2-sbasis.h \
2geom/ellipse.cpp \
2geom/ellipse.h \
2geom/elliptical-arc.cpp \
diff --git a/src/2geom/path-sink.h b/src/2geom/path-sink.h
index 17ede18a4..3bdb00783 100644
--- a/src/2geom/path-sink.h
+++ b/src/2geom/path-sink.h
@@ -179,8 +179,10 @@ public:
}
void closePath() {
- _path.close();
- flush();
+ if (_in_path) {
+ _path.close();
+ flush();
+ }
}
void flush() {
diff --git a/src/2geom/sbasis-to-bezier.cpp b/src/2geom/sbasis-to-bezier.cpp
index 8a18cfd4a..64c07f35e 100644
--- a/src/2geom/sbasis-to-bezier.cpp
+++ b/src/2geom/sbasis-to-bezier.cpp
@@ -197,6 +197,8 @@ void sbasis_to_cubic_bezier (std::vector<Point> & bz, D2<SBasis> const& sb)
}
sbasis_to_bezier(bz, sb, 4); // zeroth-order estimate
+ if ((sb[X].size() < 3) && (sb[Y].size() < 3))
+ return; // cubic bezier estimate is exact
Geom::ConvexHull bezhull(bz);
// calculate first derivatives of x and y wrt t