Problem with gradient filling and html5


matrix = new Matrix();
matrix.createGradientBox( 2 * radius, 2 * radius, 0, -radius, -radius);

stamp = new Sprite(); GradientType.RADIAL, [ 0xFF0000, 0xFF0000 ], [ 1, 0 ], [ 128, 255 ], matrix ); 0, 0, radius);;

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…

When I try your code and build to HTML5, I get a centered gradient like expected:

Are you able to screenshot what you are seeing? I tried this with both OpenFL 3.6.0 and 3.6.1.

Well, actually you are right…
I made a new project with this code, and it works.
I made of a fork of the project where I have this issue and simplified it, it works.
But I still have a clear offset when I run html5 (and only html5) with my project.

I guess I’ll have to keep digging.
Thanks for your input, and sorry for not testing the code before I posted.