- Timestamp:
- Jan 15, 2014, 2:18:29 PM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/nanovisviewer.tcl
r4088 r4121 217 217 218 218 array set _settings [subst { 219 background black 219 220 $this-ambient 60 220 221 $this-colormap default … … 1246 1247 SwitchComponent $cname 1247 1248 } 1249 "background" { 1250 set bgcolor [$itk_component(background) value] 1251 array set fgcolors { 1252 "black" "white" 1253 "white" "black" 1254 "grey" "black" 1255 } 1256 configure -plotbackground $bgcolor \ 1257 -plotforeground $fgcolors($bgcolor) 1258 DrawLegend $_current 1259 } 1248 1260 ambient { 1249 1261 set val $_settings($this-ambient) … … 1679 1691 -font "Arial 9" 1680 1692 1693 label $inner.background_l -text "Background" -font "Arial 9" 1694 itk_component add background { 1695 Rappture::Combobox $inner.background -width 10 -editable no 1696 } 1697 $inner.background choices insert end \ 1698 "black" "black" \ 1699 "white" "white" \ 1700 "grey" "grey" 1701 1702 $itk_component(background) value $_settings(background) 1703 bind $inner.background <<Value>> [itcl::code $this AdjustSetting background] 1704 1681 1705 blt::table $inner \ 1682 1706 0,0 $inner.axes -cspan 2 -anchor w \ … … 1684 1708 2,0 $inner.outline -cspan 2 -anchor w \ 1685 1709 3,0 $inner.volume -cspan 2 -anchor w \ 1686 4,0 $inner.legend -cspan 2 -anchor w 1710 4,0 $inner.legend -cspan 2 -anchor w \ 1711 5,0 $inner.background_l -anchor e -pady 2 \ 1712 5,1 $inner.background -fill x \ 1687 1713 1688 1714 if 0 { … … 1690 1716 } 1691 1717 blt::table configure $inner r* -resize none 1692 blt::table configure $inner r 5-resize expand1718 blt::table configure $inner r6 -resize expand 1693 1719 } 1694 1720 -
trunk/gui/scripts/transferfunctioneditor.tcl
r4088 r4121 127 127 set _labels($name) [$_canvas create text 0 $h \ 128 128 -anchor n -fill white -font "Helvetica 8" \ 129 -tags " $this $_name" -state $state]129 -tags "labels $this $_name" -state $state] 130 130 set _id2name($_ticks($name)) $name 131 131 $_canvas bind $_ticks($name) <Enter> [itcl::code $this EnterTick $name] -
trunk/gui/scripts/vtkvolumeviewer.tcl
r4119 r4121 64 64 public method updateTransferFunctions {} 65 65 66 private method BuildViewTab {} 66 67 private method BuildVolumeComponents {} 67 68 private method ComputeAlphamap { cname } … … 246 247 axisGridZ 0 247 248 axisLabels 1 249 background black 248 250 cutplaneEdges 0 249 251 cutplaneLighting 1 … … 367 369 368 370 if { [catch { 371 BuildViewTab 369 372 BuildVolumeTab 370 373 BuildCutplaneTab … … 1021 1024 } 1022 1025 DoRotate 1023 InitSettings axisGridX axisGridY axisGridZ axisFlyMode \1026 InitSettings background axisGridX axisGridY axisGridZ axisFlyMode \ 1024 1027 axesVisible axisLabels 1025 1028 PanCamera … … 1376 1379 } 1377 1380 switch -- $what { 1381 "background" { 1382 set bgcolor [$itk_component(background) value] 1383 array set fgcolors { 1384 "black" "white" 1385 "white" "black" 1386 "grey" "black" 1387 } 1388 configure -plotbackground $bgcolor \ 1389 -plotforeground $fgcolors($bgcolor) 1390 $itk_component(view) delete "legend" 1391 DrawLegend 1392 } 1378 1393 "volumeVisible" { 1379 1394 set bool $_settings(volumeVisible) … … 1614 1629 itcl::configbody Rappture::VtkVolumeViewer::plotbackground { 1615 1630 if { [isconnected] } { 1616 foreach {r g b} [Color2RGB $itk_option(-plotbackground)] break 1617 SendCmd "screen bgcolor $r $g $b" 1631 set color $itk_option(-plotbackground) 1632 set rgb [Color2RGB $color] 1633 SendCmd "screen bgcolor $rgb" 1634 $itk_component(legend) configure -background $color 1618 1635 } 1619 1636 } … … 1624 1641 itcl::configbody Rappture::VtkVolumeViewer::plotforeground { 1625 1642 if { [isconnected] } { 1626 foreach {r g b} [Color2RGB $itk_option(-plotforeground)] break 1627 #fix this! 1628 #SendCmd "color background $r $g $b" 1629 } 1643 set color $itk_option(-plotforeground) 1644 set rgb [Color2RGB $color] 1645 SendCmd "axis color all $rgb" 1646 SendCmd "outline color $rgb" 1647 SendCmd "cutplane color $rgb" 1648 $itk_component(legend) itemconfigure labels -fill $color 1649 $itk_component(legend) itemconfigure limits -fill $color 1650 } 1651 } 1652 1653 itcl::body Rappture::VtkVolumeViewer::BuildViewTab {} { 1654 foreach { key value } { 1655 grid 0 1656 axes 1 1657 outline 0 1658 volume 1 1659 legend 1 1660 particles 1 1661 lic 1 1662 } { 1663 set _settings($this-$key) $value 1664 } 1665 1666 set fg [option get $itk_component(hull) font Font] 1667 #set bfg [option get $itk_component(hull) boldFont Font] 1668 1669 set inner [$itk_component(main) insert end \ 1670 -title "View Settings" \ 1671 -icon [Rappture::icon wrench]] 1672 $inner configure -borderwidth 4 1673 1674 checkbutton $inner.axes \ 1675 -text "Axes" \ 1676 -variable [itcl::scope _settings(axesVisible)] \ 1677 -command [itcl::code $this AdjustSetting axesVisible] \ 1678 -font "Arial 9" 1679 1680 checkbutton $inner.outline \ 1681 -text "Outline" \ 1682 -variable [itcl::scope _settings(outline)] \ 1683 -command [itcl::code $this AdjustSetting outline] \ 1684 -font "Arial 9" 1685 1686 checkbutton $inner.legend \ 1687 -text "Legend" \ 1688 -variable [itcl::scope _settings(legendVisible)] \ 1689 -command [itcl::code $this AdjustSetting legendVisible] \ 1690 -font "Arial 9" 1691 1692 checkbutton $inner.volume \ 1693 -text "Volume" \ 1694 -variable [itcl::scope _settings(volumeVisible)] \ 1695 -command [itcl::code $this AdjustSetting volumeVisible] \ 1696 -font "Arial 9" 1697 1698 label $inner.background_l -text "Background" -font "Arial 9" 1699 itk_component add background { 1700 Rappture::Combobox $inner.background -width 10 -editable no 1701 } 1702 $inner.background choices insert end \ 1703 "black" "black" \ 1704 "white" "white" \ 1705 "grey" "grey" 1706 1707 $itk_component(background) value $_settings(background) 1708 bind $inner.background <<Value>> [itcl::code $this AdjustSetting background] 1709 1710 blt::table $inner \ 1711 0,0 $inner.axes -cspan 2 -anchor w \ 1712 1,0 $inner.outline -cspan 2 -anchor w \ 1713 2,0 $inner.volume -cspan 2 -anchor w \ 1714 3,0 $inner.legend -cspan 2 -anchor w \ 1715 4,0 $inner.background_l -anchor e -pady 2 \ 1716 4,1 $inner.background -fill x \ 1717 1718 blt::table configure $inner r* -resize none 1719 blt::table configure $inner r5 -resize expand 1630 1720 } 1631 1721
Note: See TracChangeset
for help on using the changeset viewer.