I didn't understand well ,
I try to use this example ,
but
I dont have correct resaults yet.
I made this code , but is something wrong.
Where I put these lines?
-------------
xa# = x-x1
xb# = x2-x
xa# = xa#/c
xb# = xb#/c
-------------
My example code.
sync on:sync rate 60
set display mode 800,600,32
load image "d:\future3\map30.bmp",1
global x1,y1,x2,y2,c,xa,xb
global xa as float,xb as float
global zoomdelay
x1=10
y1=170
x2=780
y2=425
do
cls
paste image 1,0,160
if mouseclick()
x1=10
y1=170
x2=780
y2=425
xa = x-x1
xb = x2-x
xa = xa/100
xb = xb/100
ya = y-y1
yb = y2-y
ya = ya/100
yb = yb/100
x=mousex()
y=mousey()
`zoom(10,170,780,425)
endif
`zoom(x1,y1,x2,y2)
inc zoomdelay,1
if zoomdelay>5
if xa<x or ya<y
x1 = x1 + xa
x2 = x2 - xb
y1 = y1 + xa
y2 = y2 - xb
endif
zoomdelay=0
endif
zoom(x1,y1,x2,y2)
`zoom(xa,yb,xa,yb)
text 0,470,"x:"+str$(mousex())
text 0,480,"y:"+str$(mousey())
sync
loop
function zoom(x1,y1,x2,y2)
ink rgb(255,0,0),rgb(255,0,0)
line x1,y1,x2,y1
line x2,y1,x2,y2
line x2,y2,x1,y2
line x1,y2,x1,y1
endfunction
The map image is attached.