Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import flash.display.Bitmap;
- import flash.display.BitmapData;
- import flash.geom.Rectangle;
- class Main {
- public function new() {
- var bit = new BitmapData(512, 512, true), cl:Color = Color.fromRGB(0x0);
- for (b in 0 ... 16) {
- for (r in 0 ... 16) {
- for (g in 0 ... 16) {
- bit.fillRect(new Rectangle(
- (b % 4) * 128 + r * 8,
- Std.int(b / 4) * 128 + g * 8,
- 8, 8), cl);
- cl.g = cl.g + 16;
- }
- cl.r = cl.r + 16;
- }
- cl.b = cl.b + 16;
- }
- flash.Lib.current.addChild(new Bitmap(bit));
- }
- @:keep static function main() new Main();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement