summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-roughen.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2015-12-07 10:00:35 +0000
committer~suv <suv-sf@users.sourceforge.net>2015-12-07 10:00:35 +0000
commit457c41675d69c7463c3590ad9b8e43bcae20e611 (patch)
tree43d1f8d4e350a3070944bbd7bb4ad265c1b6ed02 /src/live_effects/lpe-roughen.cpp
parentmerge from trunk (r14473) (diff)
parentRemove leftover assert. (diff)
downloadinkscape-457c41675d69c7463c3590ad9b8e43bcae20e611.tar.gz
inkscape-457c41675d69c7463c3590ad9b8e43bcae20e611.zip
merge from trunk (r14506)
(bzr r14425.1.4)
Diffstat (limited to 'src/live_effects/lpe-roughen.cpp')
-rw-r--r--src/live_effects/lpe-roughen.cpp38
1 files changed, 0 insertions, 38 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()){