summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-05-15 09:48:51 +0000
committerjabiertxof <info@marker.es>2016-05-15 09:48:51 +0000
commit159439c26042b7c69aa9c33ce9484e4dfd00372a (patch)
tree30d1a626d609369d1220db7f0d05cbb2a7fda970 /src/live_effects/parameter
parentupdate to trunk (diff)
downloadinkscape-159439c26042b7c69aa9c33ce9484e4dfd00372a.tar.gz
inkscape-159439c26042b7c69aa9c33ce9484e4dfd00372a.zip
Fixing pointwise
(bzr r13645.1.137)
Diffstat (limited to 'src/live_effects/parameter')
-rw-r--r--src/live_effects/parameter/array.h32
-rw-r--r--src/live_effects/parameter/satellitesarray.cpp10
-rw-r--r--src/live_effects/parameter/satellitesarray.h5
3 files changed, 29 insertions, 18 deletions
diff --git a/src/live_effects/parameter/array.h b/src/live_effects/parameter/array.h
index 8a9d72fe3..9802abc2e 100644
--- a/src/live_effects/parameter/array.h
+++ b/src/live_effects/parameter/array.h
@@ -89,7 +89,7 @@ protected:
size_t _default_size;
void writesvg(SVGOStringStream &str, std::vector<StorageType> const &vector) const {
- for (size_t i = 0; i < vector.size(); ++i) {
+ for (unsigned int i = 0; i < vector.size(); ++i) {
if (i != 0) {
// separate items with pipe symbol
str << " | ";
@@ -98,37 +98,37 @@ protected:
}
}
- void writesvgData(SVGOStringStream &str, float const &nVector) const {
- str << nVector;
+ void writesvgData(SVGOStringStream &str, float const &vector_data) const {
+ str << vector_data;
}
- void writesvgData(SVGOStringStream &str, double const &nVector) const {
- str << nVector;
+ void writesvgData(SVGOStringStream &str, double const &vector_data) const {
+ str << vector_data;
}
- void writesvgData(SVGOStringStream &str, Geom::Point const &nVector) const {
- str << nVector;
+ void writesvgData(SVGOStringStream &str, Geom::Point const &vector_data) const {
+ str << vector_data;
}
- void writesvgData(SVGOStringStream &str, std::vector<Satellite> const &nVector) const {
- for (size_t i = 0; i < nVector.size(); ++i) {
+ void writesvgData(SVGOStringStream &str, std::vector<Satellite> const &vector_data) const {
+ for (size_t i = 0; i < vector_data.size(); ++i) {
if (i != 0) {
// separate items with @ symbol ¿Any other?
str << " @ ";
}
- str << nVector[i].getSatelliteTypeGchar();
+ str << vector_data[i].getSatelliteTypeGchar();
str << ",";
- str << nVector[i].is_time;
+ str << vector_data[i].is_time;
str << ",";
- str << nVector[i].has_mirror;
+ str << vector_data[i].has_mirror;
str << ",";
- str << nVector[i].hidden;
+ str << vector_data[i].hidden;
str << ",";
- str << nVector[i].amount;
+ str << vector_data[i].amount;
str << ",";
- str << nVector[i].angle;
+ str << vector_data[i].angle;
str << ",";
- str << nVector[i].steps;
+ str << vector_data[i].steps;
}
}
diff --git a/src/live_effects/parameter/satellitesarray.cpp b/src/live_effects/parameter/satellitesarray.cpp
index be4eb6732..14660acc4 100644
--- a/src/live_effects/parameter/satellitesarray.cpp
+++ b/src/live_effects/parameter/satellitesarray.cpp
@@ -48,6 +48,7 @@ void SatellitesArrayParam::setPointwise(Pointwise pointwise)
{
_last_pointwise = pointwise;
param_set_and_write_new_value(_last_pointwise.getSatellites());
+
}
void SatellitesArrayParam::setUseDistance(bool use_knot_distance)
@@ -60,6 +61,11 @@ void SatellitesArrayParam::setEffectType(EffectType et)
_effectType = et;
}
+void SatellitesArrayParam::setPathUpdate(bool path_update)
+{
+ _path_update = path_update;
+}
+
void SatellitesArrayParam::setHelperSize(int hs)
{
_helper_size = hs;
@@ -67,6 +73,7 @@ void SatellitesArrayParam::setHelperSize(int hs)
}
bool SatellitesArrayParam::validData()
{
+ if (_path_update) { return false;}
return _last_pointwise.getPathVector().nodes().size() == _last_pointwise.getTotalSatellites();
}
void SatellitesArrayParam::updateCanvasIndicators(bool mirror)
@@ -323,6 +330,7 @@ void FilletChamferKnotHolderEntity::knot_set(Geom::Point const &p,
Geom::Point FilletChamferKnotHolderEntity::knot_get() const
{
if (! _pparam->validData() || !valid_index(_index)) {
+ this->knot->hide();
return Geom::Point(Geom::infinity(), Geom::infinity());
}
Geom::Point tmp_point;
@@ -336,10 +344,12 @@ Geom::Point FilletChamferKnotHolderEntity::knot_get() const
!pathv[_index].closed() && subindex == 0 ||//ignore first satellites on open paths
pathv[_index].size() == subindex) //ignore last satellite in open paths with fillet chamfer effect
{
+ this->knot->hide();
_pparam->_vector[_index][subindex].hidden = true;
return Geom::Point(Geom::infinity(), Geom::infinity());
}
this->knot->show();
+ std::cout << subindex << pathv[_index].size() << "----" << _pparam->_vector[_index].size() << "fgdgsdgsdgsdsdsgd\n";
if (subindex != _subindex) {
tmp_point = satellite.getPosition(pathv[_index][subindex]);
size_t previous_index = subindex - 1;
diff --git a/src/live_effects/parameter/satellitesarray.h b/src/live_effects/parameter/satellitesarray.h
index dcd82ada5..0cebb9cb4 100644
--- a/src/live_effects/parameter/satellitesarray.h
+++ b/src/live_effects/parameter/satellitesarray.h
@@ -55,6 +55,7 @@ public:
}
void param_transform_multiply(Geom::Affine const &postmul, bool /*set*/);
void setUseDistance(bool use_knot_distance);
+ void setPathUpdate(bool path_update);
void setEffectType(EffectType et);
void setPointwise(Pointwise pointwise);
bool validData();
@@ -76,6 +77,7 @@ private:
Geom::PathVector _hp;
int _helper_size;
bool _use_distance;
+ bool _path_update;
EffectType _effectType;
Pointwise _last_pointwise;
@@ -99,8 +101,7 @@ public:
bool valid_index(size_t index) const
{
return (_pparam->_vector.size() > index);
- }
- ;
+ };
private:
SatellitesArrayParam *_pparam;