Drawing stuff like lines, shapes, circles, rectangle on an image:
var shape = new nme.display.Shape();
var g = shape.graphics;
g.beginFill( 0xffffff );
g.lineStyle(1,0x000000);
g.drawRect(8,8,280,280);
g.moveTo(32,32);
g.lineTo(128,128);
g.endFill();
var bmp = new BitmapData(64,64,true, 0x00000000 );
bmp.draw(shape);
var b=new Bitmap(bmp);
attachImageToHUD(new BitmapWrapper(b), 0,0);
or:
bd = new BitmapData(Std.int(shapeWidth), Std.int(shapeHeight), true, 0);
var s = new Shape();
s.graphics.lineStyle(2, 204);
s.graphics.drawCircle(50, 50, 20);
bd.draw(s);
attachImageToHUD(new BitmapWrapper(new Bitmap(bd)), 0, 0);