Depth1Image.st
changeset 6482 71fc96c9e5e3
parent 6478 32a7c396c27f
child 6495 17a64286fe5e
--- a/Depth1Image.st	Fri May 23 10:44:34 2014 +0200
+++ b/Depth1Image.st	Fri May 23 16:35:38 2014 +0200
@@ -589,7 +589,7 @@
 anyImageAsFormOn:aDevice
     "convert a 1-bit (possibly monochrome) image to a device form"
 
-    |f color0 color1|
+    |form color0 color1|
 
     ((aDevice == device) and:[deviceForm notNil]) ifTrue:[^ deviceForm].
 
@@ -602,20 +602,20 @@
 
     "all colors are available, this is easy now"
 
-    f := Form width:width height:height fromArray:self bits onDevice:aDevice.
-    f notNil ifTrue:[
-        f colorMap:(Array with:color0 with:color1).
-        "special: depth1 forms are drawn with fg on bg paint"
-"/        f paint:color1 on:color0.
+    form := Form onDevice:aDevice.
+    form notNil ifTrue:[
+        form
+            colorMap:(Array with:color0 with:color1);
+            width:width height:height fromArray:self bits.
 
         "/ remember deviceForm
         (device isNil or:[deviceForm isNil]) ifTrue:[
             device := aDevice.
-            deviceForm := f.
+            deviceForm := form.
             maskedPixelsAre0 := nil.
         ].
     ].
-    ^ f
+    ^ form
 
     "Modified: / 29-05-2007 / 19:32:09 / cg"
 ! !
@@ -774,10 +774,10 @@
 !Depth1Image class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.63 2014-05-23 08:13:25 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.64 2014-05-23 14:35:38 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.63 2014-05-23 08:13:25 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.64 2014-05-23 14:35:38 stefan Exp $'
 ! !