| 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 |
| 117 |
print '<INPUT TYPE=HIDDEN NAME="%s" VALUE="%s">' % var |
print '<INPUT TYPE=HIDDEN NAME="%s" VALUE="%s">' % var |
| 118 |
print '<INPUT TYPE=HIDDEN NAME=type VALUE="html">' |
print '<INPUT TYPE=HIDDEN NAME=type VALUE="html">' |
| 119 |
|
|
| 120 |
print """</FORM> |
print """</FORM><P> |
| 121 |
|
After changing any settings, don't forget to change the "Zoom" setting |
| 122 |
|
to "Pan" if you don't want to zoom when applying them. |
| 123 |
</BODY></HTML>""" |
</BODY></HTML>""" |
| 124 |
sys.exit(0) |
sys.exit(0) |
| 125 |
|
|