summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-08-02 20:59:59 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-08-02 20:59:59 +0000
commitc7c49ab82f79eaf7155e624ff4fe4626c1529c35 (patch)
tree2df86753ae092f2615b5ac72827cb9e164b1652a /src
parentfix nodetype determination. fixes lpe spiro bug (diff)
downloadinkscape-c7c49ab82f79eaf7155e624ff4fe4626c1529c35.tar.gz
inkscape-c7c49ab82f79eaf7155e624ff4fe4626c1529c35.zip
use nodetype helper function to determine nodetype within lpe-spiro
(bzr r6530)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-spiro.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/live_effects/lpe-spiro.cpp b/src/live_effects/lpe-spiro.cpp
index 657ffc10b..6a98e6d29 100644
--- a/src/live_effects/lpe-spiro.cpp
+++ b/src/live_effects/lpe-spiro.cpp
@@ -160,14 +160,10 @@ LPESpiro::doEffect(SPCurve * curve)
bool next_is_line = ( dynamic_cast<Geom::LineSegment const *>(&*curve_it2) ||
dynamic_cast<Geom::HLineSegment const *>(&*curve_it2) ||
dynamic_cast<Geom::VLineSegment const *>(&*curve_it2) );
- Geom::Point deriv_1 = curve_it1->unitTangentAt(1);
- Geom::Point deriv_2 = curve_it2->unitTangentAt(0);
- double this_angle_L2 = Geom::L2(deriv_1);
- double next_angle_L2 = Geom::L2(deriv_2);
- double both_angles_L2 = Geom::L2(deriv_1 + deriv_2);
- if ( (this_angle_L2 > 1e-6) &&
- (next_angle_L2 > 1e-6) &&
- ((this_angle_L2 + next_angle_L2 - both_angles_L2) < 1e-3) )
+
+ Geom::NodeType nodetype = Geom::get_nodetype(*curve_it1, *curve_it2);
+
+ if ( nodetype == Geom::NODE_SMOOTH || nodetype == Geom::NODE_SYMM )
{
if (this_is_line && !next_is_line) {
path[ip].ty = ']';