Hello!
matrix = new Matrix();
matrix.identity();
matrix.createGradientBox( 2 * radius, 2 * radius, 0, -radius, -radius);
stamp = new Sprite();
stamp.graphics.beginGradientFill( GradientType.RADIAL, [ 0xFF0000, 0xFF0000 ], [ 1, 0 ], [ 128, 255 ], matrix );
stamp.graphics.drawCircle( 0, 0, radius);
stamp.graphics.endFill();
This code works just fine with flash and neko, but when targeting html5, the center of the gradient is not in the middle of the circle.
The matrix generated by createGradientBox is the same whatever the target, so I guess the problem is in the html5 implementation of drawing with a gradient fill.
I tried to check, but I simply have no idea where is the implementation…