From: johanengelen Date: Wed, 2 Jan 2008 13:59:35 +0000 (+0000) Subject: update to latest 2geom X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=89a2f8911d2396baee411658e906edef22cde4ce;p=inkscape.git update to latest 2geom --- diff --git a/src/2geom/d2-sbasis.cpp b/src/2geom/d2-sbasis.cpp index 8cf24627e..a646e2cf4 100644 --- a/src/2geom/d2-sbasis.cpp +++ b/src/2geom/d2-sbasis.cpp @@ -96,43 +96,6 @@ Piecewise > operator*(Piecewise > const &a, Matrix const & return result; } -/* Replaced by remove_short_cuts in piecewise.h -//this recursively removes the shortest cut interval until none is shorter than tol. -//TODO: code this in a more efficient way! -Piecewise > remove_short_cuts(Piecewise > const &f, double tol){ - double min = tol; - unsigned idx = f.size(); - for(unsigned i=0; i f.cuts[i+1]-f.cuts[i]){ - min = f.cuts[i+1]-f.cuts[i]; - idx = int(i); - } - } - if (idx==f.size()){ - return f; - } - if (f.size()==1) { - //removing this seg would result in an empty pw>... - return f; - } - Piecewise > new_f=f; - for (int dim=0; dim<2; dim++){ - double v = Hat(f.segs.at(idx)[dim][0]); - //TODO: what about closed curves? - if (idx>0 && f.segs.at(idx-1).at1()==f.segs.at(idx).at0()) - new_f.segs.at(idx-1)[dim][0][1] = v; - if (idx0, only force continuity where the jump is smaller than tol. Piecewise > force_continuity(Piecewise > const &f, double tol,