summaryrefslogtreecommitdiffstats
path: root/src/helper
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-07-05 00:57:00 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-07-05 00:57:00 +0000
commit57b065b5ffb5a871b5efac52f03cb95355bfa119 (patch)
tree860954d3c60ffc54878bd470a5f69725076fd5d9 /src/helper
parentupdate to trunk (diff)
downloadinkscape-57b065b5ffb5a871b5efac52f03cb95355bfa119.tar.gz
inkscape-57b065b5ffb5a871b5efac52f03cb95355bfa119.zip
fix to compile on Krzysztof merge previous to fix the improvements in the merge request
(bzr r13645.1.100)
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/geom-pointwise.cpp10
-rw-r--r--src/helper/geom-satellite.cpp11
-rw-r--r--src/helper/geom-satellite.h3
3 files changed, 11 insertions, 13 deletions
diff --git a/src/helper/geom-pointwise.cpp b/src/helper/geom-pointwise.cpp
index 5f6c0d29e..6910207bf 100644
--- a/src/helper/geom-pointwise.cpp
+++ b/src/helper/geom-pointwise.cpp
@@ -160,11 +160,11 @@ void Pointwise::pwd2Append(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A, Sat
void Pointwise::subpathToBack(size_t subpath)
{
- std::vector<Geom::Path> path_in =
+ Geom::PathVector path_in =
path_from_piecewise(remove_short_cuts(_pwd2, 0.1), 0.001);
size_t subpath_counter = 0;
size_t counter = 0;
- std::vector<Geom::Path> tmp_path;
+ Geom::PathVector tmp_path;
Geom::Path to_back;
for (Geom::PathVector::const_iterator path_it = path_in.begin();
path_it != path_in.end(); ++path_it)
@@ -205,12 +205,12 @@ void Pointwise::subpathReverse(size_t start, size_t end)
_satellites.insert(_satellites.begin() + end + 1, _satellites[i]);
_satellites.erase(_satellites.begin() + i);
}
- std::vector<Geom::Path> path_in =
+ Geom::PathVector path_in =
path_from_piecewise(remove_short_cuts(_pwd2, 0.1), 0.001);
size_t counter = 0;
size_t subpath_counter = 0;
size_t subpath = _path_info.subPathIndex(start);
- std::vector<Geom::Path> tmp_path;
+ Geom::PathVector tmp_path;
Geom::Path rev;
for (Geom::PathVector::const_iterator path_it = path_in.begin();
path_it != path_in.end(); ++path_it)
@@ -220,7 +220,7 @@ void Pointwise::subpathReverse(size_t start, size_t end)
}
counter++;
if (subpath_counter == subpath) {
- tmp_path.push_back(path_it->reverse());
+ tmp_path.push_back(path_it->reversed());
} else {
tmp_path.push_back(*path_it);
}
diff --git a/src/helper/geom-satellite.cpp b/src/helper/geom-satellite.cpp
index eed9706cf..f5f28544d 100644
--- a/src/helper/geom-satellite.cpp
+++ b/src/helper/geom-satellite.cpp
@@ -10,7 +10,7 @@
#include <helper/geom-satellite.h>
#include <2geom/curve.h>
-#include <2geom/nearest-point.h>
+#include <2geom/nearest-time.h>
#include <2geom/path-intersection.h>
#include <2geom/sbasis-to-bezier.h>
#include <2geom/ray.h>
@@ -84,8 +84,7 @@ double arcLengthAt(double A, Geom::D2<Geom::SBasis> const d2_in)
*/
double Satellite::radToLen(
double A, Geom::D2<Geom::SBasis> const d2_in,
- Geom::D2<Geom::SBasis> const d2_out,
- Satellite const previousSatellite) const
+ Geom::D2<Geom::SBasis> const d2_out) const
{
double len = 0;
Geom::Piecewise<Geom::D2<Geom::SBasis> > offset_curve0 =
@@ -99,11 +98,11 @@ double Satellite::radToLen(
Geom::Crossings cs = Geom::crossings(p0, p1);
if (cs.size() > 0) {
Geom::Point cp = p0(cs[0].ta);
- double p0pt = nearest_point(cp, d2_out);
+ double p0pt = nearest_time(cp, d2_out);
len = arcLengthAt(p0pt, d2_out);
} else {
if (A > 0) {
- len = radToLen(A * -1, d2_in, d2_out, previousSatellite);
+ len = radToLen(A * -1, d2_in, d2_out);
}
}
return len;
@@ -216,7 +215,7 @@ Geom::Point Satellite::getPosition(Geom::D2<Geom::SBasis> d2_in) const
*/
void Satellite::setPosition(Geom::Point p, Geom::D2<Geom::SBasis> d2_in)
{
- double A = Geom::nearest_point(p, d2_in);
+ double A = Geom::nearest_time(p, d2_in);
if (!is_time) {
A = arcLengthAt(A, d2_in);
}
diff --git a/src/helper/geom-satellite.h b/src/helper/geom-satellite.h
index 722adbef4..42c5687bd 100644
--- a/src/helper/geom-satellite.h
+++ b/src/helper/geom-satellite.h
@@ -47,8 +47,7 @@ public:
Geom::D2<Geom::SBasis> d2_out,
Satellite previousSatellite) const;
double radToLen(double A, Geom::D2<Geom::SBasis> d2_in,
- Geom::D2<Geom::SBasis> d2_out,
- Satellite previousSatellite) const;
+ Geom::D2<Geom::SBasis> d2_out) const;
double time(Geom::D2<Geom::SBasis> d2_in) const;
double time(double A, bool I, Geom::D2<Geom::SBasis> d2_in) const;