 import flash.display.GraphicsGradientFill;
 import flash.display.GraphicsStroke;
 import flash.geom.Matrix;
+import flash.geom.Point;
 import flash.geom.Rectangle;
 
 import mx.core.mx_internal;

    //  Methods
    //
    //--------------------------------------------------------------------------
    
    /**
     *  @inheritDoc
     *  
     *  @langversion 3.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion Flex 3
     */
	private static var commonMatrix:Matrix = new Matrix();

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

     *  @private
     *  Calculates this RadialGradientStroke's transformation matrix 
     */
    private function calculateTransformationMatrix(targetBounds:Rectangle, matrix:Matrix, targetOrigin:Point):void
    {
    	matrix.identity();
    	
        if (!compoundTransform)
        {   
            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(targetOrigin.x, targetOrigin.y);
        }   
    }
    
