From 253b3147b483104b996861d4aa26ed92431de755 Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Wed, 16 Oct 2013 15:54:11 -0400 Subject: couple of typos affecting Path->Linked Offset (Bug 1236830) Fixed bugs: - https://launchpad.net/bugs/1236830 (bzr r12696) --- src/livarot/PathOutline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/livarot/PathOutline.cpp') diff --git a/src/livarot/PathOutline.cpp b/src/livarot/PathOutline.cpp index 3b5ce79f9..2cd359328 100644 --- a/src/livarot/PathOutline.cpp +++ b/src/livarot/PathOutline.cpp @@ -1047,7 +1047,7 @@ void Path::TangentOnArcAt(double at, const Geom::Point &iS, PathDescrArcTo const dtgt[0] = -ca * rx * cb + sa * ry * sb; dtgt[1] = -sa * rx * cb - ca * ry * sb; len = L2(tgt); - rad = len * dot(tgt, tgt) / (tgt[0] * dtgt[1] - tgt[1] * dtgt[0]); + rad = -len * dot(tgt, tgt) / (tgt[0] * dtgt[1] - tgt[1] * dtgt[0]); tgt /= len; } else @@ -1476,7 +1476,7 @@ Path::RecStdArcTo (outline_callback_data * data, double tol, double width, } const Geom::Point diff = req - chk; const double err = (dot(diff,diff)); - if (err <= tol * tol) + if (err <= tol) // tolerance is given as a quadratic value, no need to use tol*tol here { int n_d = data->dest->CubicTo (enPos + width*enNor, stGue*scal*stTgt, -- cgit v1.2.3