summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Brock <zaibu@lunar-orbit.de>2016-11-27 23:25:52 +0000
committerAlexander Brock <zaibu@lunar-orbit.de>2016-11-27 23:25:52 +0000
commitd06cd50952b47cd70c2ae73301c5e95c64d341f0 (patch)
tree506dde94e0e6a18a3b27e7439eeaa6c571012d0a /src
parentImprove precision of offset_cubic (diff)
downloadinkscape-d06cd50952b47cd70c2ae73301c5e95c64d341f0.tar.gz
inkscape-d06cd50952b47cd70c2ae73301c5e95c64d341f0.zip
Increase tolerance to match old methods precision and improve speed
(bzr r15280.1.2)
Diffstat (limited to 'src')
-rw-r--r--src/helper/geom-pathstroke.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helper/geom-pathstroke.cpp b/src/helper/geom-pathstroke.cpp
index 905984a2a..51d3ee160 100644
--- a/src/helper/geom-pathstroke.cpp
+++ b/src/helper/geom-pathstroke.cpp
@@ -792,7 +792,7 @@ double _offset_cubic_stable_sub(
// check the tolerance for our estimate to be a parallel curve
double worst_residual = 0;
- for (size_t ii = 1; ii <= 9; ++ii) {
+ for (size_t ii = 3; ii <= 7; ii+=2) {
const double t = static_cast<double>(ii) / 10;
const Geom::Point req = bez.pointAt(t);
const Geom::Point chk = c.pointAt(c.nearestTime(req));
@@ -947,7 +947,7 @@ void offset_quadratic(Geom::Path& p, Geom::QuadraticBezier const& bez, double wi
void offset_curve(Geom::Path& res, Geom::Curve const* current, double width)
{
- double const tolerance = 1.0 * (width / 100); // Tolerance is 1% of the given width.
+ double const tolerance = 5.0 * (width / 100); // Tolerance is 5% of the given width.
size_t levels = 8;
if (current->isDegenerate()) return; // don't do anything