shearVobject

$line shearVobject x y x0 y0 LeftX mode draw
interactively shears object vertical

obj method line shearVobject {x y x0 y0 LeftX {mode parallel} {draw yes}} {
  if {[$self constraint shear]} then {
    set centerDot [my centerDot]
    lassign [$centerDot storeXY info] centerX centerY
    $centerDot shearVobject $x $y $x0 $y0 $LeftX $mode
    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 shearVobject $x $y $x0 $y0 $LeftX $mode
  }
  if {$draw} then {
    $self dots lines draw coords
  }
}

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