- Timestamp:
- Sep 9, 2013 3:07:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkheightmapviewer.tcl
r3899 r3912 124 124 private variable _currentOpacity "" 125 125 126 private variable _maxScale 100; # This is the # of times the x-axis 127 # and y-axis ranges can differ before 128 # automatically turning on 129 # -stretchtofit 130 126 131 private variable _click ; # info used for rotate operations 127 132 private variable _limits ; # Holds overall limits for all dataobjs … … 645 650 set _limits($fname) [list $fmin $fmax] 646 651 } 652 } 653 # Check if the range of the x and y axes requires that we stretch 654 # the contour to fit the plotting area. This can happen when the 655 # x and y scales differ greatly (> 100x) 656 foreach {xmin xmax} $_limits(x) break 657 foreach {ymin ymax} $_limits(y) break 658 if { (($xmax - $xmin) > (($ymax -$ymin) * $_maxScale)) || 659 ((($xmax - $xmin) * $_maxScale) < ($ymax -$ymin)) } { 660 set _settings(stretchToFit) 1 647 661 } 648 662 } … … 2264 2278 $itk_component(colormap) value $style(-color) 2265 2279 } 2280 if { [info exists style(-stretchtofit)] } { 2281 set _settings(stretchToFit) $style(-stretchtofit) 2282 AdjustSetting stretchToFit 2283 } 2266 2284 set _currentOpacity $style(-opacity) 2267 2285 if { $_currentNumIsolines != $style(-levels) } {
Note: See TracChangeset
for help on using the changeset viewer.