From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/live_effects/lpe-bendpath.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/live_effects/lpe-bendpath.cpp') diff --git a/src/live_effects/lpe-bendpath.cpp b/src/live_effects/lpe-bendpath.cpp index bc112285f..c24d38d7b 100644 --- a/src/live_effects/lpe-bendpath.cpp +++ b/src/live_effects/lpe-bendpath.cpp @@ -6,27 +6,11 @@ */ #include "live_effects/lpe-bendpath.h" -#include "sp-shape.h" -#include "sp-item.h" -#include "sp-path.h" #include "sp-item-group.h" -#include "svg/svg.h" -#include "ui/widget/scalar.h" - -#include <2geom/sbasis.h> -#include <2geom/sbasis-geometric.h> -#include <2geom/bezier-to-sbasis.h> -#include <2geom/sbasis-to-bezier.h> -#include <2geom/d2.h> -#include <2geom/piecewise.h> #include "knot-holder-entity.h" #include "knotholder.h" -#include - -#include - using std::vector; -- cgit v1.2.3 From 0e90df42ad8299b0a42435fb4445f83bc4ddbbfd Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Mon, 29 Aug 2016 19:35:32 +0200 Subject: Fix a bug in pattern along path at first edit node after applied. Backport it to 0.92 (bzr r15089) --- src/live_effects/lpe-bendpath.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/live_effects/lpe-bendpath.cpp') diff --git a/src/live_effects/lpe-bendpath.cpp b/src/live_effects/lpe-bendpath.cpp index c24d38d7b..2ba1e32b4 100644 --- a/src/live_effects/lpe-bendpath.cpp +++ b/src/live_effects/lpe-bendpath.cpp @@ -67,6 +67,7 @@ LPEBendPath::LPEBendPath(LivePathEffectObject *lpeobject) : _provides_knotholder_entities = true; apply_to_clippath_and_mask = true; concatenate_before_pwd2 = true; + _prop_scale_store = prop_scale; } LPEBendPath::~LPEBendPath() @@ -80,6 +81,9 @@ LPEBendPath::doBeforeEffect (SPLPEItem const* lpeitem) // get the item bounding box original_bbox(lpeitem); original_height = boundingbox_Y.max() - boundingbox_Y.min(); + if(_prop_scale_store != prop_scale) { + prop_scale.param_set_value(_prop_scale_store); + } } Geom::Piecewise > @@ -120,9 +124,9 @@ LPEBendPath::doEffect_pwd2 (Geom::Piecewise > const & pwd } if ( scale_y_rel.get_value() ) { - y*=(scaling*prop_scale); + y*=(scaling*_prop_scale_store); } else { - if (prop_scale != 1.0) y *= prop_scale; + if (_prop_scale_store != 1.0) y *= _prop_scale_store; } Piecewise > output = compose(uskeleton,x) + y*compose(n,x); @@ -184,9 +188,9 @@ KnotHolderEntityWidthBendPath::knot_set(Geom::Point const &p, Geom::Point const& Geom::Point knot_pos = this->knot->pos * item->i2dt_affine().inverse(); Geom::Coord nearest_to_ray = ray.nearestTime(knot_pos); if(nearest_to_ray == 0){ - lpe->prop_scale.param_set_value(-Geom::distance(s , ptA)/(lpe->original_height/2.0)); + lpe->_prop_scale_store = -Geom::distance(s , ptA)/(lpe->original_height/2.0); } else { - lpe->prop_scale.param_set_value(Geom::distance(s , ptA)/(lpe->original_height/2.0)); + lpe->_prop_scale_store = Geom::distance(s , ptA)/(lpe->original_height/2.0); } sp_lpe_item_update_patheffect (SP_LPE_ITEM(item), false, true); @@ -207,7 +211,7 @@ KnotHolderEntityWidthBendPath::knot_get() const ray.setPoints(ptA,(*cubic)[1]); } ray.setAngle(ray.angle() + Geom::rad_from_deg(90)); - Geom::Point result_point = Geom::Point::polar(ray.angle(), (lpe->original_height/2.0) * lpe->prop_scale) + ptA; + Geom::Point result_point = Geom::Point::polar(ray.angle(), (lpe->original_height/2.0) * lpe->_prop_scale_store) + ptA; bp_helper_path.clear(); Geom::Path hp(result_point); -- cgit v1.2.3 From d16ce258120800e84bfca5c3c687c25177a3137c Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sun, 11 Sep 2016 12:10:44 +0200 Subject: Fix bugs: #1621234 and #172137 Fixed bugs: - https://launchpad.net/bugs/172137 - https://launchpad.net/bugs/1621234 (bzr r15111) --- src/live_effects/lpe-bendpath.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/live_effects/lpe-bendpath.cpp') diff --git a/src/live_effects/lpe-bendpath.cpp b/src/live_effects/lpe-bendpath.cpp index 2ba1e32b4..c24d38d7b 100644 --- a/src/live_effects/lpe-bendpath.cpp +++ b/src/live_effects/lpe-bendpath.cpp @@ -67,7 +67,6 @@ LPEBendPath::LPEBendPath(LivePathEffectObject *lpeobject) : _provides_knotholder_entities = true; apply_to_clippath_and_mask = true; concatenate_before_pwd2 = true; - _prop_scale_store = prop_scale; } LPEBendPath::~LPEBendPath() @@ -81,9 +80,6 @@ LPEBendPath::doBeforeEffect (SPLPEItem const* lpeitem) // get the item bounding box original_bbox(lpeitem); original_height = boundingbox_Y.max() - boundingbox_Y.min(); - if(_prop_scale_store != prop_scale) { - prop_scale.param_set_value(_prop_scale_store); - } } Geom::Piecewise > @@ -124,9 +120,9 @@ LPEBendPath::doEffect_pwd2 (Geom::Piecewise > const & pwd } if ( scale_y_rel.get_value() ) { - y*=(scaling*_prop_scale_store); + y*=(scaling*prop_scale); } else { - if (_prop_scale_store != 1.0) y *= _prop_scale_store; + if (prop_scale != 1.0) y *= prop_scale; } Piecewise > output = compose(uskeleton,x) + y*compose(n,x); @@ -188,9 +184,9 @@ KnotHolderEntityWidthBendPath::knot_set(Geom::Point const &p, Geom::Point const& Geom::Point knot_pos = this->knot->pos * item->i2dt_affine().inverse(); Geom::Coord nearest_to_ray = ray.nearestTime(knot_pos); if(nearest_to_ray == 0){ - lpe->_prop_scale_store = -Geom::distance(s , ptA)/(lpe->original_height/2.0); + lpe->prop_scale.param_set_value(-Geom::distance(s , ptA)/(lpe->original_height/2.0)); } else { - lpe->_prop_scale_store = Geom::distance(s , ptA)/(lpe->original_height/2.0); + lpe->prop_scale.param_set_value(Geom::distance(s , ptA)/(lpe->original_height/2.0)); } sp_lpe_item_update_patheffect (SP_LPE_ITEM(item), false, true); @@ -211,7 +207,7 @@ KnotHolderEntityWidthBendPath::knot_get() const ray.setPoints(ptA,(*cubic)[1]); } ray.setAngle(ray.angle() + Geom::rad_from_deg(90)); - Geom::Point result_point = Geom::Point::polar(ray.angle(), (lpe->original_height/2.0) * lpe->_prop_scale_store) + ptA; + Geom::Point result_point = Geom::Point::polar(ray.angle(), (lpe->original_height/2.0) * lpe->prop_scale) + ptA; bp_helper_path.clear(); Geom::Path hp(result_point); -- cgit v1.2.3