I'm new to Emergence Basic but not programming. I've programmed in VB, C, C+, Fortran and every olde school language. I'm working on a graphic design program and want to have "rubber banding" of lines and bezier curves. I've done it in VB but am running into difficulties with ebasic. I believe this is mainly to ignorance of ebasic. I have been play with the example "draw.eba". It rubber bands ellipses and rectangles. When I use the same methodology for lines, it just flickers.
You need to call LINE (the first one) using previous coordinates:
SUB handlemouse(mx:int,my:int,qual:int)
IF(qual = 1)
RASTERMODE mywin,@RMXORPEN
SELECT mode
case 0
' use tempx,tempy (previous coordinates)
LINE mywin,l,t,tempx,tempy,RGB(255,255,255)
case 1
RECT mywin,l,t,w,h,RGB(255,255,255)
case 2
ELLIPSE mywin,l,t,w,h,RGB(255,255,255)
ENDSELECT
w = mx - l
h = my - t
SELECT mode
case 0
LINE mywin,l,t,mx,my,RGB(255,255,255)
case 1
RECT mywin,l,t,w,h,RGB(255,255,255)
case 2
ELLIPSE mywin,l,t,w,h,RGB(255,255,255)
ENDSELECT
RASTERMODE mywin,@RMCOPYPEN
ENDIF
tempx = mx
tempy = my
RETURN
ENDSUB
Thank you so much and no it makes sense to me.