From cf6dc070b078f9ac6b34fc31bdbc2b60c6ba6327 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Sat, 2 Aug 2008 22:52:40 +0000 Subject: [PATCH] simplify pathv_to_linear_and_cubic_beziers a bit --- src/helper/geom.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp index dcb7b3eb4..ac8930412 100644 --- a/src/helper/geom.cpp +++ b/src/helper/geom.cpp @@ -509,23 +509,17 @@ pathv_to_linear_and_cubic_beziers( Geom::PathVector const &pathv ) output.back().close( pit->closed() ); for (Geom::Path::const_iterator cit = pit->begin(); cit != pit->end_open(); ++cit) { - if( dynamic_cast(&*cit) || + if( dynamic_cast(&*cit) || + dynamic_cast(&*cit) || dynamic_cast(&*cit) || dynamic_cast(&*cit) ) { output.back().append(*cit); } - else if(Geom::CubicBezier const *cubic_bezier = dynamic_cast(&*cit)) { - (void)cubic_bezier; - output.back().append(*cit); - } else { // convert all other curve types to cubicbeziers Geom::Path cubicbezier_path = Geom::cubicbezierpath_from_sbasis(cit->toSBasis(), 0.1); - - for(Geom::Path::iterator iter = cubicbezier_path.begin(); iter != cubicbezier_path.end(); ++iter) { - output.back().append(*iter); - } + output.back().append(cubicbezier_path); } } } -- 2.30.2