     //--------------------------------------------------------------------------
 
     /**
-     *  @inheritDoc
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    private static var commonMatrix:Matrix = new Matrix();
-
-    /**
      *  @inheritdoc
      */
-    override public function apply(graphics:Graphics, bounds:Rectangle = null):void
+    override public function apply(graphics:Graphics, targetBounds:Rectangle, targetOrigin:Point):void
 	{
 		commonMatrix.identity();
 		
         graphics.lineStyle(weight, 0, 1, pixelHinting, scaleMode,
                     caps, joints, miterLimit);
         
-        if (bounds)
-        	calculateTransformationMatrix(bounds, commonMatrix); 
+        if (targetBounds)
+        	calculateTransformationMatrix(targetBounds, commonMatrix, targetOrigin); 
         
         graphics.lineGradientStyle(GradientType.LINEAR, colors,
                             alphas, ratios,

import flash.display.GraphicsGradientFill;
import flash.display.GraphicsStroke;
import flash.geom.Matrix;
import flash.geom.Rectangle;

import mx.core.mx_internal;

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