Changeset 4166


Ignore:
Timestamp:
Feb 1, 2014, 8:21:56 PM (6 years ago)
Author:
ldelgass
Message:

More transfer function fixes: Fix moving markers in flowvisviewer (was broken
in r3930), fix marker label colors in nanovis. Note: there is probably a better
way to propagate the foreground color to the transfer function editor widget.

Location:
trunk/gui/scripts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/flowvisviewer.tcl

    r4165 r4166  
    6969    public method isconnected {}
    7070    public method limits { cname }
    71     public method overmarker { m x }
     71    public method overMarker { m x }
    7272    public method parameters {title args} {
    7373        # do nothing
    7474    }
    75     public method rmdupmarker { m x }
     75    public method removeDuplicateMarker { m x }
    7676    public method scale {args}
    77     public method updatetransferfuncs {}
     77    public method updateTransferFunctions {}
    7878
    7979    protected method Connect {}
     
    11031103    unset _recvObjs($tag)
    11041104    if { [array size _recvObjs] == 0 } {
    1105         updatetransferfuncs
     1105        updateTransferFunctions
    11061106    }
    11071107}
     
    16311631                set tf $_activeTf
    16321632                set _settings($this-$tf-opacity) $opacity
    1633                 updatetransferfuncs
     1633                updateTransferFunctions
    16341634            }
    16351635        }
     
    16421642                set tf $_activeTf
    16431643                set _settings($this-$tf-thickness) $sval
    1644                 updatetransferfuncs
     1644                updateTransferFunctions
    16451645            }
    16461646        }
     
    19111911        SendCmd "grid axiscolor $rgb"
    19121912        SendCmd "grid linecolor $rgb"
    1913         $itk_component(legend) itemconfigure labels -fill $color 
    1914         $itk_component(legend) itemconfigure limits -fill $color 
     1913        $itk_component(legend) itemconfigure labels -fill $color
     1914        $itk_component(legend) itemconfigure limits -fill $color
    19151915    }
    19161916}
     
    19461946            set x [expr {double($i)/($levels+1)}]
    19471947            set m [Rappture::IsoMarker \#auto $c $this $tf]
     1948            $itk_component(legend) itemconfigure labels -fill $itk_option(-plotforeground)
    19481949            $m relval $x
    19491950            lappend _isomarkers($tf) $m
     
    19521953        foreach x $levels {
    19531954            set m [Rappture::IsoMarker \#auto $c $this $tf]
     1955            $itk_component(legend) itemconfigure labels -fill $itk_option(-plotforeground)
    19541956            $m relval $x
    19551957            lappend _isomarkers($tf) $m
     
    19791981            set value [expr {$value * 0.01}]
    19801982            set m [Rappture::IsoMarker \#auto $c $this $tf]
     1983            $itk_component(legend) itemconfigure labels -fill $itk_option(-plotforeground)
    19811984            $m relval $value
    19821985            lappend _isomarkers($tf) $m
     
    19841987            # ${n} : Set absolute value.
    19851988            set m [Rappture::IsoMarker \#auto $c $this $tf]
     1989            $itk_component(legend) itemconfigure labels -fill $itk_option(-plotforeground)
    19861990            $m absval $value
    19871991            lappend _isomarkers($tf) $m
     
    19931997# USAGE: UndateTransferFuncs
    19941998# ----------------------------------------------------------------------
    1995 itcl::body Rappture::FlowvisViewer::updatetransferfuncs {} {
     1999itcl::body Rappture::FlowvisViewer::updateTransferFunctions {} {
    19962000    $_dispatcher event -after 100 !send_transfunc
    19972001}
     
    20042008    set c $itk_component(legend)
    20052009    set m [Rappture::IsoMarker \#auto $c $this $tf]
     2010    $itk_component(legend) itemconfigure labels -fill $itk_option(-plotforeground)
    20062011    set w [winfo width $c]
    20072012    $m relval [expr {double($x-10)/($w-20)}]
    20082013    lappend _isomarkers($tf) $m
    2009     updatetransferfuncs
     2014    updateTransferFunctions
    20102015    return 1
    20112016}
    20122017
    2013 itcl::body Rappture::FlowvisViewer::rmdupmarker { marker x } {
     2018itcl::body Rappture::FlowvisViewer::removeDuplicateMarker { marker x } {
    20142019    set tf [$marker transferfunc]
    20152020    set bool 0
     
    20312036        }
    20322037        set _isomarkers($tf) $list
    2033         updatetransferfuncs
     2038        updateTransferFunctions
    20342039    }
    20352040    return $bool
    20362041}
    20372042
    2038 itcl::body Rappture::FlowvisViewer::overmarker { marker x } {
     2043itcl::body Rappture::FlowvisViewer::overMarker { marker x } {
    20392044    set tf [$marker transferfunc]
    20402045    if { [info exists _isomarkers($tf)] } {
  • trunk/gui/scripts/isomarker.tcl

    r3930 r4166  
    5454    set _tick [$c create image 0 $h \
    5555                   -image $_normalIcon -anchor s \
    56                    -tags "$this $obj" -state hidden]
     56                   -tags "tick $this $obj" -state hidden]
    5757    set _label [$c create text 0 $h \
    5858                    -anchor n -fill white -font "Helvetica 8" \
    59                     -tags "$this $obj" -state hidden]
     59                    -tags "labels $this $obj" -state hidden]
    6060    $c bind $_tick <Enter>           [itcl::code $this EnterTick]
    6161    $c bind $_tick <Leave>           [itcl::code $this LeaveTick]
  • trunk/gui/scripts/nanovisviewer.tcl

    r4163 r4166  
    14941494    # Add a new marker to the current transfer function
    14951495    $_transferFunctionEditors($_current) newMarker $x $y normal
     1496    $itk_component(legend) itemconfigure labels -fill $itk_option(-plotforeground)
    14961497}
    14971498
     
    15691570    set _parsedFunction($cname) 1
    15701571    $_transferFunctionEditors($cname) addMarkers $list
     1572    $itk_component(legend) itemconfigure labels -fill $itk_option(-plotforeground)
    15711573}
    15721574
     
    16001602    set _parsedFunction($cname) 1
    16011603    $_transferFunctionEditors($cname) addMarkers $list
     1604    $itk_component(legend) itemconfigure labels -fill $itk_option(-plotforeground)
    16021605}
    16031606
Note: See TracChangeset for help on using the changeset viewer.