      *  @private
      *  Calculates this RadialGradientStroke's transformation matrix 
      */
-    private function calculateTransformationMatrix(rect:Rectangle, matrix:Matrix):void
+    private function calculateTransformationMatrix(targetBounds:Rectangle, matrix:Matrix, targetOrigin:Point):void
     {
     	matrix.identity();
     	
         if (!compoundTransform)
         {   
-            var w:Number = !isNaN(scaleX) ? scaleX : rect.width;
-	    	var h:Number = !isNaN(scaleY) ? scaleY : rect.height;
-			var regX:Number = rect.left + (!isNaN(x) ? x : rect.width / 2);
-			var regY:Number = rect.top + (!isNaN(y) ? y : rect.height / 2);
+            var w:Number = !isNaN(scaleX) ? scaleX : targetBounds.width;
+	    	var h:Number = !isNaN(scaleY) ? scaleY : targetBounds.height;
+			var regX:Number = !isNaN(x) ? x + targetOrigin.x : targetBounds.left + targetBounds.width / 2;
+			var regY:Number = !isNaN(y) ? y + targetOrigin.y : targetBounds.top + targetBounds.height / 2;
                 
             matrix.scale (w / GRADIENT_DIMENSION, h / GRADIENT_DIMENSION);
 	        matrix.rotate(!isNaN(_angle) ? _angle : rotationInRadians);
 	        matrix.translate(regX, regY);	    
         }             
         else
-        {         
+        {                     
             matrix.scale(1 / GRADIENT_DIMENSION, 1 / GRADIENT_DIMENSION);
             matrix.concat(compoundTransform.matrix);
-            matrix.translate(rect.left, rect.top);
+            matrix.translate(targetOrigin.x, targetOrigin.y);
         }   
     }
     

        super(weight, pixelHinting, scaleMode, caps, joints, miterLimit);
    }
    
    //----------------------------------
    //  focalPointRatio
    //----------------------------------

    //  Methods
    //
    //--------------------------------------------------------------------------

    /**
     *  @private 
     */
    override public function apply(graphics:Graphics, targetBounds:Rectangle, targetOrigin:Point):void
    {
    	commonMatrix.identity();
    	
        graphics.lineStyle(weight, 0, 1, pixelHinting, scaleMode,
                    caps, joints, miterLimit);
        
        if (targetBounds)
        	calculateTransformationMatrix(targetBounds, commonMatrix, targetOrigin); 
	        
        graphics.lineGradientStyle(GradientType.RADIAL, colors,
                            alphas, ratios, commonMatrix, 
