squeak compatibility
authorClaus Gittinger <cg@exept.de>
Mon, 25 Sep 2000 16:03:55 +0200
changeset 3309 cea34469e23f
parent 3308 f20f8481741c
child 3310 5593d19c3d53
squeak compatibility
Color.st
--- a/Color.st	Fri Sep 22 13:44:33 2000 +0200
+++ b/Color.st	Mon Sep 25 16:03:55 2000 +0200
@@ -3576,6 +3576,13 @@
 newTileMorphRepresentative
 	^ ColorTileMorph new colorSwatchColor: self!
 
+scaledPixelValue32
+    ^ (self redByte bitShift:16)
+      + (self greenByte bitShift:8)
+      + (self blueByte)
+      + (self alphaByte bitShift:24)
+!
+
 slightlyDarker
     "return a new color, which is slightly darker than the receiver.
      Almost the same as darkened for Squeak compatibility."
@@ -3630,6 +3637,13 @@
     ^ 1.
 !
 
+alphaByte
+    "return the alpha byte-value (0..255),
+     where 0 is completely transparent and 255 is completely opaque"
+
+    ^ 255.
+!
+
 blue
     "return the blue component in percent [0..100]"
 
@@ -5113,6 +5127,6 @@
 !Color class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.159 2000-08-31 10:05:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.160 2000-09-25 14:03:55 cg Exp $'
 ! !
 Color initialize!