Colormap.st
changeset 1377 d898f243c3e5
parent 1351 6d5552229507
child 1378 a83a3522a199
--- a/Colormap.st	Tue Feb 25 17:54:15 1997 +0100
+++ b/Colormap.st	Tue Feb 25 19:00:42 1997 +0100
@@ -55,9 +55,42 @@
 !Colormap class methodsFor:'instance creation'!
 
 fromColors:aColorArray
-    "given a collection of real colors, return a new instance
+    "given a sequenceable collection of colors, return a new instance
      of myself"
 
+    ^ self withColors:aColorArray
+
+    "
+     Colormap 
+        fromColors:(Array with:Color black
+                          with:Color red
+                          with:Color white)
+    "
+
+    "Modified: 25.2.1997 / 19:00:31 / cg"
+!
+
+redVector:r greenVector:g blueVector:b
+    "given vectors of red/green/and blue pixelValues,
+     return a new instance of myself.
+     The values must be in the range 0..255."
+
+    ^ self new redVector:r greenVector:g blueVector:b
+
+    "
+     Colormap 
+        redVector:#[0 127 255]
+        greenVector:#[0 127 255]
+        blueVector:#[0 127 255]
+    "
+
+    "Modified: 23.4.1996 / 22:16:00 / cg"
+!
+
+withColors:aColorArray
+    "given a sequenceable collection of colors, return a new instance
+     of myself. Renamed from #fromColors: for ST-80 compatibility."
+
     |n rV gV bV|
 
     n := aColorArray size.
@@ -76,29 +109,13 @@
 
     "
      Colormap 
-        fromColors:(Array with:Color black
+        withColors:(Array with:Color black
                           with:Color red
                           with:Color white)
     "
 
-    "Modified: 23.4.1996 / 22:15:22 / cg"
-!
-
-redVector:r greenVector:g blueVector:b
-    "given vectors of red/green/and blue pixelValues,
-     return a new instance of myself.
-     The values must be in the range 0..255."
-
-    ^ self new redVector:r greenVector:g blueVector:b
-
-    "
-     Colormap 
-        redVector:#[0 127 255]
-        greenVector:#[0 127 255]
-        blueVector:#[0 127 255]
-    "
-
-    "Modified: 23.4.1996 / 22:16:00 / cg"
+    "Created: 25.2.1997 / 18:59:09 / cg"
+    "Modified: 25.2.1997 / 19:00:35 / cg"
 ! !
 
 !Colormap methodsFor:'accessing'!
@@ -310,5 +327,5 @@
 !Colormap class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Colormap.st,v 1.21 1997-02-13 23:54:17 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Colormap.st,v 1.22 1997-02-25 18:00:42 cg Exp $'
 ! !