diff options
| author | Ted Gould <ted@gould.cx> | 2008-10-11 15:16:23 +0000 |
|---|---|---|
| committer | Ted Gould <ted@canonical.com> | 2008-10-11 15:16:23 +0000 |
| commit | 2f5eb047d9e05be5e68549ef6b75070d2faa7d2f (patch) | |
| tree | ca2e94164b6d7aaebfc17196ca46bfc825a7665a /src/2geom/piecewise.cpp | |
| parent | Merge from trunk. (diff) | |
| download | inkscape-2f5eb047d9e05be5e68549ef6b75070d2faa7d2f.tar.gz inkscape-2f5eb047d9e05be5e68549ef6b75070d2faa7d2f.zip | |
Merging from trunk
(bzr r6884)
Diffstat (limited to 'src/2geom/piecewise.cpp')
| -rw-r--r-- | src/2geom/piecewise.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/2geom/piecewise.cpp b/src/2geom/piecewise.cpp index 2d8638818..4c63b20df 100644 --- a/src/2geom/piecewise.cpp +++ b/src/2geom/piecewise.cpp @@ -158,7 +158,6 @@ std::vector<double> roots(Piecewise<SBasis> const &f){ std::vector<double> result; for (unsigned i=0; i<f.size(); i++){ std::vector<double> rts=roots(f.segs[i]); - rts=roots(f.segs[i]); for (unsigned r=0; r<rts.size(); r++){ result.push_back(f.mapToDomain(rts[r], i)); @@ -167,6 +166,18 @@ std::vector<double> roots(Piecewise<SBasis> const &f){ return result; } +std::vector<std::vector<double> > multi_roots(Piecewise<SBasis> const &f, std::vector<double> const &values) { + std::vector<std::vector<double> > result(values.size()); + for (unsigned i=0; i<f.size(); i++) { + std::vector<std::vector<double> > rts = multi_roots(f.segs[i], values); + for(unsigned j=0; j<rts.size(); j++) { + for(unsigned r=0; r<rts[j].size(); r++){ + result[j].push_back(f.mapToDomain(rts[j][r], i)); + } + } + } + return result; +} } /* |
