scaleObjNumeric

$line scaleObjNumeric cx cy fx fy
scales line with center cx, cy by factor fx, fy

obj method line scaleObjNumeric {cx cy fx fy} {
  if {[$self constraint size]} then {
    set centerDot [my centerDot]
    set x0 [$centerDot cget -x]
    set y0 [$centerDot cget -y]
    $centerDot scaleObjNumeric $cx $cy $fx $fy
    set x1 [$centerDot cget -x]
    set y1 [$centerDot cget -y]
    set dx [- $x1 $x0]
    set dy [- $y1 $y0]
    $self dots transform moveHorizontal $dx moveVertical $dy 
  } else {
    $self dots scaleObjNumeric $cx $cy $fx $fy
  }
  $self draw
}

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