import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=255;bottom=263;image="\dayanjing_zimu_e.png")
winform.add()
/*}}*/
import win.ui.layered
import godking.paint
var lay = win.ui.layered(winform,1)
var i = 0;
var tm = time.tick();
var zz = 0;
var font = ::LOGFONT(name="宋体";h=12;color=0xFFFFFFFF;brush=null);
lay.onDrawBackground = function(graphics,left,top,width,height){
var z = time.tick();
i = i + 1;
var jd = math.round(i*1000/(time.tick()-tm),1);
var p = godking.paint.fromGraphics(graphics);
var text = tostring(..time())++'\n帧率:'++jd++"帧/秒"++'\n单次绘图耗时:'++math.round(zz/i,2)++"ms";
p.drawText(40,40,200,99,text,font,0,0,0);
z = time.tick()-z;
zz = zz + z;
}
winform.show();
winform.onMouseDown = function(wParam,lParam){
winform.hitCaption()
}
win.loopMessage();