summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/livarot/PathOutline.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/livarot/PathOutline.cpp b/src/livarot/PathOutline.cpp
index 1993a7862..7f8853e31 100644
--- a/src/livarot/PathOutline.cpp
+++ b/src/livarot/PathOutline.cpp
@@ -1189,11 +1189,15 @@ Path::OutlineJoin (Path * dest, Geom::Point pos, Geom::Point stNor, Geom::Point
if ((angSi > 0 && width >= 0)
|| (angSi < 0 && width < 0)) { // This is an inside join -> join is independent of chosen JoinType.
if ((dest->descr_cmd[dest->descr_cmd.size() - 1]->getType() == descr_lineto) && (nType == descr_lineto)) {
- PathDescrLineTo* nLine = dynamic_cast<PathDescrLineTo*>(dest->descr_cmd[dest->descr_cmd.size() - 1]);
Geom::Point const biss = unit_vector(Geom::rot90( stNor - enNor ));
double c2 = Geom::dot (biss, enNor);
- double l = width / c2;
- nLine->p = pos + l*biss; // relocate to bisector
+ if (fabs(c2) > 0.707107) { // apply only to obtuse angles
+ double l = width / c2;
+ PathDescrLineTo* nLine = dynamic_cast<PathDescrLineTo*>(dest->descr_cmd[dest->descr_cmd.size() - 1]);
+ nLine->p = pos + l*biss; // relocate to bisector
+ } else {
+ dest->LineTo (pos + width*enNor);
+ }
} else {
// dest->LineTo (pos); // redundant
dest->LineTo (pos + width*enNor);