summaryrefslogtreecommitdiffstats
path: root/src/helper
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-05-10 20:36:27 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-05-10 20:36:27 +0000
commitc7925bda67f038dd5054329c43936658ca2cae76 (patch)
tree60fbe1aab9418446cd40ab32495747034a0b65a9 /src/helper
parentAdded some comments (diff)
downloadinkscape-c7925bda67f038dd5054329c43936658ca2cae76.tar.gz
inkscape-c7925bda67f038dd5054329c43936658ca2cae76.zip
some comments and pointwise related refactor
(bzr r13645.1.91)
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/geom-pathinfo.cpp11
-rw-r--r--src/helper/geom-pathinfo.h3
-rw-r--r--src/helper/geom-pointwise.cpp23
-rw-r--r--src/helper/geom-pointwise.h14
-rw-r--r--src/helper/geom-satellite.cpp2
5 files changed, 24 insertions, 29 deletions
diff --git a/src/helper/geom-pathinfo.cpp b/src/helper/geom-pathinfo.cpp
index d37b8b6da..d73f8f707 100644
--- a/src/helper/geom-pathinfo.cpp
+++ b/src/helper/geom-pathinfo.cpp
@@ -17,16 +17,7 @@
* @brief Pathinfo store the _data of a Geom::PathVector and allow get info about it
*
*/
-Pathinfo::Pathinfo(Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2)
-{
- set(pwd2);
-}
-
-Pathinfo::Pathinfo(Geom::PathVector path_vector, bool skip_degenerate)
-{
- set(path_vector, skip_degenerate);
-}
-
+Pathinfo::Pathinfo() {}
Pathinfo::~Pathinfo() {}
diff --git a/src/helper/geom-pathinfo.h b/src/helper/geom-pathinfo.h
index cd3a3b2b8..41753c68f 100644
--- a/src/helper/geom-pathinfo.h
+++ b/src/helper/geom-pathinfo.h
@@ -22,8 +22,7 @@
class Pathinfo {
public:
- Pathinfo(Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2);
- Pathinfo(Geom::PathVector path_vector, bool skip_degenerate = false);
+ Pathinfo();
virtual ~Pathinfo();
void set(Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2);
void set(Geom::PathVector path_vector, bool skip_degenerate = false);
diff --git a/src/helper/geom-pointwise.cpp b/src/helper/geom-pointwise.cpp
index 3041c60ea..5f6c0d29e 100644
--- a/src/helper/geom-pointwise.cpp
+++ b/src/helper/geom-pointwise.cpp
@@ -3,8 +3,14 @@
* \brief Pointwise a class to manage a vector of satellites per piecewise curve
*/ /*
* Authors:
- * 2015 Jabier Arraiza Cenoz<jabier.arraiza@marker.es>
- *
+ * Jabiertxof
+ * Johan Engelen
+ * Josh Andler
+ * suv
+ * Mc-
+ * Liam P. White
+ * Nathan Hurst
+ * Krzysztof Kosiński
* This code is in public domain
*/
@@ -23,12 +29,7 @@
* optional satellites, and remove the active variable in satellites.
*
*/
-Pointwise::Pointwise(Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2,
- std::vector<Satellite> satellites)
- : _pwd2(pwd2), _satellites(satellites), _path_info(pwd2)
-{
- setStart();
-}
+Pointwise::Pointwise() {}
Pointwise::~Pointwise() {}
@@ -48,7 +49,6 @@ void Pointwise::setPwd2(Geom::Piecewise<Geom::D2<Geom::SBasis> > const pwd2_in)
void Pointwise::setPathInfo(Geom::PathVector const pv)
{
_path_info.set(pv);
- setStart();
}
std::vector<Satellite> Pointwise::getSatellites() const
@@ -59,10 +59,9 @@ std::vector<Satellite> Pointwise::getSatellites() const
void Pointwise::setSatellites(std::vector<Satellite> const sats)
{
_satellites = sats;
- setStart();
}
-/** Update the start satellite on ope/closed paths.
+/** Update the start satellite on open/closed paths.
*/
void Pointwise::setStart()
{
@@ -137,7 +136,6 @@ void Pointwise::pwd2Append(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A, Sat
if (!reorder && first == i - counter && !are_near(_pwd2[i - counter].at0(), A[i].at0()) && !subpath_is_changed) {
//Send the modified subpath to back
- //TODO: change subpathToBack to subpath move for the case of multiple subpath reverse
subpathToBack(_path_info.subPathIndex(first));
reorder = true;
i--;
@@ -145,6 +143,7 @@ void Pointwise::pwd2Append(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A, Sat
}
if (first == i - counter && !are_near(_pwd2[i - counter].at0(), A[i].at0()) && !subpath_is_changed) {
+ //reverse subpath
subpathReverse(first, last);
}
diff --git a/src/helper/geom-pointwise.h b/src/helper/geom-pointwise.h
index 3cb4ff136..d83b54b79 100644
--- a/src/helper/geom-pointwise.h
+++ b/src/helper/geom-pointwise.h
@@ -1,10 +1,16 @@
/**
* \file
- * \brief Pointwise a class to manage a vector of satellites, once per piecewise curve
+ * \brief Pointwise a class to manage a vector of satellites per piecewise curve
*/ /*
* Authors:
- * 2015 Jabier Arraiza Cenoz<jabier.arraiza@marker.es>
- *
+ * Jabiertxof
+ * Johan Engelen
+ * Josh Andler
+ * suv
+ * Mc-
+ * Liam P. White
+ * Nathan Hurst
+ * Krzysztof Kosiński
* This code is in public domain
*/
@@ -36,7 +42,7 @@
class Pointwise {
public:
- Pointwise(Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2, std::vector<Satellite> satellites);
+ Pointwise();
virtual ~Pointwise();
Geom::Piecewise<Geom::D2<Geom::SBasis> > getPwd2() const;
diff --git a/src/helper/geom-satellite.cpp b/src/helper/geom-satellite.cpp
index d03839875..cd3f65f68 100644
--- a/src/helper/geom-satellite.cpp
+++ b/src/helper/geom-satellite.cpp
@@ -80,7 +80,7 @@ double arcLengthAt(double A, Geom::D2<Geom::SBasis> const d2_in)
}
/**
- * Convert a arc radius of a fillet/chamfer to his satellite length -point position where fillet/chamferknot be on original curve
+ * Convert a arc radius of a fillet/chamfer to his satellite length -point position where fillet/chamfer knot be on original curve
*/
double Satellite::radToLen(
double A, Geom::D2<Geom::SBasis> const d2_in,