From 634be67d2fa8aa07d25d96e10a3ad24fdfdcc80e Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Thu, 26 May 2016 20:44:19 +0200 Subject: Rename branch (bzr r13645.1.145) --- src/helper/CMakeLists.txt | 4 +- src/helper/Makefile_insert | 4 +- src/helper/geom-pathvectorsatellites.cpp | 74 ++++++++++++++++++++++++++++++++ src/helper/geom-pathvectorsatellites.h | 53 +++++++++++++++++++++++ src/helper/geom-pointwise.cpp | 74 -------------------------------- src/helper/geom-pointwise.h | 54 ----------------------- 6 files changed, 131 insertions(+), 132 deletions(-) create mode 100644 src/helper/geom-pathvectorsatellites.cpp create mode 100644 src/helper/geom-pathvectorsatellites.h delete mode 100644 src/helper/geom-pointwise.cpp delete mode 100644 src/helper/geom-pointwise.h (limited to 'src/helper') diff --git a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt index aa99934b6..92709e4e9 100644 --- a/src/helper/CMakeLists.txt +++ b/src/helper/CMakeLists.txt @@ -14,7 +14,7 @@ set(helper_SRC geom.cpp geom-nodetype.cpp geom-pathstroke.cpp - geom-pointwise.cpp + geom-pathvectorsatellites.cpp geom-satellite.cpp gnome-utils.cpp pixbuf-ops.cpp @@ -34,7 +34,7 @@ set(helper_SRC geom-curves.h geom-nodetype.h geom-pathstroke.h - geom-pointwise.h + geom-pathvectorsatellites.h geom-satellite.h geom.h gnome-utils.h diff --git a/src/helper/Makefile_insert b/src/helper/Makefile_insert index 54588d0ce..6ba0efbfa 100644 --- a/src/helper/Makefile_insert +++ b/src/helper/Makefile_insert @@ -14,8 +14,8 @@ ink_common_sources += \ helper/geom-nodetype.h \ helper/geom-pathstroke.cpp \ helper/geom-pathstroke.h \ - helper/geom-pointwise.cpp \ - helper/geom-pointwise.h \ + helper/geom-pathvectorsatellites.cpp \ + helper/geom-pathvectorsatellites.h \ helper/geom-satellite.cpp \ helper/geom-satellite.h \ helper/gnome-utils.cpp \ diff --git a/src/helper/geom-pathvectorsatellites.cpp b/src/helper/geom-pathvectorsatellites.cpp new file mode 100644 index 000000000..a5207ab00 --- /dev/null +++ b/src/helper/geom-pathvectorsatellites.cpp @@ -0,0 +1,74 @@ +/** + * \file + * \brief PathVectorSatellites a class to manage a vector of satellites per piecewise node + */ /* + * Authors: + * Jabiertxof + * Nathan Hurst + * Johan Engelen + * Josh Andler + * suv + * Mc- + * Liam P. White + * Krzysztof Kosiński + * This code is in public domain + */ + +#include +Geom::PathVector PathVectorSatellites::getPathVector() const +{ + return _pathvector; +} + +void PathVectorSatellites::setPathVector(Geom::PathVector pathv) +{ + _pathvector = pathv; +} + +Satellites PathVectorSatellites::getSatellites() +{ + return _satellites; +} + +void PathVectorSatellites::setSatellites(Satellites satellites) +{ + _satellites = satellites; +} + +size_t PathVectorSatellites::getTotalSatellites() +{ + size_t counter = 0; + for (size_t i = 0; i < _satellites.size(); ++i) { + for (size_t j = 0; j < _satellites[i].size(); ++j) { + counter++; + } + } + return counter; +} + +void PathVectorSatellites::recalculateForNewPathVector(Geom::PathVector const pathv, Satellite const S) +{ + Satellites satellites; + for (size_t i = 0; i < pathv.size(); i++) { + std::vector subpath_satellites; + for (size_t k = 0; k < pathv[i].size_closed(); k++) { + subpath_satellites.push_back(S); + } + satellites.push_back(subpath_satellites); + } + setPathVector(pathv); + setSatellites(satellites); +} + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: +// filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 +// : diff --git a/src/helper/geom-pathvectorsatellites.h b/src/helper/geom-pathvectorsatellites.h new file mode 100644 index 000000000..72ecef38f --- /dev/null +++ b/src/helper/geom-pathvectorsatellites.h @@ -0,0 +1,53 @@ +/** + * \file + * \brief PathVectorSatellites a class to manage a vector of satellites per piecewise node + */ /* + * Authors: + * Jabiertxof + * Nathan Hurst + * Johan Engelen + * Josh Andler + * suv + * Mc- + * Liam P. White + * Krzysztof Kosiński + * This code is in public domain + */ + +#ifndef SEEN_PATHVECTORSATELLITES_H +#define SEEN_PATHVECTORSATELLITES_H + +#include +#include <2geom/path.h> +#include <2geom/pathvector.h> + +/** + * @brief PathVectorSatellites a class to manage a vector of satellites per curve + */ +typedef std::vector > Satellites; +class PathVectorSatellites { +public: + Geom::PathVector getPathVector() const; + void setPathVector(Geom::PathVector pathv); + Satellites getSatellites(); + void setSatellites(Satellites satellites); + size_t getTotalSatellites(); + void recalculateForNewPathVector(Geom::PathVector const pathv, Satellite const S); +private: + Geom::PathVector _pathvector; + Satellites _satellites; +}; + +#endif //SEEN_PATHVECTORSATELLITES_H +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: +// filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 +// : diff --git a/src/helper/geom-pointwise.cpp b/src/helper/geom-pointwise.cpp deleted file mode 100644 index 5531bb849..000000000 --- a/src/helper/geom-pointwise.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * \file - * \brief Pointwise a class to manage a vector of satellites per piecewise node - */ /* - * Authors: - * Jabiertxof - * Nathan Hurst - * Johan Engelen - * Josh Andler - * suv - * Mc- - * Liam P. White - * Krzysztof Kosiński - * This code is in public domain - */ - -#include -Geom::PathVector Pointwise::getPathVector() const -{ - return _pathvector; -} - -void Pointwise::setPathVector(Geom::PathVector pathv) -{ - _pathvector = pathv; -} - -Satellites Pointwise::getSatellites() -{ - return _satellites; -} - -void Pointwise::setSatellites(Satellites satellites) -{ - _satellites = satellites; -} - -size_t Pointwise::getTotalSatellites() -{ - size_t counter = 0; - for (size_t i = 0; i < _satellites.size(); ++i) { - for (size_t j = 0; j < _satellites[i].size(); ++j) { - counter++; - } - } - return counter; -} - -void Pointwise::recalculateForNewPathVector(Geom::PathVector const pathv, Satellite const S) -{ - Satellites satellites; - for (size_t i = 0; i < pathv.size(); i++) { - std::vector subpath_satellites; - for (size_t k = 0; k < pathv[i].size_closed(); k++) { - subpath_satellites.push_back(S); - } - satellites.push_back(subpath_satellites); - } - setPathVector(pathv); - setSatellites(satellites); -} - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: -// filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 -// : diff --git a/src/helper/geom-pointwise.h b/src/helper/geom-pointwise.h deleted file mode 100644 index 599234473..000000000 --- a/src/helper/geom-pointwise.h +++ /dev/null @@ -1,54 +0,0 @@ -/** - * \file - * \brief Pointwise a class to manage a vector of satellites per piecewise node - */ /* - * Authors: - * Jabiertxof - * Nathan Hurst - * Johan Engelen - * Josh Andler - * suv - * Mc- - * Liam P. White - * Krzysztof Kosiński - * This code is in public domain - */ - -#ifndef SEEN_POINTWISE_H -#define SEEN_POINTWISE_H - -#include -#include <2geom/path.h> -#include <2geom/pathvector.h> -#include - -/** - * @brief Pointwise a class to manage a vector of satellites per curve - */ -typedef std::vector > Satellites; -class Pointwise { -public: - Geom::PathVector getPathVector() const; - void setPathVector(Geom::PathVector pathv); - Satellites getSatellites(); - size_t getTotalSatellites(); - void setSatellites(Satellites satellites); - void recalculateForNewPathVector(Geom::PathVector const pathv, Satellite const S); -private: - Geom::PathVector _pathvector; - Satellites _satellites; -}; - -#endif //SEEN_POINTWISE_H -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: -// filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 -// : -- cgit v1.2.3