not quite sure, it seems to be the angle diagonally across the matrix.
I would still do a button for the crop factor
type FF, crop 1.6, crop 1.3 and so on.
In fact, the code is much smaller:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<!-- fov_to_focallength(Crop factor); For a full frame - 1 -->
<events name="showfocal" keep="true" onviewchanged="fov_to_focallength(1);" />
<layer name="pos_info2" keep="true" alpha="1" align="bottom" x="300" y="350" width="100" url="%SWFPATH%/plugins/textfield.swf" enabled="false"
padding="8" background="true" backgroundcolor="0x2D3E50" backgroundalpha="0.7" css="font-family:Courier; color:#FFFFFF; font-size:12px;" />
<action name="fov_to_focallength" >
Math.tan(field,calc(view.fov / 114.6));
calc(focal,21.622 / (field * %1));
copy(print_fov, view.fov);
roundval(focal, 1);
roundval(print_fov, 1);
calc(layer[pos_info2].html,'F = ' + focal + ' mm[br] FOV=' + print_fov + '°');
</action>
|