From b2f138290a5dedf907fe3e67d12ab93adfd5fd50 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 2 Apr 2014 21:49:11 -0400 Subject: Fix some minor issues (bzr r13090.1.44) --- src/live_effects/lpe-taperstroke.cpp | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index 97ae02e3b..c452c825c 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -248,7 +248,7 @@ Geom::Path return_at_first_cusp (Geom::Path const & path_in, double smooth_toler Geom::Piecewise > stretch_along(Geom::Piecewise > pwd2_in, Geom::Path pattern, double width); //references to pointers, because magic -void subdivideCurve(Geom::Curve * curve_in, Geom::Coord t, Geom::Curve *& val_first, Geom::Curve *& val_second); +void subdivideCurve(const Geom::Curve * curve_in, Geom::Coord t, Geom::Curve *& val_first, Geom::Curve *& val_second); Geom::PathVector LPETaperStroke::doEffect_path(Geom::PathVector const& path_in) { @@ -269,7 +269,7 @@ Geom::PathVector LPETaperStroke::doEffect_path(Geom::PathVector const& path_in) } } - //don't ever let it be zero + //don't let it be zero if (attach_start <= 0.00000001) { attach_start.param_set_value( 0.00000001 ); zeroStart = true; @@ -329,12 +329,7 @@ Geom::PathVector LPETaperStroke::doEffect_path(Geom::PathVector const& path_in) throwaway_path = Outline::PathOutsideOutline(pathv_out[1], -fabs(line_width), static_cast(join_type.get_value()), miter_limit); - if (!zeroStart) { - throwaway_path.setInitial(real_path.finalPoint()); - real_path.append(throwaway_path); - } else { - real_path.append(throwaway_path, Geom::Path::STITCH_DISCONTINUOUS); - } + real_path.append(throwaway_path, Geom::Path::STITCH_DISCONTINUOUS); if (!zeroEnd) { //append the ending taper @@ -346,25 +341,17 @@ Geom::PathVector LPETaperStroke::doEffect_path(Geom::PathVector const& path_in) pwd2.concat(stretch_along(pathv_out[2].toPwSb(), pat_vec[0], -fabs(line_width))); throwaway_path = Geom::path_from_piecewise(pwd2, 0.001)[0]; - throwaway_path.setInitial(real_path.finalPoint()); - real_path.append(throwaway_path); + real_path.append(throwaway_path, Geom::Path::STITCH_DISCONTINUOUS); } //append the inside outline of the path (against direction) throwaway_path = Outline::PathOutsideOutline(pathv_out[1].reverse(), -fabs(line_width), static_cast(join_type.get_value()), miter_limit); - if (!zeroEnd) { - //throwaway_path.setInitial(real_path.finalPoint()); - real_path.append(throwaway_path, Geom::Path::STITCH_DISCONTINUOUS); - } else { - real_path.append(throwaway_path, Geom::Path::STITCH_DISCONTINUOUS); - } - - //hmm - real_path.setFinal(real_path.initialPoint()); - - real_path.close(); + real_path.append(throwaway_path, Geom::Path::STITCH_DISCONTINUOUS); + real_path.appendNew(real_path.initialPoint()); + real_path.close(); + real_pathv.push_back(real_path); return real_pathv; -- cgit v1.2.3