74 |
iy= atof(form['image.y'].value) |
iy= atof(form['image.y'].value) |
75 |
owidth= atof(form['owidth'].value) |
owidth= atof(form['owidth'].value) |
76 |
oheight= atof(form['oheight'].value) |
oheight= atof(form['oheight'].value) |
77 |
diagp= math.sqrt(width**2 + height**2) |
diagp= math.sqrt(owidth**2 + oheight**2) |
78 |
scale= diagp/diag |
scale= diagp/diag |
79 |
cx= (ix/scale) + (cx - (width / (scale*2))) |
cx= (ix/scale) + (cx - (owidth / (scale*2))) |
80 |
cy= ((height-iy)/scale) + (cy - (height / (scale*2))) |
cy= ((oheight-iy)/scale) + (cy - (oheight / (scale*2))) |
81 |
if form.has_key('zoom'): |
if form.has_key('zoom'): |
82 |
zoom=atof(form['zoom'].value) |
zoom=atof(form['zoom'].value) |
83 |
diag=diag/zoom |
diag=diag/zoom |