summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-09-29 02:01:20 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-09-29 02:01:20 +0000
commitfaec2fcff4372e4ee4ce4e967b95747e3c52c241 (patch)
tree9276c803b5ab180f37c61ec491d772d0ecca102e /src/live_effects
parentThis push add a partial solution to scale powerstroke shapes without distorsion (diff)
downloadinkscape-faec2fcff4372e4ee4ce4e967b95747e3c52c241.tar.gz
inkscape-faec2fcff4372e4ee4ce4e967b95747e3c52c241.zip
this patch fix the problem whith clips and mask update in live effects.
More info in the bug: https://bugs.launchpad.net/inkscape/+bug/1241902 (bzr r13341.1.229)
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/lpe-bendpath.cpp3
-rw-r--r--src/live_effects/lpe-envelope-perspective.cpp3
-rw-r--r--src/live_effects/lpe-envelope.cpp5
-rw-r--r--src/live_effects/lpe-lattice.cpp3
-rw-r--r--src/live_effects/lpe-lattice2.cpp3
-rw-r--r--src/live_effects/lpe-mirror_symmetry.cpp8
-rw-r--r--src/live_effects/lpe-mirror_symmetry.h2
-rw-r--r--src/live_effects/lpe-offset.cpp8
-rw-r--r--src/live_effects/lpe-offset.h2
-rw-r--r--src/live_effects/lpe-perspective_path.cpp3
-rw-r--r--src/live_effects/lpe-roughen.cpp5
-rw-r--r--src/live_effects/lpe-roughen.h2
-rw-r--r--src/live_effects/lpe-simplify.cpp3
-rw-r--r--src/live_effects/lpe-vonkoch.cpp3
14 files changed, 50 insertions, 3 deletions
diff --git a/src/live_effects/lpe-bendpath.cpp b/src/live_effects/lpe-bendpath.cpp
index eaf9fe4a6..33171b184 100644
--- a/src/live_effects/lpe-bendpath.cpp
+++ b/src/live_effects/lpe-bendpath.cpp
@@ -76,6 +76,9 @@ LPEBendPath::doBeforeEffect (SPLPEItem const* lpeitem)
{
// get the item bounding box
original_bbox(lpeitem);
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
}
Geom::Piecewise<Geom::D2<Geom::SBasis> >
diff --git a/src/live_effects/lpe-envelope-perspective.cpp b/src/live_effects/lpe-envelope-perspective.cpp
index 3b91eb183..f847dddc5 100644
--- a/src/live_effects/lpe-envelope-perspective.cpp
+++ b/src/live_effects/lpe-envelope-perspective.cpp
@@ -350,6 +350,9 @@ LPEEnvelopePerspective::doBeforeEffect (SPLPEItem const* lpeitem)
{
original_bbox(lpeitem);
setDefaults();
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
}
void
diff --git a/src/live_effects/lpe-envelope.cpp b/src/live_effects/lpe-envelope.cpp
index 4f5623fba..05a672ae8 100644
--- a/src/live_effects/lpe-envelope.cpp
+++ b/src/live_effects/lpe-envelope.cpp
@@ -32,7 +32,7 @@ LPEEnvelope::LPEEnvelope(LivePathEffectObject *lpeobject) :
bend_path2(_("Right bend path:"), _("Right path along which to bend the original path"), "bendpath2", &wr, this, "M0,0 L1,0"),
bend_path3(_("Bottom bend path:"), _("Bottom path along which to bend the original path"), "bendpath3", &wr, this, "M0,0 L1,0"),
bend_path4(_("Left bend path:"), _("Left path along which to bend the original path"), "bendpath4", &wr, this, "M0,0 L1,0"),
- xx(_("E_nable left & right paths"), _("Enable the left and right deformation paths"), "xx", &wr, this, true),
+ xx(_("_Enable left & right paths"), _("Enable the left and right deformation paths"), "xx", &wr, this, true),
yy(_("_Enable top & bottom paths"), _("Enable the top and bottom deformation paths"), "yy", &wr, this, true)
{
registerParameter( dynamic_cast<Parameter *>(&yy) );
@@ -54,6 +54,9 @@ LPEEnvelope::doBeforeEffect (SPLPEItem const* lpeitem)
{
// get the item bounding box
original_bbox(lpeitem);
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
}
Geom::Piecewise<Geom::D2<Geom::SBasis> >
diff --git a/src/live_effects/lpe-lattice.cpp b/src/live_effects/lpe-lattice.cpp
index 8136569e8..a241a8a2e 100644
--- a/src/live_effects/lpe-lattice.cpp
+++ b/src/live_effects/lpe-lattice.cpp
@@ -176,6 +176,9 @@ void
LPELattice::doBeforeEffect (SPLPEItem const* lpeitem)
{
original_bbox(lpeitem);
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
}
void
diff --git a/src/live_effects/lpe-lattice2.cpp b/src/live_effects/lpe-lattice2.cpp
index db609c9e1..9dad78f6e 100644
--- a/src/live_effects/lpe-lattice2.cpp
+++ b/src/live_effects/lpe-lattice2.cpp
@@ -254,6 +254,9 @@ LPELattice2::doBeforeEffect (SPLPEItem const* lpeitem)
{
original_bbox(lpeitem);
setDefaults();
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
}
void
diff --git a/src/live_effects/lpe-mirror_symmetry.cpp b/src/live_effects/lpe-mirror_symmetry.cpp
index 4d4837d8d..0bb67a4a2 100644
--- a/src/live_effects/lpe-mirror_symmetry.cpp
+++ b/src/live_effects/lpe-mirror_symmetry.cpp
@@ -43,6 +43,14 @@ LPEMirrorSymmetry::~LPEMirrorSymmetry()
}
void
+LPEMirrorSymmetry::doBeforeEffect (SPLPEItem const* lpeitem)
+{
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
+}
+
+void
LPEMirrorSymmetry::doOnApply (SPLPEItem const* lpeitem)
{
using namespace Geom;
diff --git a/src/live_effects/lpe-mirror_symmetry.h b/src/live_effects/lpe-mirror_symmetry.h
index c01d1bf6f..a4a2b86c0 100644
--- a/src/live_effects/lpe-mirror_symmetry.h
+++ b/src/live_effects/lpe-mirror_symmetry.h
@@ -30,6 +30,8 @@ public:
virtual void doOnApply (SPLPEItem const* lpeitem);
+ virtual void doBeforeEffect (SPLPEItem const* lpeitem);
+
virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
private:
diff --git a/src/live_effects/lpe-offset.cpp b/src/live_effects/lpe-offset.cpp
index 192bd17ca..dc91775b7 100644
--- a/src/live_effects/lpe-offset.cpp
+++ b/src/live_effects/lpe-offset.cpp
@@ -55,6 +55,14 @@ static void append_half_circle(Geom::Piecewise<Geom::D2<Geom::SBasis> > &pwd2,
pwd2.continuousConcat(cap_pwd2);
}
+void
+LPEOffset::doBeforeEffect (SPLPEItem const* lpeitem)
+{
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
+}
+
Geom::Piecewise<Geom::D2<Geom::SBasis> >
LPEOffset::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in)
{
diff --git a/src/live_effects/lpe-offset.h b/src/live_effects/lpe-offset.h
index 9966fd45d..997311c7d 100644
--- a/src/live_effects/lpe-offset.h
+++ b/src/live_effects/lpe-offset.h
@@ -28,6 +28,8 @@ public:
virtual void doOnApply (SPLPEItem const* lpeitem);
+ virtual void doBeforeEffect (SPLPEItem const* lpeitem);
+
virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
private:
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp
index 9e21f5d25..d43772cf7 100644
--- a/src/live_effects/lpe-perspective_path.cpp
+++ b/src/live_effects/lpe-perspective_path.cpp
@@ -90,6 +90,9 @@ LPEPerspectivePath::doBeforeEffect (SPLPEItem const* lpeitem)
SP_LPE_ITEM(lpeitem)->removeCurrentPathEffect(false);
return;
}
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
}
void LPEPerspectivePath::refresh(Gtk::Entry* perspective) {
diff --git a/src/live_effects/lpe-roughen.cpp b/src/live_effects/lpe-roughen.cpp
index b9d575e06..ffd5433bf 100644
--- a/src/live_effects/lpe-roughen.cpp
+++ b/src/live_effects/lpe-roughen.cpp
@@ -71,11 +71,14 @@ LPERoughen::LPERoughen(LivePathEffectObject *lpeobject)
LPERoughen::~LPERoughen() {}
-void LPERoughen::doBeforeEffect(SPLPEItem const */*lpeitem*/)
+void LPERoughen::doBeforeEffect(SPLPEItem const *lpeitem)
{
displaceX.resetRandomizer();
displaceY.resetRandomizer();
srand(1);
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
}
Gtk::Widget *LPERoughen::newWidget()
diff --git a/src/live_effects/lpe-roughen.h b/src/live_effects/lpe-roughen.h
index 7e99b47bf..d5ec726bd 100644
--- a/src/live_effects/lpe-roughen.h
+++ b/src/live_effects/lpe-roughen.h
@@ -38,7 +38,7 @@ public:
virtual void doEffect(SPCurve *curve);
virtual double sign(double randNumber);
virtual Geom::Point randomize();
- virtual void doBeforeEffect(SPLPEItem const */*lpeitem*/);
+ virtual void doBeforeEffect(SPLPEItem const * lpeitem);
virtual SPCurve *addNodesAndJitter(const Geom::Curve *A, double t);
virtual SPCurve *jitter(const Geom::Curve *A);
virtual Geom::Point tpoint(Geom::Point A, Geom::Point B, double t = 0.5);
diff --git a/src/live_effects/lpe-simplify.cpp b/src/live_effects/lpe-simplify.cpp
index a817f30f1..c191fbbe6 100644
--- a/src/live_effects/lpe-simplify.cpp
+++ b/src/live_effects/lpe-simplify.cpp
@@ -65,6 +65,9 @@ LPESimplify::doBeforeEffect (SPLPEItem const* lpeitem)
hp.clear();
}
bbox = SP_ITEM(lpeitem)->visualBounds();
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
}
diff --git a/src/live_effects/lpe-vonkoch.cpp b/src/live_effects/lpe-vonkoch.cpp
index 8b0b716fe..7c1913076 100644
--- a/src/live_effects/lpe-vonkoch.cpp
+++ b/src/live_effects/lpe-vonkoch.cpp
@@ -264,6 +264,9 @@ LPEVonKoch::doBeforeEffect (SPLPEItem const* lpeitem)
tmp_pathv.push_back(tmp_path);
ref_path.set_new_value(tmp_pathv,true);
}
+ SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem);
+ item->apply_to_clippath(item);
+ item->apply_to_mask(item);
}