# HG changeset patch # User Claus Gittinger # Date 1460660002 -7200 # Node ID c2e58c679b8e2a9a33d10f0efa054b0e9bd66416 # Parent a24473f2d6cad83b566a69902c60f8ed182bca7a #TUNING by cg class: ImageView changed: #redrawX:y:width:height: avoid flicker by not clearing if there is no mask diff -r a24473f2d6ca -r c2e58c679b8e ImageView.st --- a/ImageView.st Thu Apr 14 12:54:44 2016 +0200 +++ b/ImageView.st Thu Apr 14 20:53:22 2016 +0200 @@ -525,15 +525,15 @@ tileMode == true ifTrue:[ (tileOffset y > 0 and:[tileOffset x > 0]) ifTrue:[ - (depth == 1 - and:[image mask isNil]) ifFalse:[ + (false "depth ~~ 1" + or:[shownImage mask notNil]) ifTrue:[ self clearRectangleX:x y:y width:w height:h. 0 to:y+h by:tileOffset y do:[:oY | 0 to:x+w by:tileOffset x do:[:oX | self displayForm:image x:oX y:oY ] ]. - ] ifTrue:[ + ] ifFalse:[ 0 to:y+h by:tileOffset y do:[:oY | 0 to:x+w by:tileOffset x do:[:oX | self displayOpaqueForm:image x:oX y:oY @@ -547,7 +547,7 @@ (xI+imgWidth) < x ifTrue:[^ self]. "/ no need to draw (yI+imgHeight) < y ifTrue:[^ self]. "/ no need to draw - (depth ~~ 1 + (false "depth ~~ 1" or:[shownImage mask notNil]) ifTrue:[ self clearRectangleX:x y:y width:w height:h. shownImage displayOn:self x:xI y:yI. @@ -559,18 +559,14 @@ "/ right of image ? right := x + w - 1. right > (xI + imgWidth) ifTrue:[ - self clearRectangleX:(xI + imgWidth) - y:y - width:(right - imgWidth - xI) - height:h + self clearRectangleX:(xI + imgWidth) y:y + width:(right - imgWidth - xI) height:h ]. "/ below of image ? bott := y + h - 1. bott > (yI + imgHeight) ifTrue:[ - self clearRectangleX:margin - y:(yI + imgHeight) - width:w - height:(bott - imgHeight - yI) + self clearRectangleX:margin y:(yI + imgHeight) + width:w height:(bott - imgHeight - yI) ]. ]. ]