diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-05-09 20:48:48 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-05-09 20:48:48 +0000 |
| commit | 3ce6cb91e8259ec064956c79c2cc4f9050dccbce (patch) | |
| tree | 32c37696d62b47f8e01dae448a07fdaff70d471b /src/live_effects/parameter | |
| parent | update to trunk (diff) | |
| download | inkscape-3ce6cb91e8259ec064956c79c2cc4f9050dccbce.tar.gz inkscape-3ce6cb91e8259ec064956c79c2cc4f9050dccbce.zip | |
fixing review
(bzr r13645.1.86)
Diffstat (limited to 'src/live_effects/parameter')
| -rw-r--r-- | src/live_effects/parameter/array.cpp | 14 | ||||
| -rw-r--r-- | src/live_effects/parameter/array.h | 7 | ||||
| -rw-r--r-- | src/live_effects/parameter/satellitearray.cpp | 20 | ||||
| -rw-r--r-- | src/live_effects/parameter/satellitearray.h | 8 |
4 files changed, 24 insertions, 25 deletions
diff --git a/src/live_effects/parameter/array.cpp b/src/live_effects/parameter/array.cpp index c8ee63fec..c71b8ed55 100644 --- a/src/live_effects/parameter/array.cpp +++ b/src/live_effects/parameter/array.cpp @@ -15,16 +15,16 @@ namespace LivePathEffect { //TODO: move maybe to svg-lenght.cpp unsigned int -sp_svg_satellite_read_d(gchar const *str, Geom::Satellite *sat){ +sp_svg_satellite_read_d(gchar const *str, Satellite *sat){ if (!str) { return 0; } gchar ** strarray = g_strsplit(str, ",", 8); if(strarray[7] && !strarray[8]){ sat->setSatelliteType(g_strstrip(strarray[0])); - sat->isTime = strncmp(strarray[1],"1",1) == 0; + sat->is_time = strncmp(strarray[1],"1",1) == 0; sat->active = strncmp(strarray[2],"1",1) == 0; - sat->hasMirror = strncmp(strarray[3],"1",1) == 0; + sat->has_mirror = strncmp(strarray[3],"1",1) == 0; sat->hidden = strncmp(strarray[4],"1",1) == 0; double amount,angle; float stepsTmp; @@ -76,14 +76,14 @@ ArrayParam<Geom::Point>::readsvg(const gchar * str) } template <> -Geom::Satellite -ArrayParam<Geom::Satellite >::readsvg(const gchar * str) +Satellite +ArrayParam<Satellite >::readsvg(const gchar * str) { - Geom::Satellite sat; + Satellite sat; if (sp_svg_satellite_read_d(str, &sat)) { return sat; } - Geom::Satellite satellite(Geom::F, true, false, false, true, 0.0, 0.0, 0); + Satellite satellite(Geom::F, true, false, false, true, 0.0, 0.0, 0); return satellite; } diff --git a/src/live_effects/parameter/array.h b/src/live_effects/parameter/array.h index 25e479304..66ed6344b 100644 --- a/src/live_effects/parameter/array.h +++ b/src/live_effects/parameter/array.h @@ -16,7 +16,6 @@ #include "live_effects/parameter/parameter.h" #include "helper/geom-satellite.h" -#include "helper/geom-satellite-enum.h" #include "svg/svg.h" #include "svg/stringstream.h" @@ -111,14 +110,14 @@ protected: str << nVector; } - void writesvgData(SVGOStringStream &str, Geom::Satellite const &nVector) const { + void writesvgData(SVGOStringStream &str, Satellite const &nVector) const { str << nVector.getSatelliteTypeGchar(); str << ","; - str << nVector.isTime; + str << nVector.is_time; str << ","; str << nVector.active; str << ","; - str << nVector.hasMirror; + str << nVector.has_mirror; str << ","; str << nVector.hidden; str << ","; diff --git a/src/live_effects/parameter/satellitearray.cpp b/src/live_effects/parameter/satellitearray.cpp index b0b036962..5a3b64dd3 100644 --- a/src/live_effects/parameter/satellitearray.cpp +++ b/src/live_effects/parameter/satellitearray.cpp @@ -30,7 +30,7 @@ SatelliteArrayParam::SatelliteArrayParam(const Glib::ustring &label, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect) - : ArrayParam<Geom::Satellite>(label, tip, key, wr, effect, 0), knoth(NULL) + : ArrayParam<Satellite>(label, tip, key, wr, effect, 0), knoth(NULL) { _knot_shape = SP_KNOT_SHAPE_DIAMOND; _knot_mode = SP_KNOT_MODE_XOR; @@ -52,7 +52,7 @@ void SatelliteArrayParam::set_oncanvas_looks(SPKnotShapeType shape, _knot_color = color; } -void SatelliteArrayParam::setPointwise(Geom::Pointwise *pointwise) +void SatelliteArrayParam::setPointwise(Pointwise *pointwise) { _last_pointwise = pointwise; param_set_and_write_new_value(_last_pointwise->getSatellites()); @@ -280,11 +280,11 @@ void FilletChamferKnotHolderEntity::knot_set(Point const &p, return; } - Geom::Satellite satellite = _pparam->_vector.at(index); + Satellite satellite = _pparam->_vector.at(index); if (!satellite.active || satellite.hidden) { return; } - Geom::Pointwise *pointwise = _pparam->_last_pointwise; + Pointwise *pointwise = _pparam->_last_pointwise; Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2 = pointwise->getPwd2(); Pathinfo path_info(pwd2); if (_pparam->_vector.size() <= _index) { @@ -293,7 +293,7 @@ void FilletChamferKnotHolderEntity::knot_set(Point const &p, Geom::D2<Geom::SBasis> d2_in = pwd2[*d2_prev_index]; double mirror_time = Geom::nearest_point(s, d2_in); double time_start = 0; - std::vector<Geom::Satellite> sats = pointwise->getSatellites(); + std::vector<Satellite> sats = pointwise->getSatellites(); time_start = sats[*d2_prev_index].time(d2_in); if (time_start > mirror_time) { mirror_time = time_start; @@ -325,14 +325,14 @@ Geom::Point FilletChamferKnotHolderEntity::knot_get() const if (!valid_index(index)) { return Point(infinity(), infinity()); } - Geom::Satellite satellite = _pparam->_vector.at(index); + Satellite satellite = _pparam->_vector.at(index); if (!_pparam->_last_pointwise) { return Point(infinity(), infinity()); } if (!satellite.active || satellite.hidden) { return Point(infinity(), infinity()); } - Geom::Pointwise *pointwise = _pparam->_last_pointwise; + Pointwise *pointwise = _pparam->_last_pointwise; Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2 = pointwise->getPwd2(); Pathinfo path_info(pwd2); if (pwd2.size() <= index) { @@ -429,7 +429,7 @@ void FilletChamferKnotHolderEntity::knot_click(guint state) if (!_pparam->_use_distance && !_pparam->_vector.at(index).isTime) { boost::optional<size_t> prev = path_info.previous(index); boost::optional<Geom::D2<Geom::SBasis> > prevPwd2 = boost::none; - boost::optional<Geom::Satellite> prevSat = boost::none; + boost::optional<Satellite> prevSat = boost::none; if (prev) { prevPwd2 = pwd2[*prev]; prevSat = _pparam->_vector.at(*prev); @@ -456,7 +456,7 @@ void FilletChamferKnotHolderEntity::knot_click(guint state) } } -void FilletChamferKnotHolderEntity::knot_set_offset(Geom::Satellite satellite) +void FilletChamferKnotHolderEntity::knot_set_offset(Satellite satellite) { if (!_pparam->_last_pointwise) { return; @@ -472,7 +472,7 @@ void FilletChamferKnotHolderEntity::knot_set_offset(Geom::Satellite satellite) Pathinfo path_info(pwd2); boost::optional<size_t> prev = path_info.previous(index); boost::optional<Geom::D2<Geom::SBasis> > prevPwd2 = boost::none; - boost::optional<Geom::Satellite> prevSat = boost::none; + boost::optional<Satellite> prevSat = boost::none; if (prev) { prevPwd2 = pwd2[*prev]; prevSat = _pparam->_vector.at(*prev); diff --git a/src/live_effects/parameter/satellitearray.h b/src/live_effects/parameter/satellitearray.h index 2845e3969..cc09e7589 100644 --- a/src/live_effects/parameter/satellitearray.h +++ b/src/live_effects/parameter/satellitearray.h @@ -30,7 +30,7 @@ namespace LivePathEffect { class FilletChamferKnotHolderEntity; -class SatelliteArrayParam : public ArrayParam<Geom::Satellite> { +class SatelliteArrayParam : public ArrayParam<Satellite> { public: SatelliteArrayParam(const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key, @@ -57,7 +57,7 @@ public: void param_transform_multiply(Geom::Affine const &postmul, bool /*set*/); void setUseDistance(bool use_knot_distance); void setEffectType(EffectType et); - void setPointwise(Geom::Pointwise *pointwise); + void setPointwise(Pointwise *pointwise); void set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color); @@ -78,7 +78,7 @@ private: int _helper_size; bool _use_distance; EffectType _effectType; - Geom::Pointwise *_last_pointwise; + Pointwise *_last_pointwise; }; @@ -94,7 +94,7 @@ public: guint state); virtual Geom::Point knot_get() const; virtual void knot_click(guint state); - void knot_set_offset(Geom::Satellite); + void knot_set_offset(Satellite); /** Checks whether the index falls within the size of the parameter's vector */ bool valid_index(size_t index) const |
