Code

support for transform elements in hpgl (Bug 600472)
[inkscape.git] / src / sp-polygon.cpp
index 04046a47d81982a3ad07b26d5a616f110d0a6a85..014c68c9b75652ba8af992a904325b2c0daca8db 100644 (file)
@@ -19,6 +19,9 @@
 #include "display/curve.h"
 #include <glibmm/i18n.h>
 #include <2geom/pathvector.h>
+#include <2geom/bezier-curve.h>
+#include <2geom/hvlinesegment.h>
+#include "helper/geom-curves.h"
 #include "svg/stringstream.h"
 #include "xml/repr.h"
 #include "document.h"
@@ -96,9 +99,7 @@ static gchar *sp_svg_write_polygon(Geom::PathVector const & pathv)
 
     for (Geom::PathVector::const_iterator pit = pathv.begin(); pit != pathv.end(); ++pit) {
         for (Geom::Path::const_iterator cit = pit->begin(); cit != pit->end_default(); ++cit) {
-            if ( dynamic_cast<Geom::LineSegment const *>(&*cit) ||
-                 dynamic_cast<Geom::HLineSegment const *>(&*cit) ||
-                 dynamic_cast<Geom::VLineSegment const *>(&*cit) )
+            if ( is_straight_curve(*cit) )
             {
                 os << cit->finalPoint()[0] << "," << cit->finalPoint()[1] << " ";
             } else {