Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
authorStefan Vogel <sv@exept.de>
Fri, 06 Jun 2014 09:30:16 +0200
changeset 4605 0d5ab97f8247
parent 4604 1ac8aff09094
child 4606 1cc343187f71
Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
MenuPanel.st
--- a/MenuPanel.st	Tue Jun 03 09:55:24 2014 +0200
+++ b/MenuPanel.st	Fri Jun 06 09:30:16 2014 +0200
@@ -858,20 +858,21 @@
     |deviceImages|
 
     anImage device == aDevice ifTrue:[
-	^ anImage
+        ^ anImage
     ].
 
     Images isNil ifTrue:[ Images := WeakIdentityDictionary new ].
 
     (deviceImages := Images at:aDevice ifAbsent:nil) isNil ifTrue:[
-	Images at:aDevice put:(deviceImages := Dictionary new)
-    ].
-
-    ^ deviceImages at:anImage ifAbsentPut:[ |image|
-	image := anImage copy onDevice:aDevice.
-	image clearMaskedPixels.
-	deviceImages at:anImage put:image.
-	image
+        Images at:aDevice put:(deviceImages := Dictionary new)
+    ].
+
+    ^ deviceImages at:anImage ifAbsentPut:[
+        |image|
+
+        image := anImage copy onDevice:aDevice.
+        deviceImages at:anImage put:image.
+        image
     ].
 !
 
@@ -884,20 +885,19 @@
     LigthenedImages isNil ifTrue:[ LigthenedImages := WeakIdentityDictionary new ].
 
     (deviceImages := LigthenedImages at:aDevice ifAbsent:nil) isNil ifTrue:[
-	LigthenedImages at:aDevice put:(deviceImages := Dictionary new)
+        LigthenedImages at:aDevice put:(deviceImages := Dictionary new)
     ].
 
     (image := deviceImages at:anImage ifAbsent:nil) notNil ifTrue:[
-	^ image
+        ^ image
     ].
 
     colorMap := anImage perform:#colorMap ifNotUnderstood:nil.
 
     colorMap notNil ifTrue:[
-	image := anImage copy lightened onDevice:aDevice.
-	image clearMaskedPixels.
+        image := anImage lightened onDevice:aDevice.
     ] ifFalse:[
-	image := self image:anImage onDevice:aDevice
+        image := self image:anImage onDevice:aDevice
     ].
     deviceImages at:anImage put:image.
     ^ image
@@ -8651,23 +8651,22 @@
     device := aMenu device.
 
     aDirection == #PREV ifTrue:[
-	aMenu verticalLayout ifTrue:[index := 3]    "/ 3 - 1 * 90  180
-			    ifFalse:[index := 2]    "/ 2 - 1 * 90  90
+        aMenu verticalLayout ifTrue:[index := 3]    "/ 3 - 1 * 90  180
+                            ifFalse:[index := 2]    "/ 2 - 1 * 90  90
     ] ifFalse:[
-	aMenu verticalLayout ifTrue:[index := 1]    "/ 1 - 1 * 90  0
-			    ifFalse:[index := 4]    "/ 4 - 1 * 90  270
+        aMenu verticalLayout ifTrue:[index := 1]    "/ 1 - 1 * 90  0
+                            ifFalse:[index := 4]    "/ 4 - 1 * 90  270
     ].
 
     icon := icons at:index.
 
     (icon isNil or:[icon device ~~ device]) ifTrue:[
-	icon := self class icon.
-	index > 1 ifTrue:[ icon := icon rotated:(index - 1 * 90) ]
-		 ifFalse:[ icon := icon copy ].
-
-	icon := icon onDevice:device.
-	icon clearMaskedPixels.
-	icons at:index put:icon
+        icon := self class icon.
+        index > 1 ifTrue:[ icon := icon rotated:(index - 1 * 90) ]
+                 ifFalse:[ icon := icon copy ].
+
+        icon := icon onDevice:device.
+        icons at:index put:icon
     ].
     ^ icon
 ! !
@@ -8796,11 +8795,11 @@
 !MenuPanel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.590 2014-05-23 09:27:25 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.591 2014-06-06 07:30:16 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.590 2014-05-23 09:27:25 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.591 2014-06-06 07:30:16 stefan Exp $'
 ! !