Image.st
changeset 6496 614e100374da
parent 6493 7785d3d8458b
child 6507 05fb9b9d9e53
--- a/Image.st	Thu Jun 05 17:41:27 2014 +0200
+++ b/Image.st	Fri Jun 06 09:26:04 2014 +0200
@@ -4198,6 +4198,10 @@
             ] ifFalse:[
                 Lobby registerChange:self
             ].
+            mask notNil ifTrue:[
+                self clearMaskedPixels.
+            ].
+
             "
              can save space, by not keeping the images data-bits
              twice (here and in the device form)
@@ -5290,11 +5294,14 @@
     deviceForm isNil ifTrue:[^ self].   "/ no device rep.
     mask depth ~~ 1 ifTrue:[^ self].    "/ not done with alpha masks
 
-    deviceForm foreground:Color allColor background:Color noColor.
-    deviceForm function:#and.
-    deviceForm copyPlaneFrom:(mask asFormOn:device) x:0 y:0 toX:0 y:0 width:width height:height.
+    deviceForm 
+        foreground:Color allColor background:Color noColor function:#and;
+        copyPlaneFrom:(mask asFormOn:device) x:0 y:0 toX:0 y:0 width:width height:height.
+
+"/    deviceForm clearMaskedPixels:(mask asFormOn:device).
     maskedPixelsAre0 := true.
 
+
     "Created: 12.4.1997 / 12:18:05 / cg"
     "Modified: 12.4.1997 / 12:20:19 / cg"
 !
@@ -5470,7 +5477,7 @@
     "
      |i i2 i4 i8 i16 i24|
 
-     i := Image fromFile:'goodies/bitmaps/SBrowser.xbm'.
+     i := GenericToolbarIconLibrary desktop32x32Icon2.
      i inspect.
      i2 := Depth2Image fromImage:i.
      i2 inspect.
@@ -5478,6 +5485,8 @@
      i4 inspect.
      i8 := Depth8Image fromImage:i.
      i8 inspect.
+     i16 := Depth16Image fromImage:i.
+     i16 inspect.
      i24 := Depth24Image fromImage:i.
      i24 inspect.
     "
@@ -5631,8 +5640,11 @@
         ^ self copy onDevice:aDevice
     ].
     deviceForm := self asFormOn:aDevice.
+    device := aDevice.
     maskedPixelsAre0 := nil.
-    device := aDevice.
+    mask notNil ifTrue:[
+        self clearMaskedPixels.
+    ].
     Lobby register:self
 
     "Modified: / 22.8.1998 / 13:34:24 / cg"
@@ -14425,11 +14437,11 @@
 !Image class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.455 2014-06-05 06:13:43 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.456 2014-06-06 07:26:04 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.455 2014-06-05 06:13:43 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.456 2014-06-06 07:26:04 stefan Exp $'
 ! !