From c2ec49616a2a7bc2d9ddd309f5fff0cb3f46bddc Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sat, 2 Aug 2008 22:52:40 +0000 Subject: simplify pathv_to_linear_and_cubic_beziers a bit (bzr r6536) --- src/helper/geom.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/helper/geom.cpp') 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); } } } -- cgit v1.2.3