rotateObjNumeric

$line rotateObjNumeric arc xC yC
rotates object by arc degrees around xC, yC

obj method line rotateObjNumeric {arc xC yC} {
  if {[$self constraint orient]} then {
    set centerDot [my centerDot]
    set x0 [$centerDot cget -x]
    set y0 [$centerDot cget -y]
    $centerDot rotateObjNumeric $arc $xC $yC
    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 rotateObjNumeric $arc $xC $yC
  }
  $self draw
}

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