obj method canvaseditor shearVmode {{mode parallel}} { set canvas [my canvas] $self selected dots storeXY $self selected calcCenter $self selected blink off $self snapMode on # set nDot [$self nearestDot -selected] $self pointerToDot $nDot $self memory currentDot $nDot $self memory transformation "shear vertical $mode" # set left [[$self leftmostDot -gravity] cget -x] set right [[$self rightmostDot -gravity] cget -x] set center [expr {($left + $right) / 2}] if {[$nDot cget -x] < $center} then { set BaseX $right } else { set BaseX $left } # $self basicBindings off $self statusLine Shear objects vertical $mode # $self memory before [$self undoRedoCode] # set nDotX [$nDot cget -x] set nDotY [$nDot cget -y] after idle [list bind $canvas <Motion> [subst -nocommand { $self shearVselection\ [$self canvasx %x] [$self canvasy %y]\ $nDotX $nDotY $BaseX $mode }]] bind $canvas <<Click>> " $self finishTransform " }
© Wolf-Dieter Busch | Home | Sitemap | Urheber | A-Z