diff options
| author | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-29 19:28:44 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-29 19:28:44 +0000 |
| commit | 8a082e274bc322596c217bbe7770904a3cb50cc2 (patch) | |
| tree | f4910f4b21f6072c299299a8b37cee02726b5c30 /src/live_effects | |
| parent | Update to trunk (diff) | |
| download | inkscape-8a082e274bc322596c217bbe7770904a3cb50cc2.tar.gz inkscape-8a082e274bc322596c217bbe7770904a3cb50cc2.zip | |
Fix build errors and a few small bugs
(bzr r13090.1.36)
Diffstat (limited to 'src/live_effects')
| -rwxr-xr-x[-rw-r--r--] | src/live_effects/lpe-taperstroke.cpp | 4 | ||||
| -rw-r--r-- | src/live_effects/parameter/powerstrokepointarray.cpp | 2 | ||||
| -rwxr-xr-x | src/live_effects/pathoutlineprovider.cpp | 25 |
3 files changed, 24 insertions, 7 deletions
diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index 8e6edfa2f..0e9752d31 100644..100755 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -279,10 +279,10 @@ Geom::PathVector LPETaperStroke::doEffect_path(Geom::PathVector const& path_in) //don't let it be integer if (double(unsigned(attach_start)) == attach_start) { - attach_start.param_set_value(attach_start - 0.00000001); + attach_start.param_set_value(attach_start - 0.00001); } if (double(unsigned(attach_end)) == attach_end) { - attach_end.param_set_value(attach_end - 0.00000001); + attach_end.param_set_value(attach_end - 0.00001); } unsigned allowed_start = first_cusp.size(); diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp index 7fa837689..4ed8998fa 100644 --- a/src/live_effects/parameter/powerstrokepointarray.cpp +++ b/src/live_effects/parameter/powerstrokepointarray.cpp @@ -202,7 +202,7 @@ PowerStrokePointArrayParamKnotHolderEntity::knot_get() const void PowerStrokePointArrayParamKnotHolderEntity::knot_set_offset(Geom::Point offset) { _pparam->_vector.at(_index) = Geom::Point(offset.x(), offset.y() / 2); - this->parent_holder->knot_ungrabbed_handler(this->knot); + this->parent_holder->knot_ungrabbed_handler(this->knot, 0); } void diff --git a/src/live_effects/pathoutlineprovider.cpp b/src/live_effects/pathoutlineprovider.cpp index a5a7a044f..2a0da05b4 100755 --- a/src/live_effects/pathoutlineprovider.cpp +++ b/src/live_effects/pathoutlineprovider.cpp @@ -220,8 +220,8 @@ bool outside_angle (const Geom::Curve& cbc1, const Geom::Curve& cbc2) void extrapolate_curves(Geom::Path& path_builder, Geom::Curve* cbc1, Geom::Curve* cbc2, Geom::Point endPt, double miter_limit, bool outside = false)
{
-
- if ( outside ) {
+ bool lineProblem = (dynamic_cast<Geom::BezierCurveN<1u> *>(cbc1)) || (dynamic_cast<Geom::BezierCurveN<1u> *>(cbc2));
+ if ( outside && !lineProblem ) {
Geom::Path pth;
pth.append(*cbc1);
@@ -273,9 +273,26 @@ void extrapolate_curves(Geom::Path& path_builder, Geom::Curve* cbc1, Geom::Curve }
path_builder.appendNew<Geom::LineSegment> (endPt);
}
- } else {
+ }
+ if ( outside && lineProblem ) {
+ Geom::Path pth;
+ pth.append(*cbc1);
+ Geom::Point tang1 = Geom::unitTangentAt(Geom::reverse(pth.toPwSb()[0]), 0.);
+ pth = Geom::Path();
+ pth.append( *cbc2 );
+ Geom::Point tang2 = Geom::unitTangentAt(pth.toPwSb()[0], 0);
+
+ boost::optional <Geom::Point> p = intersection_point (cbc1->finalPoint(), tang1,
+ cbc2->initialPoint(), tang2);
+ if (p)
+ {
+ path_builder.appendNew<Geom::LineSegment> (*p);
+ }
path_builder.appendNew<Geom::LineSegment> (endPt);
- }
+ }
+ if ( !outside ) {
+ path_builder.appendNew<Geom::LineSegment> (endPt);
+ }
}
void reflect_curves(Geom::Path& path_builder, Geom::Curve* cbc1, Geom::Curve* cbc2, Geom::Point endPt, double miter_limit, bool outside = false)
|
