summaryrefslogtreecommitdiffstats
path: root/src/2geom/pathvector.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2015-04-28 23:02:19 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2015-04-28 23:02:19 +0000
commitcfa7054c950050095e596edd18fedad53e7ed636 (patch)
tree2142ac03239c40a4af6b367754ddf3421e337577 /src/2geom/pathvector.cpp
parent2Geom sync - initial commit (diff)
downloadinkscape-cfa7054c950050095e596edd18fedad53e7ed636.tar.gz
inkscape-cfa7054c950050095e596edd18fedad53e7ed636.zip
Fix calls to Geom::cross() - sign change.
(bzr r14059.2.2)
Diffstat (limited to 'src/2geom/pathvector.cpp')
-rw-r--r--src/2geom/pathvector.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/2geom/pathvector.cpp b/src/2geom/pathvector.cpp
index 36364de9b..d2dc468c6 100644
--- a/src/2geom/pathvector.cpp
+++ b/src/2geom/pathvector.cpp
@@ -126,13 +126,20 @@ OptRect PathVector::boundsExact() const
return bound;
}
+void PathVector::snapEnds(Coord precision)
+{
+ for (std::size_t i = 0; i < size(); ++i) {
+ (*this)[i].snapEnds(precision);
+ }
+}
+
std::vector<PVIntersection> PathVector::intersect(PathVector const &other, Coord precision) const
{
typedef PathVectorPosition PVPos;
std::vector<PVIntersection> result;
for (std::size_t i = 0; i < size(); ++i) {
for (std::size_t j = 0; j < other.size(); ++j) {
- std::vector<PathIntersection> xs = (*this)[i].intersect(other[j]);
+ std::vector<PathIntersection> xs = (*this)[i].intersect(other[j], precision);
for (std::size_t k = 0; k < xs.size(); ++k) {
PVIntersection pvx(PVPos(i, xs[k].first), PVPos(j, xs[k].second), xs[k].point());
result.push_back(pvx);