summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-11-14 18:21:59 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-11-14 18:21:59 +0000
commit7c89ed9dc03fb5f83eac25823c54edd91c123f7f (patch)
tree7059d9ebd31429174b1435c73e80c29fedb7fa82 /src
parentupdate to trunk (diff)
downloadinkscape-7c89ed9dc03fb5f83eac25823c54edd91c123f7f.tar.gz
inkscape-7c89ed9dc03fb5f83eac25823c54edd91c123f7f.zip
Fixing compile problem
(bzr r14422.3.10)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-roughen.cpp58
-rw-r--r--src/live_effects/parameter/random.h2
2 files changed, 30 insertions, 30 deletions
diff --git a/src/live_effects/lpe-roughen.cpp b/src/live_effects/lpe-roughen.cpp
index 87046ef4a..0d0debd24 100644
--- a/src/live_effects/lpe-roughen.cpp
+++ b/src/live_effects/lpe-roughen.cpp
@@ -43,35 +43,6 @@ static const Util::EnumData<HandlesMethod> HandlesMethodData[HM_END] = {
static const Util::EnumDataConverter<HandlesMethod>
HMConverter(HandlesMethodData, HM_END);
-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;
- value += 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 () * 3);
- }
- }
- }
-}
-
LPERoughen::LPERoughen(LivePathEffectObject *lpeobject)
: Effect(lpeobject),
// initialise your parameters here:
@@ -126,6 +97,35 @@ 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 () * 3);
+ }
+ }
+ }
+}
+
void LPERoughen::doOnApply(SPLPEItem const* lpeitem)
{
SPLPEItem * splpeitem = const_cast<SPLPEItem *>(lpeitem);
diff --git a/src/live_effects/parameter/random.h b/src/live_effects/parameter/random.h
index ca4440336..52e3cc0a6 100644
--- a/src/live_effects/parameter/random.h
+++ b/src/live_effects/parameter/random.h
@@ -43,11 +43,11 @@ public:
operator gdouble();
inline gdouble get_value() { return value; } ;
+ long defseed;
protected:
long startseed;
long seed;
- long defseed;
gdouble value;
gdouble min;