there seem to be an issue drawing gradients created with rotation into a BitmapData, it behaves quite differently in html5/neko vs flash (as in flash version does the expected thing).
the core of the code is:
var bitmapData = new BitmapData(HW, H, false, 0x000000);
var matrix = new flash.geom.Matrix();
matrix.identity();
matrix.createGradientBox(HW, H, Math.PI / 2, 0, 0);
var box = new Sprite();
box.graphics.clear();
box.graphics.lineStyle(0, 0x000000, 0);
box.graphics.beginGradientFill(flash.display.GradientType.LINEAR, [0xFF0000, 0x0000FF], [1.0, 1.0], [0, 0xFF], matrix);
box.graphics.drawRect(0, 0, HW, H);
box.graphics.endFill();
matrix.identity();
bitmapData.draw(box, matrix);
the result can be seen in the attached image.
here’s a link to the full test project: http://www.pirongames.com/private/drawgradient90.zip
thanks for looking into this.