 
     private var _bounds:Rectangle;
 
-    private static var boundsShape:Shape = new Shape();
-    
     private function getBounds():Rectangle
     {
         if (_bounds)
             return _bounds;
 
-        
-        // Draw element at (0,0):
-        generateGraphicsPath(0,0,1,1);
-        boundsShape.graphics.clear();
-        boundsShape.graphics.drawPath(graphicsPath.commands, graphicsPath.data, winding);
-
-        // Get bounds
-        _bounds = boundsShape.getRect(boundsShape);
-        
-        graphicsPathChanged = true;
-        
-        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;
     }
 
     //--------------------------------------------------------------------------

        if (graphicsPathChanged)
        {
            var rcBounds:Rectangle = getBounds();
            var sx:Number = rcBounds.width == 0 ? 1 : width/rcBounds.width;
            var sy:Number = rcBounds.height == 0 ? 1 : height/rcBounds.height;
                        
            generateGraphicsPath(drawX,drawY,sx,sy);
            graphicsPathChanged = false;
        }
         

                                        control2X, control2Y, x, y));
                    break;
                case "z":
					// For a close segment, we generate a LineSegment to the last move point instead. 
					x = lastMoveX;
					y = lastMoveY;
                    newSegments.push(new LineSegment(x, y));
                    break;
                
                default:
