79
79
endpoint_spacing_variation.resetRandomizer();
81
81
D2<Piecewise<SBasis> > stroke = make_cuts_independent(strokepath.get_pwd2());
82
Interval bndsStroke = bounds_exact(stroke[0]);
83
gdouble scaling = bndsStroke.max() - bndsStroke.min();
84
Interval bndsStrokeY = bounds_exact(stroke[1]);
85
Point stroke_origin(bndsStroke.min(), (bndsStrokeY.max()+bndsStrokeY.min())/2);
82
OptInterval bndsStroke = bounds_exact(stroke[0]);
83
OptInterval bndsStrokeY = bounds_exact(stroke[1]);
84
if (!bndsStroke && !bndsStrokeY) {
87
gdouble scaling = bndsStroke->max() - bndsStroke->min();
88
Point stroke_origin(bndsStroke->min(), (bndsStrokeY->max()+bndsStrokeY->min())/2);
87
90
std::vector<Geom::Path> path_out;
163
166
pwd2.concat( temppath[i].toPwSb() );
165
168
D2<Piecewise<SBasis> > d2pw = make_cuts_independent(pwd2);
166
Interval bndsX = bounds_exact(d2pw[0]);
167
Interval bndsY = bounds_exact(d2pw[1]);
168
Point start(bndsX.min(), (bndsY.max()+bndsY.min())/2);
169
Point end(bndsX.max(), (bndsY.max()+bndsY.min())/2);
171
if ( !Geom::are_near(start,end) ) {
174
path.appendNew<Geom::LineSegment>( end );
175
strokepath.set_new_value( path.toPwSb(), true );
169
OptInterval bndsX = bounds_exact(d2pw[0]);
170
OptInterval bndsY = bounds_exact(d2pw[1]);
171
if (bndsX && bndsY) {
172
Point start(bndsX->min(), (bndsY->max()+bndsY->min())/2);
173
Point end(bndsX->max(), (bndsY->max()+bndsY->min())/2);
174
if ( !Geom::are_near(start,end) ) {
177
path.appendNew<Geom::LineSegment>( end );
178
strokepath.set_new_value( path.toPwSb(), true );
180
// bounding box is too small to make decent path. set to default default. :-)
181
strokepath.param_set_and_write_default();
177
// bounding box is too small to make decent path. set to default default. :-)
184
// bounding box is non-existent. set to default default. :-)
178
185
strokepath.param_set_and_write_default();