Fast wprintf
- Posted by marijan.lopac1 at zg.hinet.hr May 05, 2002
- 426 views
This is a multi-part message in MIME format. ------=_NextPart_000_0015_01C1F46B.7349A9D0 charset="iso-8859-1" -- Hello All. -- I need very very fast print of values at same locations on screen = like in example below, but this is=20 -- not enough for my application. Can somebody help me, with some other = solution. =20 -- In this example I have cca 8200 turns per seconds on my Athlon 700MHz include win32lib.ew without warning global constant win1 =3D create( Window, "Test win",0, 200, 200, 400, = 100,({WS_CAPTION, WS_SYSMENU}) ) global constant xax =3D create( CText, "", win1, 2, 2, 300, 12,0 ) global constant start =3D create( PushButton, "Start", win1, 16, 48, 60, = 20, 0 ) atom x_cur_pos,x_size,y_cur_pos,y_size,z_cur_pos,z_size,now integer line,code procedure on_click_start() x_cur_pos=3D1 y_cur_pos=3D1 z_cur_pos=3D1 x_size=3D0.0125 = y_size=3D0.0125 z_size=3D0.0125 line=3D0 code=3D0 now=3Dtime() while now+1 > time() do =20 wPrintf( xax, "N: %06d G: %02d X: %1.3f Y: %1.3f Z: %1.3f = ", {line,code/100,x_cur_pos*x_size,y_cur_pos*y_size,z_cur_pos*z_size} ) =20 x_cur_pos+=3D1 y_cur_pos+=3D1 z_cur_pos+=3D1 line+=3D1 code+=3D1=20 end while =20 end procedure onClick[start] =3D routine_id( "on_click_start" ) procedure onPaint_xax( integer x1, integer y1, integer x2, integer y2 ) setPenBkMode( xax, OPAQUE) end procedure onPaint[xax] =3D routine_id( "onPaint_xax" ) WinMain( win1, Normal ) -- Thanks ------=_NextPart_000_0015_01C1F46B.7349A9D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV>-- Hello All.</DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>-- I need very very fast print of = values at same=20 locations on screen like in example below, but this is = </FONT></DIV> <DIV><FONT face=3DArial size=3D2>-- not enough for my application. = Can=20 somebody help me, with some other solution.</FONT></DIV> <DIV><FONT face=3DArial size=3D2> </FONT></DIV> <DIV><FONT face=3DArial size=3D2>-- In this example I have cca 8200 = turns per=20 seconds on my Athlon 700MHz</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>include win32lib.ew<BR>without = warning<BR>global=20 constant win1 =3D create( Window, "Test win",0, 200, 200, 400, = 100,({WS_CAPTION,=20 WS_SYSMENU}) )<BR>global constant xax =3D create( CText, "", win1, 2, 2, = 300, 12,0=20 )<BR>global constant start =3D create( PushButton, "Start", win1, 16, = 48, 60, 20,=20 0 )<BR>atom = x_cur_pos,x_size,y_cur_pos,y_size,z_cur_pos,z_size,now<BR>integer=20 line,code</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>procedure on_click_start()<BR> = x_cur_pos=3D1=20 y_cur_pos=3D1 z_cur_pos=3D1 x_size=3D0.0125 y_size=3D0.0125 = z_size=3D0.0125 line=3D0=20 code=3D0<BR> now=3Dtime()<BR> while now+1 > time() = do<BR> =20 <BR> wPrintf( xax, "N: %06d G: %02d X: = %1.3f =20 Y: %1.3f Z: =20 %1.3f ",<BR> =20 {line,code/100,x_cur_pos*x_size,y_cur_pos*y_size,z_cur_pos*z_size} = )<BR> =20 <BR> x_cur_pos+=3D1 y_cur_pos+=3D1 z_cur_pos+=3D1 line+=3D1 = code+=3D1 <BR> end=20 while<BR> <BR> end procedure<BR> onClick[start] =3D = routine_id(=20 "on_click_start" )</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>procedure onPaint_xax( integer x1, = integer y1,=20 integer x2, integer y2 )<BR> setPenBkMode( xax, = OPAQUE)<BR> =20 end procedure<BR> onPaint[xax] =3D routine_id( "onPaint_xax" = )</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>WinMain( win1, Normal )</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial=20 size=3D2> &nbs= p;  = ; --=20 ------=_NextPart_000_0015_01C1F46B.7349A9D0--