calcCenter

$line calcCenter
updates private centerDot

obj method line calcCenter {} {
  if {[llength [my dots]] > 0} then {
    lassign [$self bbox true] 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