changed: #ditherGrayFor:on:into:
authorClaus Gittinger <cg@exept.de>
Sun, 24 Jul 2011 08:54:22 +0200
changeset 5779 def9764b9b8a
parent 5778 9416217f347a
child 5780 7acd722f9cf9
changed: #ditherGrayFor:on:into:
Color.st
--- a/Color.st	Thu Jul 21 16:04:47 2011 +0200
+++ b/Color.st	Sun Jul 24 08:54:22 2011 +0200
@@ -3092,8 +3092,6 @@
             scaledGray2 := clr2 scaledRed.
 
             scaledGrey := (MaxValue * fraction) rounded.
-
-            newFraction := (scaledGrey - scaledGray1) asFloat / (scaledGray2 - scaledGray1).
         ] ifFalse:[
             nGray := (1 bitShift:d) - 1.
 
@@ -3116,12 +3114,10 @@
 
             clr1 := Color scaledGray:scaledGray1.
             clr2 := Color scaledGray:scaledGray2.
-
-            "/ scale remainder in between low..high
-            newFraction := (scaledGrey - scaledGray1) asFloat / (scaledGray2 - scaledGray1).
-
-            "/ dither between those two colors
         ].
+
+        "/ scale remainder in between low..high
+        newFraction := (scaledGrey - scaledGray1) asFloat / (scaledGray2 - scaledGray1).
     ].
 
     clr1 := clr1 exactOn:aDevice.
@@ -3161,8 +3157,8 @@
                            form notNil ifTrue:[(form magnifiedBy:16) inspect].]
     "
 
-    "Created: 3.5.1997 / 10:59:57 / cg"
-    "Modified: 3.5.1997 / 11:05:09 / cg"
+    "Created: / 03-05-1997 / 10:59:57 / cg"
+    "Modified: / 24-07-2011 / 07:18:00 / cg"
 !
 
 ditherRed:rV green:gV blue:bV on:aDevice into:aBlock
@@ -5001,23 +4997,6 @@
     "Modified: / 8.9.1998 / 17:32:10 / cg"
 ! !
 
-!Color methodsFor:'inspecting'!
-
-inspectorExtraAttributes
-    "extra (pseudo instvar) entries to be shown in an inspector."
-
-    ^ Dictionary new
-        declareAllNewFrom:(super inspectorExtraAttributes ? #());
-        add:'-rgb' -> [ self rgbValue hexPrintString ];
-        add:'-html' -> [ self htmlPrintString ];
-        yourself
-
-    "
-     Color red inspect
-    "
-
-    "Modified: / 27-01-2011 / 11:48:15 / cg"
-! !
 
 !Color methodsFor:'instance creation'!
 
@@ -5574,11 +5553,11 @@
 !Color class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.220 2011-01-27 10:48:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.221 2011-07-24 06:54:22 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.220 2011-01-27 10:48:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.221 2011-07-24 06:54:22 cg Exp $'
 ! !
 
 Color initialize!