--- a/Color.st Thu Oct 07 00:22:00 1999 +0200
+++ b/Color.st Thu Oct 07 00:26:32 1999 +0200
@@ -3371,6 +3371,28 @@
!Color methodsFor:'Compatibility - Squeak'!
+bitPatternForDepth: depth
+ "Return a Bitmap, possibly containing a stipple pattern,
+ that best represents this color at the given depth.
+ BitBlt calls this method to convert colors into Bitmaps.
+ The resulting Bitmap may be multiple words to represent a stipple
+ pattern of several lines. "
+
+ "See also:
+ pixelValueAtDepth: -- value for single pixel
+ pixelWordAtDepth: -- a 32-bit word filled with the pixel value"
+ "Details: The pattern for the most recently requested depth is cached."
+
+^ self.
+"/ depth == cachedDepth ifTrue: [^ cachedBitPattern].
+"/ cachedDepth _ depth.
+"/
+"/ depth > 2 ifTrue: [^ cachedBitPattern _ Bitmap with: (self pixelWordForDepth: depth)].
+"/ depth = 1 ifTrue: [^ cachedBitPattern _ self halfTonePattern1].
+"/ depth = 2 ifTrue: [^ cachedBitPattern _ self halfTonePattern2].
+
+!
+
darker
"return a new color, which is slightly darker than the receiver.
Almost the same as darkened for Squeak compatibility."
@@ -3656,6 +3678,14 @@
"Created: 11.6.1996 / 18:30:11 / cg"
!
+privateAlpha
+ "return the internal alpha value (0..255),
+ where 0 is completely transparent and 255 is completely opaque"
+
+ ^ 255
+
+!
+
red
"return the red component in percent [0..100]"
@@ -4805,6 +4835,13 @@
!
+isTranslucentColor
+ "return true, if I represent a translucent color, but not transparent"
+
+ ^ false
+
+!
+
isTransparent
"return true, if I represent a completely transparent color"
@@ -4861,6 +4898,6 @@
!Color class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.138 1999-10-06 16:25:38 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.139 1999-10-06 22:26:32 cg Exp $'
! !
Color initialize!