shearVobject

$dot shearVobject x y x0 y0 LeftX mode
moves dot object according to interactively shearing containing object vertical

obj method dot shearVobject {x y x0 y0 LeftX {mode parallel}} {
  lappend transformL\
    shearVertical [list $LeftX $x0 [- $y $y0]]
  if {$mode ne "parallel"} then {
    set fac [expr {($x - $LeftX) / ($x0 - $LeftX)}]
    lappend transformL scaleHorizontal [list $LeftX $fac]
  }
  $self transform {*}$transformL
}

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