summaryrefslogtreecommitdiffstats
path: root/src/2geom
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-04-29 01:00:39 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-04-29 01:00:39 +0000
commiteca72e61451c8deae7f2f5fbaa9885aec946c790 (patch)
tree76d436abbbe469e0bc3b4a254e0ab6e5b4525e3b /src/2geom
parentUpdate to trunk (diff)
parentwhen removing LPE, with 'flattening' option, don't recalculate/rewrite ellips... (diff)
downloadinkscape-eca72e61451c8deae7f2f5fbaa9885aec946c790.tar.gz
inkscape-eca72e61451c8deae7f2f5fbaa9885aec946c790.zip
Update to trunk and fix issues
(bzr r13090.1.67)
Diffstat (limited to 'src/2geom')
-rw-r--r--src/2geom/CMakeLists.txt2
-rw-r--r--src/2geom/ellipse.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/2geom/CMakeLists.txt b/src/2geom/CMakeLists.txt
index 3d516dc18..eeaecaa39 100644
--- a/src/2geom/CMakeLists.txt
+++ b/src/2geom/CMakeLists.txt
@@ -94,6 +94,7 @@ set(2geom_SRC
nearest-point.h
ord.h
path-intersection.h
+ path-sink.h
path.h
pathvector.h
piecewise.h
@@ -115,7 +116,6 @@ set(2geom_SRC
solver.h
svg-elliptical-arc.h
svg-path-parser.h
- svg-path.h
sweep.h
toposweep.h
transforms.h
diff --git a/src/2geom/ellipse.cpp b/src/2geom/ellipse.cpp
index bea99e5dd..2686844b2 100644
--- a/src/2geom/ellipse.cpp
+++ b/src/2geom/ellipse.cpp
@@ -36,6 +36,7 @@
#include <2geom/numeric/fitting-tool.h>
#include <2geom/numeric/fitting-model.h>
+using std::swap;
namespace Geom
{
@@ -102,7 +103,7 @@ void Ellipse::set(double A, double B, double C, double D, double E, double F)
// the solution is not unique so we choose always the ellipse
// with a rotation angle between 0 and PI/2
- if ( swap_axes ) std::swap(rx, ry);
+ if ( swap_axes ) swap(rx, ry);
if ( are_near(rot, M_PI/2)
|| are_near(rot, -M_PI/2)
|| are_near(rx, ry) )
@@ -233,7 +234,7 @@ Ellipse Ellipse::transformed(Affine const& m) const
Point new_center = center() * m;
Affine M = m.withoutTranslation();
Affine AM = A * M;
- if ( are_near(AM.det(), 0) )
+ if ( are_near(std::sqrt(fabs(AM.det())), 0) )
{
double angle;
if (AM[0] != 0)
@@ -262,7 +263,7 @@ Ellipse Ellipse::transformed(Affine const& m) const
Affine invm = M.inverse();
Q = invm * Q ;
- std::swap( invm[1], invm[2] );
+ swap( invm[1], invm[2] );
Q *= invm;
Ellipse e(Q[0], 2*Q[1], Q[3], 0, 0, -1);
e.m_centre = new_center;