Changeset 4432
- Timestamp:
- Jun 25, 2014 2:44:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/vtkheightmapviewer.tcl
r4399 r4432 123 123 private variable _currentColormap "" 124 124 private variable _currentNumIsolines -1 125 private variable _currentOpacity 100.0; # Widget opacity setting126 # between 0 and 100127 128 125 129 126 private variable _maxScale 100; # This is the # of times the x-axis … … 239 236 -savelighting 1 240 237 -numisolines 10 241 -opacity 1 .0238 -opacity 100 242 239 -outline 0 243 240 -wireframe 0 244 -saveopacity 1 .0241 -saveopacity 100 245 242 -saveoutline 0 246 243 } 247 244 array set _changed { 248 -opacity 0 .0245 -opacity 0 249 246 -colormap 0 250 247 -numisolines 0 … … 1511 1508 set _settings(-heightmapscale) 0 1512 1509 set _settings(-lighting) 0 1513 set _settings(-opacity) 1 .01510 set _settings(-opacity) 100 1514 1511 set _settings(-outline) $_settings(-saveoutline) 1515 1512 } … … 1626 1623 "-opacity" { 1627 1624 set _changed($what) 1 1628 set _settings($what) [expr double($_currentOpacity) * 0.01]1625 set val [expr $_settings($what) * 0.01] 1629 1626 if { $_settings(-isheightmap) } { 1630 1627 set _settings(-saveopacity) $_settings($what) 1631 SendCmd "heightmap opacity $ _settings($what)"1628 SendCmd "heightmap opacity $val" 1632 1629 } else { 1633 1630 SendCmd "heightmap opacity 1.0" … … 1985 1982 itk_component add opacity { 1986 1983 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1987 -variable [itcl::scope _ currentOpacity] \1984 -variable [itcl::scope _settings(-opacity)] \ 1988 1985 -showvalue off \ 1989 1986 -command [itcl::code $this AdjustSetting -opacity] … … 2298 2295 2299 2296 if { $_changed(-opacity) } { 2300 set style(-opacity) $_settings(-opacity)2297 set style(-opacity) [expr $_settings(-opacity) * 0.01] 2301 2298 } 2302 2299 if { $_changed(-numisolines) } { … … 2313 2310 AdjustSetting -stretchtofit 2314 2311 } 2315 set _currentOpacity [expr $style(-opacity) * 100.0]2316 2312 2317 2313 if { $_currentNumIsolines != $style(-levels) } { … … 2336 2332 SendCmd "heightmap isolines $_settings(-isolinesvisible) $tag" 2337 2333 SendCmd "heightmap surface $_settings(-colormapvisible) $tag" 2334 SendCmd "heightmap opacity $style(-opacity) $tag" 2335 set _settings(-opacity) [expr $style(-opacity) * 100.0] 2338 2336 } 2339 2337
Note: See TracChangeset
for help on using the changeset viewer.