diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2015-04-28 23:02:19 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2015-04-28 23:02:19 +0000 |
| commit | cfa7054c950050095e596edd18fedad53e7ed636 (patch) | |
| tree | 2142ac03239c40a4af6b367754ddf3421e337577 /src/2geom/path.cpp | |
| parent | 2Geom sync - initial commit (diff) | |
| download | inkscape-cfa7054c950050095e596edd18fedad53e7ed636.tar.gz inkscape-cfa7054c950050095e596edd18fedad53e7ed636.zip | |
Fix calls to Geom::cross() - sign change.
(bzr r14059.2.2)
Diffstat (limited to 'src/2geom/path.cpp')
| -rw-r--r-- | src/2geom/path.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/2geom/path.cpp b/src/2geom/path.cpp index cf8b15d60..8eb5c7fcb 100644 --- a/src/2geom/path.cpp +++ b/src/2geom/path.cpp @@ -760,6 +760,16 @@ void Path::replace(iterator first, iterator last, Path const &path) replace(first, last, path.begin(), path.end()); } +void Path::snapEnds(Coord precision) +{ + if (!_closed) return; + if (_curves->size() > 1 && are_near(_closing_seg->length(precision), 0, precision)) { + _unshare(); + _closing_seg->setInitial(_closing_seg->finalPoint()); + (_curves->end() - 1)->setFinal(_closing_seg->finalPoint()); + } +} + // replace curves between first and last with contents of source, // void Path::do_update(Sequence::iterator first, Sequence::iterator last, Sequence &source) |
