Changeset 1531 for trunk/gui/scripts/heightmapviewer.tcl
- Timestamp:
- Jun 26, 2009, 1:16:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/heightmapviewer.tcl
r1496 r1531 24 24 option add *HeightmapViewer.plotForeground white widgetDefault 25 25 option add *HeightmapViewer.plotOutline white widgetDefault 26 option add *HeightmapViewer.font \ 27 -*-helvetica-medium-r-normal-*-12-* widgetDefault 26 option add *HeightmapViewer.font -*-helvetica-medium-r-normal-*-12-* widgetDefault 28 27 29 28 # must use this name -- plugs into Rappture::resources::load … … 660 659 if {"" == [$c find withtag transfunc]} { 661 660 $c create image 0 [expr $lineht] -anchor ne \ 662 -image $_image(legend) -tags transfunc 661 -image $_image(legend) -tags transfunc 663 662 $c create text 10 [expr {$h-8}] -anchor se \ 664 -fill $itk_option(-plotforeground) -tags vmin 663 -fill $itk_option(-plotforeground) -tags vmin \ 664 -font "Arial 8 bold" 665 665 $c create text [expr {$w-10}] [expr {$h-8}] -anchor ne \ 666 -fill $itk_option(-plotforeground) -tags vmax 666 -fill $itk_option(-plotforeground) -tags vmax \ 667 -font "Arial 8 bold" 667 668 } 668 669 $c coords transfunc [expr $w - 5] [expr $lineht] … … 1037 1038 set style(-color) "white:yellow:green:cyan:blue:magenta" 1038 1039 } 1039 set clist [split $style(-color) :] 1040 set color white 1041 set cmap "0.0 [Color2RGB $color] " 1042 set range [expr $_limits(vmax) - $_limits(vmin)] 1043 for {set i 0} {$i < [llength $clist]} {incr i} { 1044 set xval [expr {double($i+1)/([llength $clist]+1)}] 1045 set color [lindex $clist $i] 1046 append cmap "$xval [Color2RGB $color] " 1047 } 1048 append cmap "1.0 [Color2RGB $color] " 1049 1040 if { [info exists style(-nonuniformcolors)] } { 1041 foreach { value color } $style(-nonuniformcolors) { 1042 append cmap "$value [Color2RGB $color] " 1043 } 1044 } else { 1045 set clist [split $style(-color) :] 1046 set cmap "0.0 [Color2RGB white] " 1047 for {set i 0} {$i < [llength $clist]} {incr i} { 1048 set x [expr {double($i+1)/([llength $clist]+1)}] 1049 set color [lindex $clist $i] 1050 append cmap "$x [Color2RGB $color] " 1051 } 1052 append cmap "1.0 [Color2RGB $color]" 1053 } 1050 1054 set opacity $style(-opacity) 1051 1055 set levels $style(-levels)
Note: See TracChangeset
for help on using the changeset viewer.