 
         var prevSegment:PathSegment;
         var pathBBox:Rectangle;
-        var lastMoveX:Number = 0;
-        var lastMoveY:Number = 0;
         
         for (var i:int = 0; i < segments.length; i++)
         {
             var segment:PathSegment = segments[i];
-            
-            if (segment is MoveSegment)
-            {
-                lastMoveX = segment.x;
-                lastMoveY = segment.y;
-            }
-            else if (segment is CloseSegment)
-            {   
-                segment = new LineSegment(lastMoveX, lastMoveY);     
-            }
-
             pathBBox = segment.getBoundingBox(prevSegment, sx, sy, m, pathBBox);
             prevSegment = segment;
         }
-        // If path is empty, it's untransformed bounding box is (0,0), so we return transformed point (0,0)
+
+		// If path is empty, it's untransformed bounding box is (0,0), so we return transformed point (0,0)
         if (!pathBBox)
             pathBBox = new Rectangle(m.tx, m.ty);
         return pathBBox;
     }
-    
+
     /**
      *  @private
      */

        measuredX = bounds.left;
        measuredY = bounds.top;
    }
    
    /**
     *  @private
     *  @return Returns the axis aligned bounding box of the path resized to width, height and then


    private var _bounds:Rectangle;

    private function getBounds():Rectangle
    {
        if (_bounds)
            return _bounds;

		// First, allocate temporary bounds, as getBoundingBox() requires
		// natual bounds to calculate a scaling factor
		_bounds = new Rectangle(0, 0, 1, 1);

		// Pass in the same size to getBoundingBox
		// so that the scaling factor is (1, 1).
		_bounds = getBoundingBox(1, 1, null /*Matrix*/);
		return _bounds;
    }

    //--------------------------------------------------------------------------
