Fixed bug #3101, problem on ellipse2poly function
authorStevenPuttemans <steven.puttemans@lessius.eu>
Wed, 17 Jul 2013 13:21:23 +0000 (15:21 +0200)
committerStevenPuttemans <steven.puttemans@lessius.eu>
Wed, 17 Jul 2013 13:21:23 +0000 (15:21 +0200)
modules/core/src/drawing.cpp

index 9e33408..fa0c5cf 100644 (file)
@@ -888,9 +888,10 @@ void ellipse2Poly( Point center, Size axes, int angle,
         pt.y = cvRound( cy + x * beta + y * alpha );
         if( pt != prevPt )
             pts.push_back(pt);
+            prevPt = pt;
     }
 
-    if( pts.size() < 2 )
+    if( pts.size() == 1 )
         pts.push_back(pts[0]);
 }