Changeset 4481 for branches/1.3/gui/scripts/vtkglyphviewer.tcl
- Timestamp:
- Jul 10, 2014 6:08:15 AM (10 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
- Property svn:mergeinfo changed
/trunk merged: 4169,4344
- Property svn:mergeinfo changed
-
branches/1.3/gui/scripts/vtkglyphviewer.tcl
r4455 r4481 1 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 3 2 # ---------------------------------------------------------------------- 4 3 # COMPONENT: vtkglyphviewer - Vtk 3D glyphs object viewer … … 8 7 # ====================================================================== 9 8 # AUTHOR: Michael McLennan, Purdue University 10 # Copyright (c) 2004-20 05 Purdue Research Foundation9 # Copyright (c) 2004-2014 HUBzero Foundation, LLC 11 10 # 12 11 # See the file "license.terms" for information on usage and … … 1478 1477 itcl::body Rappture::VtkGlyphViewer::RequestLegend {} { 1479 1478 set _legendPending 0 1480 if { ![info exists _fields($_curFldName)] } { 1481 return 1482 } 1479 set font "Arial 8" 1480 set w 12 1481 set lineht [font metrics $font -linespace] 1482 # color ramp height = (canvas height) - (min and max value lines) - 2 1483 set h [expr {$_height - 2 * ($lineht + 2)}] 1484 1483 1485 set fname $_curFldName 1484 set font "Arial 8"1485 set lineht [font metrics $font -linespace]1486 set w 121487 set h [expr {$_height - 2 * ($lineht + 2)}]1488 if { $h < 1 } {1489 return1490 }1491 1486 if { [string match "component*" $fname] } { 1492 1487 set title "" … … 1504 1499 if { $title != "" } { 1505 1500 incr h -$lineht 1501 } 1502 if { $h < 1 } { 1503 return 1506 1504 } 1507 1505 # Set the legend on the first heightmap dataset. … … 2299 2297 # If there's a legend title, create a text item for the title. 2300 2298 $c create text $x $y \ 2301 -anchor ne \ 2302 -fill $itk_option(-plotforeground) -tags "title legend" \ 2303 -font $font 2304 incr y $lineht 2299 -anchor ne \ 2300 -fill $itk_option(-plotforeground) -tags "title legend" \ 2301 -font $font 2302 if { $title != "" } { 2303 incr y $lineht 2304 } 2305 2305 $c create text $x $y \ 2306 2307 2308 2306 -anchor ne \ 2307 -fill $itk_option(-plotforeground) -tags "vmax legend" \ 2308 -font $font 2309 2309 incr y $lineht 2310 2310 $c create image $x $y \ 2311 2312 2311 -anchor ne \ 2312 -image $_image(legend) -tags "colormap legend" 2313 2313 $c create rectangle $x $y 1 1 \ 2314 2314 -fill "" -outline "" -tags "sensor legend" 2315 2315 $c create text $x [expr {$h-2}] \ 2316 2317 2318 2316 -anchor se \ 2317 -fill $itk_option(-plotforeground) -tags "vmin legend" \ 2318 -font $font 2319 2319 $c bind sensor <Enter> [itcl::code $this EnterLegend %x %y] 2320 2320 $c bind sensor <Leave> [itcl::code $this LeaveLegend]
Note: See TracChangeset
for help on using the changeset viewer.