rotateObj

$line rotateObj x y xC yC dist dPhi scale draw
rotates object interactively

obj method line rotateObj {x y xC yC dist {dPhi 0} {scale no} {draw yes}} {
  if {[$self constraint orient]} then {
    set centerDot [my centerDot]
    lassign [$centerDot storeXY info] centerX centerY
    $centerDot rotateObj $x $y $xC $yC $dist $dPhi $scale
    set dx [- [$centerDot cget -x] $centerX]
    set dy [- [$centerDot cget -y] $centerY]
    lappend transformL moveHorizontal $dx moveVertical $dy
    $self dots transform {*}$transformL
  } else {
    $self dots rotateObj $x $y $xC $yC $dist $dPhi $scale
  }
  if {$draw} then {
    $self dots lines draw coords
  }
}

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