diff -r fa3c8eb0bc1d -r b8189ae681df SimpleView.st --- a/SimpleView.st Thu Dec 15 20:11:12 2016 +0000 +++ b/SimpleView.st Sun Dec 18 12:12:59 2016 +0000 @@ -10968,12 +10968,12 @@ wCont := self widthOfContents. currentTransformation := gc transformation. currentTransformation isNil ifTrue:[ - orgY := orgX := 0 + orgY := orgX := 0 ] ifFalse:[ - wCont := (currentTransformation applyScaleX:wCont) rounded. - hCont := (currentTransformation applyScaleY:hCont) rounded. - orgY := currentTransformation translation y negated. - orgX := currentTransformation translation x negated + wCont := (currentTransformation applyScaleX:wCont) rounded. + hCont := (currentTransformation applyScaleY:hCont) rounded. + orgY := currentTransformation translation y negated. + orgX := currentTransformation translation x negated ]. iw := self innerWidth. @@ -10985,20 +10985,20 @@ y := newOrigin y. allowScrollBeyondContents ifFalse:[ - x + iw > wCont ifTrue:[ - x := (wCont - iw) asInteger. - ]. + x + iw > wCont ifTrue:[ + x := (wCont - iw) asInteger. + ]. ]. x < 0 ifTrue:[ - x := 0 + x := 0 ]. allowScrollBeyondContents ifFalse:[ - y + ih > hCont ifTrue:[ - y := (hCont - ih) asInteger. - ]. + y + ih > hCont ifTrue:[ + y := (hCont - ih) asInteger. + ]. ]. y < 0 ifTrue:[ - y := 0. + y := 0. ]. dX := x - orgX. @@ -11009,79 +11009,69 @@ ]. (wg := self windowGroup) notNil ifTrue:[ - wg processRealExposeEventsFor:self. + wg processRealExposeEventsFor:self. ]. self originWillChange. (shown and:[doRedraw]) ifTrue:[ - copyWidth := iw - dX abs. - copyHeight := ih - dY abs. - ((copyWidth > 0) and:[copyHeight > 0]) ifTrue:[ - "/ some of the currently displayed pixels - "/ remain visible. Copy them - - dX < 0 ifTrue:[ - fromX := margin. - toX := margin - dX. - redrawX := margin - ] ifFalse:[ - fromX := margin + dX. - toX := margin. - redrawX := margin + copyWidth. - ]. - dY < 0 ifTrue:[ - fromY := margin. - toY := margin - dY. - redrawY := margin. - ] ifFalse:[ - fromY := margin + dY. - toY := margin. - redrawY := margin + copyHeight. - ]. - self catchExpose. - self setViewOrigin:(x @ y). - self - copyFrom:self - x:fromX y:fromY - toX:toX y:toY - width:copyWidth - height:copyHeight - async:true. - - self setInnerClip. - - "first redraw the rectangle above/below the - copied area (with full width)." - - copyHeight < ih ifTrue:[ - self invalidateDeviceRectangle:((margin@redrawY) extent:(iw@(ih - copyHeight))) repairNow:false. -"/ self -"/ redrawDeviceX:margin y:redrawY -"/ width:iw height:(ih - copyHeight). - ]. - - "second redraw the rectangle left/right of the - copied area" - - copyWidth < iw ifTrue:[ - self invalidateDeviceRectangle:((redrawX@toY) extent:((iw-copyWidth)@copyHeight)) repairNow:false. -"/ self redrawDeviceX:redrawX y:toY -"/ -"/ width:iw - copyWidth -"/ height:copyHeight. - ]. - self waitForExpose. - ] ifFalse:[ - "redraw everything" - - self setViewOrigin:(x @ y). - self invalidateDeviceRectangle:((margin@margin) extent:(iw@ih)) repairNow:false. -"/ self redrawDeviceX:margin y:margin -"/ width:iw -"/ height:ih. - ]. + copyWidth := iw - dX abs. + copyHeight := ih - dY abs. + ((copyWidth > 0) and:[copyHeight > 0]) ifTrue:[ + "/ some of the currently displayed pixels + "/ remain visible. Copy them + + dX < 0 ifTrue:[ + fromX := margin. + toX := margin - dX. + redrawX := margin + ] ifFalse:[ + fromX := margin + dX. + toX := margin. + redrawX := margin + copyWidth. + ]. + dY < 0 ifTrue:[ + fromY := margin. + toY := margin - dY. + redrawY := margin. + ] ifFalse:[ + fromY := margin + dY. + toY := margin. + redrawY := margin + copyHeight. + ]. + self catchExpose. + self setViewOrigin:(x @ y). + self + copyFrom:self + x:fromX y:fromY + toX:toX y:toY + width:copyWidth + height:copyHeight + async:true. + + self setInnerClip. + + "first redraw the rectangle above/below the + copied area (with full width)." + + copyHeight < ih ifTrue:[ + self invalidateDeviceRectangle:((margin@redrawY) extent:(iw@(ih - copyHeight))) repairNow:false. + ]. + + "second redraw the rectangle left/right of the + copied area" + + copyWidth < iw ifTrue:[ + self invalidateDeviceRectangle:((redrawX@toY) extent:((iw-copyWidth)@copyHeight)) repairNow:false. + ]. + self waitForExpose. + ] ifFalse:[ + "redraw everything" + + self setViewOrigin:(x @ y). + self invalidateDeviceRectangle:((margin@margin) extent:(iw@ih)) repairNow:false. + ]. ] ifFalse:[ - self setViewOrigin:(x @ y). + self setViewOrigin:(x @ y). ]. self originChanged:(dX negated @ dY negated).