- regsub {[a-z][a-z]} $text {} text
-
- set stackx $x
- incr stackx 2
- set tid [canvas-horiz-stack stackx $y \
- text -anchor nw -font fixed -text $qty]
- incr stackx -1
- canvas-horiz-stack stackx [expr {$y+2}] \
- image -anchor nw -image ship-icon/$vc_code2abbrev([lindex [split $code _] 1])
- incr stackx
- canvas-horiz-stack stackx $y \
- text -anchor nw -font fixed -text $text
-
- set bbox [$canvas bbox $tid]
- set ny [lindex $bbox 3]
- puts "$tid $bbox"
- set bid [$canvas create rectangle \
- $x $y $stackx $ny \
- -fill white]
-
- set y $ny
- $canvas lower $bid $tid
-
- $canvas bind $tid <ButtonPress> [list show-report $islandname $code]
- $canvas bind $bid <ButtonPress> [list show-report $islandname $code]
- manyset $bbox dummy dummy dummy y
+ if {$c > 1} { set qty [format %d $c] } else { set qty {} }
+ code2canvas $code $canvas $x y $qty 2 \
+ [list show-report $islandname $code]