diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-10-01 01:10:05 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-10-01 01:10:05 +0000 |
| commit | 89b763d897e805a577f81dc0dccab4b75eb253cf (patch) | |
| tree | 88cf5fee43de1ac9647134cea9528a271410bb9f /src/live_effects | |
| parent | Improve calls to document_units (diff) | |
| download | inkscape-89b763d897e805a577f81dc0dccab4b75eb253cf.tar.gz inkscape-89b763d897e805a577f81dc0dccab4b75eb253cf.zip | |
Improvements to transforms in LPE
Diffstat (limited to 'src/live_effects')
| -rw-r--r-- | src/live_effects/effect.cpp | 1 | ||||
| -rw-r--r-- | src/live_effects/lpe-bendpath.cpp | 6 | ||||
| -rw-r--r-- | src/live_effects/lpe-bendpath.h | 4 | ||||
| -rw-r--r-- | src/live_effects/lpe-fill-between-many.cpp | 7 | ||||
| -rw-r--r-- | src/live_effects/lpe-fill-between-many.h | 1 | ||||
| -rw-r--r-- | src/live_effects/lpe-fill-between-strokes.cpp | 5 | ||||
| -rw-r--r-- | src/live_effects/lpe-fill-between-strokes.h | 1 |
7 files changed, 2 insertions, 23 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 46767ac84..396f03e92 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -557,6 +557,7 @@ void Effect::doOnApply_impl(SPLPEItem const* lpeitem) void Effect::doBeforeEffect_impl(SPLPEItem const* lpeitem) { sp_lpe_item = const_cast<SPLPEItem *>(lpeitem); + setReady(); doBeforeEffect(lpeitem); update_helperpath(); } diff --git a/src/live_effects/lpe-bendpath.cpp b/src/live_effects/lpe-bendpath.cpp index 6bf555156..6ff40be26 100644 --- a/src/live_effects/lpe-bendpath.cpp +++ b/src/live_effects/lpe-bendpath.cpp @@ -165,12 +165,6 @@ LPEBendPath::resetDefaults(SPItem const* item) } void -LPEBendPath::transform_multiply(Geom::Affine const& postmul, bool set) -{ - //block parameters be transformed because shapes with bend store transform in the element -} - -void LPEBendPath::addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geom::PathVector> &hp_vec) { hp_vec.push_back(helper_path); diff --git a/src/live_effects/lpe-bendpath.h b/src/live_effects/lpe-bendpath.h index 4909a490a..e8f1b40ca 100644 --- a/src/live_effects/lpe-bendpath.h +++ b/src/live_effects/lpe-bendpath.h @@ -44,9 +44,7 @@ public: void resetDefaults(SPItem const* item) override; void addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geom::PathVector> &hp_vec) override; - - void transform_multiply(Geom::Affine const& postmul, bool set) override; - + void addKnotHolderEntities(KnotHolder * knotholder, SPItem * item) override; PathParam bend_path; diff --git a/src/live_effects/lpe-fill-between-many.cpp b/src/live_effects/lpe-fill-between-many.cpp index 886b840e6..223bc631e 100644 --- a/src/live_effects/lpe-fill-between-many.cpp +++ b/src/live_effects/lpe-fill-between-many.cpp @@ -35,7 +35,6 @@ LPEFillBetweenMany::LPEFillBetweenMany(LivePathEffectObject *lpeobject) : linked_paths(_("Linked path:"), _("Paths from which to take the original path data"), "linkedpaths", &wr, this), method(_("LPE's on linked:"), _("LPE's on linked"), "method", FLMConverter, &wr, this, FLM_BSPLINESPIRO), fuse(_("Fuse coincident points"), _("Fuse coincident points"), "fuse", &wr, this, false), - allow_transforms(_("Allow transforms"), _("Allow transforms"), "allow_transforms", &wr, this, false), join(_("Join subpaths"), _("Join subpaths"), "join", &wr, this, true), close(_("Close"), _("Close path"), "close", &wr, this, true), applied("Store the first apply", "", "applied", &wr, this, "false", false) @@ -43,7 +42,6 @@ LPEFillBetweenMany::LPEFillBetweenMany(LivePathEffectObject *lpeobject) : registerParameter(&linked_paths); registerParameter(&method); registerParameter(&fuse); - registerParameter(&allow_transforms); registerParameter(&join); registerParameter(&close); registerParameter(&applied); @@ -76,7 +74,6 @@ void LPEFillBetweenMany::doOnApply (SPLPEItem const* lpeitem) lpe_repr->setAttribute("linkedpaths", os.str()); lpe_repr->setAttribute("applied", "true"); lpe_repr->setAttribute("method", "partial"); - lpe_repr->setAttribute("allow_transforms", "false"); document->getDefs()->getRepr()->addChild(lpe_repr, nullptr); // adds to <defs> and assigns the 'id' attribute } std::string lpe_id_href = std::string("#") + lpe_repr->attribute("id"); @@ -146,10 +143,6 @@ void LPEFillBetweenMany::doEffect (SPCurve * curve) } } - if(!allow_transforms) { - SP_ITEM(sp_lpe_item)->setAttribute("transform", nullptr); - } - if (!res_pathv.empty() && close) { res_pathv.front().close(); } diff --git a/src/live_effects/lpe-fill-between-many.h b/src/live_effects/lpe-fill-between-many.h index 601dce5c6..1a56b8701 100644 --- a/src/live_effects/lpe-fill-between-many.h +++ b/src/live_effects/lpe-fill-between-many.h @@ -35,7 +35,6 @@ private: OriginalPathArrayParam linked_paths; EnumParam<Filllpemethod> method; BoolParam fuse; - BoolParam allow_transforms; BoolParam join; BoolParam close; HiddenParam applied; diff --git a/src/live_effects/lpe-fill-between-strokes.cpp b/src/live_effects/lpe-fill-between-strokes.cpp index 22dfe7e54..68abe52c7 100644 --- a/src/live_effects/lpe-fill-between-strokes.cpp +++ b/src/live_effects/lpe-fill-between-strokes.cpp @@ -20,7 +20,6 @@ LPEFillBetweenStrokes::LPEFillBetweenStrokes(LivePathEffectObject *lpeobject) : second_path(_("Second path:"), _("Second path from which to take the original path data"), "secondpath", &wr, this), reverse_second(_("Reverse Second"), _("Reverses the second path order"), "reversesecond", &wr, this), fuse(_("Fuse coincident points"), _("Fuse coincident points"), "fuse", &wr, this, false), - allow_transforms(_("Allow transforms"), _("Allow transforms"), "allow_transforms", &wr, this, false), join(_("Join subpaths"), _("Join subpaths"), "join", &wr, this, true), close(_("Close"), _("Close path"), "close", &wr, this, true) { @@ -28,7 +27,6 @@ LPEFillBetweenStrokes::LPEFillBetweenStrokes(LivePathEffectObject *lpeobject) : registerParameter(&second_path); registerParameter(&reverse_second); registerParameter(&fuse); - registerParameter(&allow_transforms); registerParameter(&join); registerParameter(&close); } @@ -40,9 +38,6 @@ void LPEFillBetweenStrokes::doEffect (SPCurve * curve) { if (curve) { Geom::Affine affine = Geom::identity(); - if(!allow_transforms) { - SP_ITEM(sp_lpe_item)->setAttribute("transform", nullptr); - } if ( linked_path.linksToPath() && second_path.linksToPath() && linked_path.getObject() && second_path.getObject() ) { Geom::PathVector linked_pathv = linked_path.get_pathvector(); SPItem * linked1 = linked_path.getObject(); diff --git a/src/live_effects/lpe-fill-between-strokes.h b/src/live_effects/lpe-fill-between-strokes.h index b3b1da2c6..18ba28fe3 100644 --- a/src/live_effects/lpe-fill-between-strokes.h +++ b/src/live_effects/lpe-fill-between-strokes.h @@ -26,7 +26,6 @@ private: OriginalPathParam second_path; BoolParam reverse_second; BoolParam fuse; - BoolParam allow_transforms; BoolParam join; BoolParam close; |
