summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-12-03 12:17:29 +0000
committerjabiertxof <jabier.arraiza@marker.es>2015-12-03 12:17:29 +0000
commit1aaa5143524050e1d4cf74bd35ad21178a1e3de7 (patch)
tree07b57ee1f959fb4b720469fb391210a581028f6c /src
parentReorder attribute lock to better position (diff)
parentRemoved auto calulate distances in roughen LPE because strange resulton apply... (diff)
downloadinkscape-1aaa5143524050e1d4cf74bd35ad21178a1e3de7.tar.gz
inkscape-1aaa5143524050e1d4cf74bd35ad21178a1e3de7.zip
update to trunk
(bzr r14500.1.3)
Diffstat (limited to 'src')
-rw-r--r--src/attributes.cpp1
-rw-r--r--src/attributes.h1
-rw-r--r--src/live_effects/lpe-roughen.cpp38
-rw-r--r--src/live_effects/lpe-roughen.h1
4 files changed, 2 insertions, 39 deletions
diff --git a/src/attributes.cpp b/src/attributes.cpp
index 853e22345..9a779836b 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 bb15590a1..f0d3d1228 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,
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);