summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a7fb5d4)
raw | patch | inline | side by side (parent: a7fb5d4)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sat, 2 Aug 2008 23:02:48 +0000 (23:02 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sat, 2 Aug 2008 23:02:48 +0000 (23:02 +0000) |
src/live_effects/lpe-spiro.cpp | patch | blob | history |
index 6a98e6d2990b274d9dda3e2445c78fe387910f37..44ba32e4dfb4451e62ffd074e8ab3f878ff4896a 100644 (file)
#include <2geom/bezier-curve.h>
#include <2geom/hvlinesegment.h>
#include "helper/geom-nodetype.h"
+#include "helper/geom-curves.h"
#include "live_effects/bezctx.h"
#include "live_effects/bezctx_intf.h"
// Determine type of spiro node this is, determined by the tangents (angles) of the curves
// TODO: see if this can be simplified by using /helpers/geom-nodetype.cpp:get_nodetype
- bool this_is_line = ( dynamic_cast<Geom::LineSegment const *>(&*curve_it1) ||
- dynamic_cast<Geom::HLineSegment const *>(&*curve_it1) ||
- dynamic_cast<Geom::VLineSegment const *>(&*curve_it1) );
- 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) );
+ bool this_is_line = is_straight_curve(*curve_it1);
+ bool next_is_line = is_straight_curve(*curve_it2);
Geom::NodeType nodetype = Geom::get_nodetype(*curve_it1, *curve_it2);