(ViewPort.calc_min_max_scales): New.
Calculates the minimum and maximum scale values. Factored out
of set_view_transform so that it could be used to zoom all the
way into a single point.
(ViewPort.set_view_transform): Call calc_min_max_scales().
(ViewPort.FitSelectedToWindow): Zoom to the maximum scale
if only a single point is selected.
|