From 6adeeb23bc139967e8c81a4790250aba43390b61 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Wed, 2 Dec 2015 18:31:07 +0100 Subject: Add spray-origin missing atribute (bzr r14501) --- src/attributes.cpp | 1 + src/attributes.h | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/attributes.cpp b/src/attributes.cpp index a237f8861..d373dbc68 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -41,6 +41,7 @@ static SPStyleProp const props[] = { {SP_ATTR_TRANSFORM_CENTER_Y, "inkscape:transform-center-y"}, {SP_ATTR_INKSCAPE_PATH_EFFECT, "inkscape:path-effect"}, {SP_ATTR_INKSCAPE_HIGHLIGHT_COLOR, "inkscape:highlight-color"}, + {SP_ATTR_INKSCAPE_SPRAY_ORIGIN, "inkscape:spray-origin"}, /* SPAnchor */ {SP_ATTR_XLINK_HREF, "xlink:href"}, {SP_ATTR_XLINK_TYPE, "xlink:type"}, diff --git a/src/attributes.h b/src/attributes.h index 42ec99d8f..7d22858b8 100644 --- a/src/attributes.h +++ b/src/attributes.h @@ -41,6 +41,7 @@ enum SPAttributeEnum { SP_ATTR_TRANSFORM_CENTER_Y, SP_ATTR_INKSCAPE_PATH_EFFECT, SP_ATTR_INKSCAPE_HIGHLIGHT_COLOR, + SP_ATTR_INKSCAPE_SPRAY_ORIGIN, /* SPAnchor */ SP_ATTR_XLINK_HREF, SP_ATTR_XLINK_TYPE, -- cgit v1.2.3 From a4b8f88b71de0fc72eb14e5f36ccad9c8292ceb2 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Thu, 3 Dec 2015 00:21:43 +0100 Subject: Removed auto calulate distances in roughen LPE because strange resulton apply on LPE copy effect (bzr r14502) --- src/live_effects/lpe-roughen.cpp | 38 -------------------------------------- src/live_effects/lpe-roughen.h | 1 - 2 files changed, 39 deletions(-) (limited to 'src') 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 const item_list = sp_item_group_item_list(SP_GROUP(item)); - for ( std::vector::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(item); - if (shape) { - SPCurve * c = NULL; - SPPath *path = dynamic_cast(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(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); -- cgit v1.2.3