diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-12-02 23:14:54 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-12-02 23:14:54 +0000 |
| commit | c17292fc068e26bbcefcc8778daa5cb07c82f065 (patch) | |
| tree | 32f34d1c96cc45518536a2b29ca6c3d674d1b094 /src/nodepath.cpp | |
| parent | copyedit labels for clarity (diff) | |
| download | inkscape-c17292fc068e26bbcefcc8778daa5cb07c82f065.tar.gz inkscape-c17292fc068e26bbcefcc8778daa5cb07c82f065.zip | |
Fix compile. Don't #include .cpp files!
(bzr r4157)
Diffstat (limited to 'src/nodepath.cpp')
| -rw-r--r-- | src/nodepath.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/nodepath.cpp b/src/nodepath.cpp index f48a83b4f..1239f961b 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -49,6 +49,7 @@ #include <algorithm> #include "live_effects/lpeobject.h" #include "live_effects/parameter/parameter.h" +#include "util/mathfns.h" class NR::Matrix; @@ -4047,15 +4048,6 @@ static void sp_nodepath_subpath_open(Inkscape::NodePath::SubPath *sp,Inkscape::N } /** - * Returns area in triangle given by points; may be negative. - */ -inline double -triangle_area (NR::Point p1, NR::Point p2, NR::Point p3) -{ - return (p1[NR::X]*p2[NR::Y] + p1[NR::Y]*p3[NR::X] + p2[NR::X]*p3[NR::Y] - p2[NR::Y]*p3[NR::X] - p1[NR::Y]*p2[NR::X] - p1[NR::X]*p3[NR::Y]); -} - -/** * Return new node in subpath with given properties. * \param pos Position of node. * \param ppos Handle position in previous direction @@ -4079,7 +4071,7 @@ sp_nodepath_node_new(Inkscape::NodePath::SubPath *sp, Inkscape::NodePath::Node * // use the type from sodipodi:nodetypes n->type = type; } else { - if (fabs (triangle_area (*pos, *ppos, *npos)) < 1e-2) { + if (fabs (Inkscape::Util::triangle_area (*pos, *ppos, *npos)) < 1e-2) { // points are (almost) collinear if (NR::L2(*pos - *ppos) < 1e-6 || NR::L2(*pos - *npos) < 1e-6) { // endnode, or a node with a retracted handle |
