Changeset 3100


Ignore:
Timestamp:
Jul 17, 2012 7:00:28 AM (12 years ago)
Author:
gah
Message:

fixes for drawing. Allow empty html file.

Location:
trunk/gui/scripts
Files:
2 edited

Legend:

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

    r3079 r3100  
    407407        "outline"       "-outline"
    408408        "fill"          "-fill"
    409         "linewidth"     "-linewidth"
     409        "linewidth"     "-width"
    410410    }
    411411    #puts stderr "ParseOval owner=$_owner cpath=$cpath"
     
    414414    array set options {
    415415        -fill blue
    416         -linewidth 1
     416        -width 1
    417417        -outline black
    418418    }
     
    432432    }
    433433    foreach { x1 y1 x2 y2 } [ScreenCoords $coords] break
    434     set id [eval $itk_component(drawing) create oval $coords]
     434    set id [$itk_component(drawing) create oval $x1 $y1 $x2 $y2]
    435435    set _cname2id($cname) $id
     436    eval $itk_component(drawing) itemconfigure $id [array get options]
    436437}
    437438
     
    536537    array set attr2option {
    537538        "linewidth"     "-width"
    538         "arrow"         "-arrow"
    539539        "color"         "-fill"
    540540    }
    541541    # Set default options first and then let tool.xml override them.
    542542    array set options {
    543         -arrow          none
    544         -width          0
    545         -fill           black
     543        -width          1
     544        -fill           blue
     545        -outline        black
    546546    }
    547547    # Coords
     
    578578        "outline"       "-outline"
    579579        "fill"          "-fill"
    580         "linewidth"     "-linewidth"
     580        "linewidth"     "-width"
    581581    }
    582582    #puts stderr "ParseRectangle owner=$_owner cpath=$cpath"
     
    585585    array set options {
    586586        -fill blue
    587         -linewidth 1
     587        -width 1
    588588        -outline black
    589589    }
     
    602602    }
    603603    foreach { x1 y1 x2 y2 } [ScreenCoords $coords] break
    604     set id [eval $itk_component(drawing) create rectangle $coords]
     604    foreach { x1 y1 x2 y2 } [ScreenCoords $coords] break
     605    set id [$itk_component(drawing) create rectangle $x1 $y1 $x2 $y2]
     606puts stderr "$itk_component(drawing) create rectangle $x1 $y1 $x2 $y2"
    605607    set _cname2id($cname) $id
     608    eval $itk_component(drawing) itemconfigure $id [array get options]
    606609}
    607610
  • trunk/gui/scripts/htmlviewer.tcl

    r3098 r3100  
    304304        if {"" != $node} {
    305305            set bbox [$itk_component(html) bbox $node]
    306             if { $bbox != "" } {
    307                 set realht [expr {[lindex $bbox 3]-[lindex $bbox 1]}]
    308             }
     306            set realht [expr {[lindex $bbox 3]-[lindex $bbox 1]}]
    309307        }
    310308        if {$itk_option(-maxlines) > 0} {
Note: See TracChangeset for help on using the changeset viewer.