calcCenter

$group calcCenter
updates private centerDot

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

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