Colormap.st
changeset 4794 fee4be15bbd5
parent 4185 cc96d1c1e28c
child 6059 cefde51cf073
--- a/Colormap.st	Fri Jul 20 12:48:01 2007 +0200
+++ b/Colormap.st	Sun Jul 22 20:48:11 2007 +0200
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libview' }"
 
 SequenceableCollection subclass:#Colormap
@@ -244,12 +243,12 @@
     b := (aColor blue * 255 / 100) rounded.
 
     idx := index.
-    self redByteAt:idx put:r.
-    self greenByteAt:idx put:g.
-    self blueByteAt:idx put:b.
+    self redByteAt:idx put:(r max:0).
+    self greenByteAt:idx put:(g max:0).
+    self blueByteAt:idx put:(b max:0).
     ^ aColor
 
-    "Modified: 2.5.1996 / 17:29:29 / cg"
+    "Modified: / 22-07-2007 / 15:28:32 / cg"
 !
 
 atPixelValue:pixelValue 
@@ -570,5 +569,5 @@
 !Colormap class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Colormap.st,v 1.38 2004-06-07 09:22:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Colormap.st,v 1.39 2007-07-22 18:48:11 cg Exp $'
 ! !