index c37f34ce7a73dd2beb7d03d131fabda110d42d95..47d029d602cbe029336e7864b2c6747666c46594 100644 (file)
#include "sp-item.h"
#include "sp-path.h"
#include "sp-item-group.h"
-#include "display/curve.h"
-#include <libnr/n-art-bpath.h>
-#include <libnr/nr-matrix-fns.h>
-#include "libnr/n-art-bpath-2geom.h"
#include "svg/svg.h"
#include "ui/widget/scalar.h"
prop_scale.param_set_increments(0.01, 0.10);
concatenate_before_pwd2 = true;
-
- groupSpecialBehavior = false;
}
LPEBendPath::~LPEBendPath()
void
LPEBendPath::doBeforeEffect (SPLPEItem *lpeitem)
{
- if(SP_IS_GROUP(lpeitem))
- {
- groupSpecialBehavior = true;
-
- original_bbox(lpeitem);
- }
+ // get the item bounding box
+ original_bbox(lpeitem);
}
Geom::Piecewise<Geom::D2<Geom::SBasis> >
@@ -102,16 +92,11 @@ LPEBendPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd
Piecewise<D2<SBasis> > n = rot90(derivative(uskeleton));
n = force_continuity(remove_short_cuts(n,.1));
- D2<Piecewise<SBasis> > patternd2 = make_cuts_independant(pwd2_in);
+ D2<Piecewise<SBasis> > patternd2 = make_cuts_independent(pwd2_in);
Piecewise<SBasis> x = vertical_pattern.get_value() ? Piecewise<SBasis>(patternd2[1]) : Piecewise<SBasis>(patternd2[0]);
Piecewise<SBasis> y = vertical_pattern.get_value() ? Piecewise<SBasis>(patternd2[0]) : Piecewise<SBasis>(patternd2[1]);
//We use the group bounding box size or the path bbox size to translate well x and y
- if(groupSpecialBehavior == false)
- {
- boundingbox_X = bounds_exact(x);
- boundingbox_Y = bounds_exact(y);
- }
x-= vertical_pattern.get_value() ? boundingbox_Y.min() : boundingbox_X.min();
y-= vertical_pattern.get_value() ? boundingbox_X.middle() : boundingbox_Y.middle();
Geom::Path path;
path.start( start );
path.appendNew<Geom::LineSegment>( end );
- bend_path.param_set_and_write_new_value( path.toPwSb() );
+ bend_path.set_new_value( path.toPwSb(), true );
}
void