diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-12-02 23:21:43 +0000 |
|---|---|---|
| committer | jabiertxof <jabier.arraiza@marker.es> | 2015-12-02 23:21:43 +0000 |
| commit | a4b8f88b71de0fc72eb14e5f36ccad9c8292ceb2 (patch) | |
| tree | 1ec5bf6d37cfa58763b57ef8cabcaf0217bbbc53 | |
| parent | Add spray-origin missing atribute (diff) | |
| download | inkscape-a4b8f88b71de0fc72eb14e5f36ccad9c8292ceb2.tar.gz inkscape-a4b8f88b71de0fc72eb14e5f36ccad9c8292ceb2.zip | |
Removed auto calulate distances in roughen LPE because strange resulton apply on LPE copy effect
(bzr r14502)
| -rw-r--r-- | src/live_effects/lpe-roughen.cpp | 38 | ||||
| -rw-r--r-- | src/live_effects/lpe-roughen.h | 1 |
2 files changed, 0 insertions, 39 deletions
diff --git a/src/live_effects/lpe-roughen.cpp b/src/live_effects/lpe-roughen.cpp index 310f791a1..b4ee54f1a 100644 --- a/src/live_effects/lpe-roughen.cpp +++ b/src/live_effects/lpe-roughen.cpp @@ -91,44 +91,6 @@ LPERoughen::LPERoughen(LivePathEffectObject *lpeobject) LPERoughen::~LPERoughen() {} -static void -sp_get_better_default_size(SPItem *item, double &value) -{ - if (SP_IS_GROUP(item)) { - std::vector<SPItem*> const item_list = sp_item_group_item_list(SP_GROUP(item)); - for ( std::vector<SPItem*>::const_iterator iter=item_list.begin();iter!=item_list.end();iter++) { - SPItem *subitem = *iter; - sp_get_better_default_size(subitem, value); - } - if(item_list.size() > 0){ - value /= item_list.size(); - } - } else { - SPShape *shape = dynamic_cast<SPShape *>(item); - if (shape) { - SPCurve * c = NULL; - SPPath *path = dynamic_cast<SPPath *>(shape); - if (path) { - c = path->get_original_curve(); - } else { - c = shape->getCurve(); - } - if (c) { - value += Geom::length(paths_to_pw(c->get_pathvector()))/(c->get_segment_count () * 6); - } - } - } -} - -void LPERoughen::doOnApply(SPLPEItem const* lpeitem) -{ - SPLPEItem * splpeitem = const_cast<SPLPEItem *>(lpeitem); - double initial = 0; - sp_get_better_default_size(SP_ITEM(splpeitem), initial); - displace_x.param_set_value(initial, 0); - displace_y.param_set_value(initial, 0); -} - void LPERoughen::doBeforeEffect(SPLPEItem const *lpeitem) { if(spray_tool_friendly && seed == 0 && SP_OBJECT(lpeitem)->getId()){ diff --git a/src/live_effects/lpe-roughen.h b/src/live_effects/lpe-roughen.h index 7e6a19d5a..44a723c89 100644 --- a/src/live_effects/lpe-roughen.h +++ b/src/live_effects/lpe-roughen.h @@ -45,7 +45,6 @@ public: virtual void doEffect(SPCurve *curve); virtual double sign(double randNumber); - virtual void doOnApply(SPLPEItem const* lpeitem); virtual Geom::Point randomize(double max_lenght, bool is_node = false); virtual void doBeforeEffect(SPLPEItem const * lpeitem); virtual SPCurve const * addNodesAndJitter(Geom::Curve const * A, Geom::Point &prev, Geom::Point &last_move, double t, bool last); |
