summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJF Barraud <jf.barraud@gmail.com>2009-03-27 08:49:13 +0000
committerjfbarraud <jfbarraud@users.sourceforge.net>2009-03-27 08:49:13 +0000
commit77b86f6b2f459fa963dd84386be303e842cb2e76 (patch)
treeb3258239a3f735a9dfa995637bb72e8bc59ddcb7 /src
parentImproved Liquid Texture plus a Flow inside Texture, a Comics liquid and a Com... (diff)
downloadinkscape-77b86f6b2f459fa963dd84386be303e842cb2e76.tar.gz
inkscape-77b86f6b2f459fa963dd84386be303e842cb2e76.zip
bug fix: close open paths on input.
(bzr r7573)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-rough-hatches.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/live_effects/lpe-rough-hatches.cpp b/src/live_effects/lpe-rough-hatches.cpp
index 8b2c8aaf8..d75941b12 100644
--- a/src/live_effects/lpe-rough-hatches.cpp
+++ b/src/live_effects/lpe-rough-hatches.cpp
@@ -277,7 +277,7 @@ LPERoughHatches::LPERoughHatches(LivePathEffectObject *lpeobject) :
front_thickness.param_set_range(0, NR_HUGE);
back_thickness.param_set_range(0, NR_HUGE);
- concatenate_before_pwd2 = true;
+ concatenate_before_pwd2 = false;
show_orig_path = true;
}
@@ -294,6 +294,13 @@ LPERoughHatches::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const &
Piecewise<D2<SBasis> > result;
Piecewise<D2<SBasis> > transformed_pwd2_in = pwd2_in;
+ Point start = pwd2_in.segs.front().at0();
+ Point end = pwd2_in.segs.back().at1();
+ if (end != start ){
+ transformed_pwd2_in.push_cut( transformed_pwd2_in.cuts.back() + 1 );
+ D2<SBasis> stitch( SBasis( 1, Linear(end[X],start[X]) ), SBasis( 1, Linear(end[Y],start[Y]) ) );
+ transformed_pwd2_in.push_seg( stitch );
+ }
Point transformed_org = direction.getOrigin();
Piecewise<SBasis> tilter;//used to bend the hatches
Matrix bend_mat;//used to bend the hatches
@@ -302,7 +309,7 @@ LPERoughHatches::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const &
Point bend_dir = -rot90(unit_vector(bender.getVector()));
double bend_amount = L2(bender.getVector());
bend_mat = Matrix(-bend_dir[Y], bend_dir[X], bend_dir[X], bend_dir[Y],0,0);
- transformed_pwd2_in = pwd2_in * bend_mat;
+ transformed_pwd2_in = transformed_pwd2_in * bend_mat;
tilter = Piecewise<SBasis>(shift(Linear(-bend_amount),1));
OptRect bbox = bounds_exact( transformed_pwd2_in );
if (not(bbox)) return pwd2_in;