diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-04-06 17:39:38 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-04-06 17:39:38 +0000 |
| commit | 22ded87a8ca58e0ff4400b2d4e76787f4ac22bd6 (patch) | |
| tree | c0f22402e4fc5c5b2075b4e23d5ac0c34bc43422 /src/helper | |
| parent | fixing bug on closed paths (diff) | |
| download | inkscape-22ded87a8ca58e0ff4400b2d4e76787f4ac22bd6.tar.gz inkscape-22ded87a8ca58e0ff4400b2d4e76787f4ac22bd6.zip | |
Fixed bug on closed paths, Clenup of pathinfo
(bzr r13645.1.77)
Diffstat (limited to 'src/helper')
| -rw-r--r-- | src/helper/geom-pathinfo.cpp | 12 | ||||
| -rw-r--r-- | src/helper/geom-pathinfo.h | 2 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/helper/geom-pathinfo.cpp b/src/helper/geom-pathinfo.cpp index a37c0e475..ac94c0281 100644 --- a/src/helper/geom-pathinfo.cpp +++ b/src/helper/geom-pathinfo.cpp @@ -17,12 +17,12 @@ namespace Geom { * @brief Pathinfo store the data of a pathvector and allow get info about it * */ -Pathinfo::Pathinfo(Piecewise<D2<SBasis> > pwd2) : _pwd2(pwd2) +Pathinfo::Pathinfo(Piecewise<D2<SBasis> > pwd2) { _setPathInfo(pwd2); } ; -Pathinfo::Pathinfo(Geom::PathVector path_vector, bool skip_degenerate) : _path_vector(path_vector) +Pathinfo::Pathinfo(Geom::PathVector path_vector, bool skip_degenerate) { _setPathInfo(path_vector, skip_degenerate); } @@ -33,13 +33,11 @@ Pathinfo::~Pathinfo() {} void Pathinfo::setPwd2(Piecewise<D2<SBasis> > pwd2) { - _pwd2 = pwd2; _setPathInfo(pwd2); } void Pathinfo::setPathVector(Geom::PathVector path_vector, bool skip_degenerate) { - _path_vector = path_vector; _setPathInfo(path_vector, skip_degenerate); } @@ -52,11 +50,9 @@ void Pathinfo::_setPathInfo(Piecewise<D2<SBasis> > pwd2) void Pathinfo::_setPathInfo(Geom::PathVector path_vector, bool skip_degenerate) { data.clear(); - Geom::PathVector path_in = - path_from_piecewise(remove_short_cuts(_pwd2, 0.1), 0.001); size_t counter = 0; - for (PathVector::const_iterator path_it = path_in.begin(); - path_it != path_in.end(); ++path_it) { + for (PathVector::const_iterator path_it = path_vector.begin(); + path_it != path_vector.end(); ++path_it) { if (path_it->empty()) { continue; } diff --git a/src/helper/geom-pathinfo.h b/src/helper/geom-pathinfo.h index 021fcca2b..7a597202f 100644 --- a/src/helper/geom-pathinfo.h +++ b/src/helper/geom-pathinfo.h @@ -39,8 +39,6 @@ public: private: void _setPathInfo(Piecewise<D2<SBasis> > pwd2); void _setPathInfo(Geom::PathVector path_vector, bool skip_degenerate = false); - Piecewise<D2<SBasis> > _pwd2; - Geom::PathVector _path_vector; }; } //namespace Geom |
