+ if {$nparents($id) > 2} {
+ set xt [expr {$xt + ($nparents($id) - 2) * $linespc}]
+ }
+ if {[info exists idtags($id)] && $idtags($id) != {}} {
+ set delta [expr {int(0.5 * ($linespc - $lthickness))}]
+ set yt [expr $canvy - 0.5 * $linespc]
+ set yb [expr $yt + $linespc - 1]
+ set xvals {}
+ set wvals {}
+ foreach tag $idtags($id) {
+ set wid [font measure $mainfont $tag]
+ lappend xvals $xt
+ lappend wvals $wid
+ set xt [expr {$xt + $delta + $wid + $lthickness + $linespc}]
+ }
+ set t [$canv create line $x $canvy [lindex $xvals end] $canvy \
+ -width $lthickness -fill black]
+ $canv lower $t
+ foreach tag $idtags($id) x $xvals wid $wvals {
+ set xl [expr $x + $delta]
+ set xr [expr $x + $delta + $wid + $lthickness]
+ $canv create polygon $x [expr $yt + $delta] $xl $yt\
+ $xr $yt $xr $yb $xl $yb $x [expr $yb - $delta] \
+ -width 1 -outline black -fill yellow
+ $canv create text $xl $canvy -anchor w -text $tag \
+ -font $mainfont
+ }
+ }