add blend mode tests
[swfdec.git] / test / image / setPixel.as
blob3075a3c2c4fee6b58b2ba4e303441f78247474a1
1 // makeswf -v 7 -s 200x150 -r 1 -o setPixel.swf setPixel.as
3 bg = new flash.display.BitmapData (200, 150, true, 0x80808080);
4 for (x = 0; x < bg.width; x++) {
5 for (y = 0; y < bg.height; y++) {
6 bg.setPixel (x, y, 255 - int (256 * x / bg.width));
9 this.attachBitmap (bg, 0);
11 fg = new flash.display.BitmapData (_width, _height, true, 0);
12 for (x = 0; x < fg.width; x++) {
13 for (y = 0; y < fg.height; y++) {
14 fg.setPixel32 (x, y, 0x1010000 * int (256 * y / fg.height) | 0x100 * int (256 * x / fg.width));
17 this.attachBitmap (fg, 1);