Changeset 2486 for trunk


Ignore:
Timestamp:
Sep 6, 2011, 10:55:01 PM (13 years ago)
Author:
ldelgass
Message:

Fix legend height - request legend with vertical aspect, don't need to rotate
image.

File:
1 edited

Legend:

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

    r2472 r2486  
    703703    set bytes [ReceiveBytes $info(-bytes)]
    704704    foreach { _view(ortho-x) _view(ortho-y) _view(ortho-w) _view(ortho-h) } $info(-bbox) break
    705     puts stderr "bbox: $_view(ortho-x) $_view(ortho-y) $_view(ortho-w) $_view(ortho-h)"
     705    #puts stderr "bbox: $_view(ortho-x) $_view(ortho-y) $_view(ortho-w) $_view(ortho-h)"
    706706    if { $info(-type) == "image" } {
    707707        $_image(plot) configure -data $bytes
     
    725725    set lineht [font metrics $itk_option(-font) -linespace]
    726726    set c $itk_component(legend)
    727     set w [expr {[winfo height $itk_component(view)]-20}]
    728     set h 45
     727    set w 20
     728    set h [expr {[winfo height $itk_component(view)] - 2 * ($lineht+2)}]
    729729    puts stderr "in fixlegend w=$w h=$h"
    730730    if {$w > 0 && $h > 0 && $_first != "" } {
     
    790790            set _image(legend) [image create photo]
    791791        }
     792        $_image(legend) configure -data $bytes
    792793        puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>"
    793         set src [image create photo -data $bytes]
    794         blt::winop image rotate $src $_image(legend) 90
    795         set dst $_image(legend)
    796794        DrawLegend
    797795    }
Note: See TracChangeset for help on using the changeset viewer.