calcCenter

$fill calcCenter
updates private centerDot

obj method fill calcCenter {} {
  if {[llength [my lines]] > 0} then {
    lassign [$self bbox yes] left bottom right top
    set center [expr {($left+$right)/2.0}]
    set middle [expr {($top+$bottom)/2.0}]
    [my centerDot] configure -x $center -y $middle
    [my centerDot] storeXY
    list $center $middle
  }
}

© Wolf-Dieter Busch | Home | Sitemap | Urheber | A-Z