Code

dropper modes: replace undecipherable icons with text labels
[inkscape.git] / src / livarot / ShapeSweep.cpp
index 3e5a3bcafd93c74fac0230ffd5b5f5a4448bb652..18f8e3a69ee0209bd3a813a0eaa8d21bd1062511 100644 (file)
@@ -6,6 +6,9 @@
  *
  */
 
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 #include <glib/gmem.h>
 #include "Shape.h"
 #include "livarot/sweep-event-queue.h"
@@ -75,8 +78,11 @@ Shape::Reoriente (Shape * a)
   if (numberOfPoints() > maxPt)
     {
       maxPt = numberOfPoints();
-      if (_has_points_data)
-       pData.resize(maxPt);
+      if (_has_points_data) {
+        pData.resize(maxPt);
+        _point_data_initialised = false;
+        _bbox_up_to_date = false;
+        }
     }
 
   _aretes = a->_aretes;
@@ -168,7 +174,8 @@ Shape::ConvertToShape (Shape * a, FillRule directed, bool invert)
     }
     
     if ( directed != fill_justDont && directedEulerian(a) == false ) {
-       return shape_input_err;
+                       g_warning ("Shape error in ConvertToShape: directedEulerian(a) == false\n");
+                               return shape_input_err;
     }
   
     a->ResetSweep();
@@ -817,22 +824,6 @@ Shape::ConvertToShape (Shape * a, FillRule directed, bool invert)
   delete sEvts;
   sEvts = NULL;
 
-  if ( directed == fill_justDont ) {
-  } else {
-    if (directedEulerian(this) == false)
-    {
-//      Validate();
-      //              printf( "pas euclidian2");
-      MakePointData (false);
-      MakeEdgeData (false);
-      MakeSweepSrcData (false);
-      MakeSweepDestData (false);
-      a->CleanupSweep ();
-      _pts.clear();
-      _aretes.clear();
-      return shape_euler_err;
-    }
-  }
   MakePointData (false);
   MakeEdgeData (false);
   MakeSweepSrcData (false);