--- a/Color.st Thu Jul 24 13:19:32 2014 +0200
+++ b/Color.st Thu Jul 24 13:23:54 2014 +0200
@@ -53,6 +53,12 @@
which will return a color with the same rgb values as the receiver but specific
for that device.
+ Most of the device dependent coding was to support limited graphics devices (non-true color)
+ in a transparent way. This was required at that time (late 80's, early 90's),
+ but is now almost obsolete, as these days, virtually any graphic systems supports it.
+ It is arguably, if that stuff should remain here, or if we should simply give up support
+ for old VGA-like displays.
+
Colors can be pure or dithered, depending on the capabilities of the device.
For plain colors, the colorId-instvar is a handle (usually lookup-table entry) for that
device. For dithered colors, the colorId is nil and ditherForm specifies the form
@@ -88,11 +94,11 @@
MaxValue <Integer> r/g/b components are scaled relative to this maximum
Lobby <Registry> all colors in use - keeps track of already allocated
- colors for reuse and finalization.
- (dont use it: this will be moved to the device)
+ colors for reuse and finalization.
+ (dont use it: this will be moved to the device)
Cells <Registry> keeps track of allocated writable color cells
- (dont use it: this will be moved to the device)
+ (dont use it: this will be moved to the device)
FixColors <Array> preallocated colors for dithering on Display
NumRedFix <Integer> number of distinct red values in FixColors
@@ -114,39 +120,39 @@
Blue <Color> blue, for dithering
DitherColors <Collection> some preallocated colors for dithering
- (kept, so they are available when needed)
+ (kept, so they are available when needed)
RetryAllocation <Boolean> this flag controls how a request for a
- color should be handled which failed previously.
- I.e. a color is asked for, which was dithered
- the last time. Since it could happen, that in
- the meantime more colors became free, the request
- might succeed this time - however, your screen may
- look a bit funny, due to having both dithered and
- undithered versions around.
- The default is true, which means: do retry
+ color should be handled which failed previously.
+ I.e. a color is asked for, which was dithered
+ the last time. Since it could happen, that in
+ the meantime more colors became free, the request
+ might succeed this time - however, your screen may
+ look a bit funny, due to having both dithered and
+ undithered versions around.
+ The default is true, which means: do retry
compatibility issues:
- ST-80 seems to represent colors internally with scaled smallInteger
- components (this can be guessed from uses of
- scaledRed:scaledGreen:scaledBlue:). The main instance creation method is
- via 'ColorValue red:green:blue:', passing components in 0..1.
- In ST/X, component are internally represented as percent.
- For more compatibility (when subclassing color), these internals may
- change in the near future. For migration, a compatibility subclass
- called ColorValue is provided.
- After the change, Color will be renamed to ColorValue and Color
- be made a subclass of ColorValue (offering the 0..100 interface for
- backward compatibility).
+ ST-80 seems to represent colors internally with scaled smallInteger
+ components (this can be guessed from uses of
+ scaledRed:scaledGreen:scaledBlue:). The main instance creation method is
+ via 'ColorValue red:green:blue:', passing components in 0..1.
+ In ST/X, component are internally represented as percent.
+ For more compatibility (when subclassing color), these internals may
+ change in the near future. For migration, a compatibility subclass
+ called ColorValue is provided.
+ After the change, Color will be renamed to ColorValue and Color
+ be made a subclass of ColorValue (offering the 0..100 interface for
+ backward compatibility).
[see also:]
- DeviceWorkstation
- GraphicsContext DeviceDrawable Form Image Colormap
- Font Cursor
+ DeviceWorkstation
+ GraphicsContext DeviceDrawable Form Image Colormap
+ Font Cursor
[author:]
- Claus Gittinger
+ Claus Gittinger
"
! !
@@ -5594,11 +5600,11 @@
!Color class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.232 2014-07-24 11:19:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.233 2014-07-24 11:23:54 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.232 2014-07-24 11:19:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.233 2014-07-24 11:23:54 cg Exp $'
! !