summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-04-03 01:49:11 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-04-03 01:49:11 +0000
commitb2f138290a5dedf907fe3e67d12ab93adfd5fd50 (patch)
treecb85f6c3adb3aea06f9b89f69041f8cf714bf067 /src
parentHopefully remove the last of the exception throwing with certain path effects (diff)
downloadinkscape-b2f138290a5dedf907fe3e67d12ab93adfd5fd50.tar.gz
inkscape-b2f138290a5dedf907fe3e67d12ab93adfd5fd50.zip
Fix some minor issues
(bzr r13090.1.44)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-taperstroke.cpp29
1 files changed, 8 insertions, 21 deletions
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<Geom::D2<Geom::SBasis> > stretch_along(Geom::Piecewise<Geom::D2<Geom::SBasis> > 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<LineJoinType>(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<LineJoinType>(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<Geom::LineSegment>(real_path.initialPoint());
+ real_path.close();
+
real_pathv.push_back(real_path);
return real_pathv;