--- a/DeviceWorkstation.st Wed Jul 24 13:50:07 1996 +0200
+++ b/DeviceWorkstation.st Wed Jul 24 13:57:40 1996 +0200
@@ -774,6 +774,21 @@
^ self subclassResponsibility
!
+blueMask
+ "return a mask, which extracts the blueBits from a color id.
+ This only makes sense with trueColor displays;
+ therefore, 0 is returned on all others."
+
+ ^ blueMask
+
+ "
+ Display blueMask
+ "
+
+ "Modified: 21.10.1995 / 00:47:58 / cg"
+ "Created: 24.7.1996 / 13:25:21 / cg"
+!
+
depth
"return the depth in pixels of the display"
@@ -784,6 +799,21 @@
"
!
+greenMask
+ "return a mask, which extracts the greenBits from a color id.
+ This only makes sense with trueColor displays;
+ therefore, 0 is returned on all others."
+
+ ^ greenMask
+
+ "
+ Display greenMask
+ "
+
+ "Modified: 21.10.1995 / 00:47:58 / cg"
+ "Created: 24.7.1996 / 13:25:15 / cg"
+!
+
hasColors
"return true, if its a color display"
@@ -821,6 +851,21 @@
"Modified: 2.5.1996 / 11:51:03 / cg"
!
+redMask
+ "return a mask, which extracts the redBits from a color id.
+ This only makes sense with trueColor displays;
+ therefore, 0 is returned on all others."
+
+ ^ redMask
+
+ "
+ Display redMask
+ "
+
+ "Created: 21.10.1995 / 00:45:27 / cg"
+ "Modified: 24.7.1996 / 13:25:08 / cg"
+!
+
shiftBlue
"return the count by which the blue bits are to be shifted
when forming a color index.
@@ -1788,20 +1833,6 @@
^ self subclassResponsibility
!
-getScaledRGBFromName:colorName into:aBlock
- "get rgb components (0..16rFFFF) of color named colorName,
- and evaluate the 3-arg block, aBlock with them"
-
- self getRGBFromName:colorName into:[:r :g :b |
- |sr sg sb|
-
- sr := self percentToDeviceColorValue:r.
- sg := self percentToDeviceColorValue:g.
- sb := self percentToDeviceColorValue:b.
- ^ aBlock value:sr value:sg value:sb
- ]
-!
-
getRGBFromName:colorName into:aBlock
"get rgb components (0..100) of color named colorName,
and evaluate the 3-arg block, aBlock with them.
@@ -1835,6 +1866,20 @@
^ nil
!
+getScaledRGBFromName:colorName into:aBlock
+ "get rgb components (0..16rFFFF) of color named colorName,
+ and evaluate the 3-arg block, aBlock with them"
+
+ self getRGBFromName:colorName into:[:r :g :b |
+ |sr sg sb|
+
+ sr := self percentToDeviceColorValue:r.
+ sg := self percentToDeviceColorValue:g.
+ sb := self percentToDeviceColorValue:b.
+ ^ aBlock value:sr value:sg value:sb
+ ]
+!
+
greenComponentOfColor:colorId
"get green component (0..100) of color in map at:index"
@@ -4529,6 +4574,6 @@
!DeviceWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.121 1996-07-24 10:19:46 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.122 1996-07-24 11:57:40 cg Exp $'
! !
DeviceWorkstation initialize!