author | Claus Gittinger <cg@exept.de> |
Mon, 06 May 2013 20:26:05 +0200 | |
changeset 6059 | cefde51cf073 |
parent 4794 | fee4be15bbd5 |
child 6150 | f986ec057734 |
permissions | -rw-r--r-- |
91 | 1 |
" |
2 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
3265 | 12 |
"{ Package: 'stx:libview' }" |
13 |
||
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
14 |
SequenceableCollection subclass:#Colormap |
572 | 15 |
instanceVariableNames:'redVector greenVector blueVector' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
665 | 18 |
category:'Graphics-Images-Support' |
91 | 19 |
! |
20 |
||
1092 | 21 |
!Colormap class methodsFor:'documentation'! |
91 | 22 |
|
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
3844 | 39 |
Colormaps are used with images (and Forms) to keep the byte-to-color mapping. |
602 | 40 |
Externally, either colors or pixel values can be accessed. |
91 | 41 |
Internally, the values are stored as 3 separate byte-arrays |
42 |
(i.e. individual components can be 0..255). |
|
3844 | 43 |
This was done to avoid overhead due to allocation of many color instances. |
611 | 44 |
|
3847 | 45 |
Notice: Colormap is going to be obsoleted, and the functionality will |
46 |
move to subclasses (MappedPalette etc.) |
|
47 |
||
611 | 48 |
[author:] |
49 |
Claus Gittinger |
|
50 |
||
602 | 51 |
[see also:] |
603 | 52 |
Color Image Form |
91 | 53 |
" |
54 |
! ! |
|
55 |
||
1092 | 56 |
!Colormap class methodsFor:'instance creation'! |
91 | 57 |
|
118 | 58 |
fromColors:aColorArray |
3844 | 59 |
"given a sequenceable collection of colors, return a new instance of myself. |
60 |
Obsolete: use #withColors: for VW compatibility." |
|
602 | 61 |
|
4176 | 62 |
<resource: #obsolete> |
3844 | 63 |
self obsoleteMethodWarning:'use #withColors:'. |
1377 | 64 |
^ self withColors:aColorArray |
65 |
||
66 |
" |
|
67 |
Colormap |
|
68 |
fromColors:(Array with:Color black |
|
69 |
with:Color red |
|
70 |
with:Color white) |
|
71 |
" |
|
72 |
||
73 |
"Modified: 25.2.1997 / 19:00:31 / cg" |
|
74 |
! |
|
75 |
||
2448
89c338d3412e
more for collection-protocol compatibility
Claus Gittinger <cg@exept.de>
parents:
1435
diff
changeset
|
76 |
new:numColors |
3844 | 77 |
"/ ^ self withColors:(Array new:numColors withAll:Color black) |
78 |
||
3876 | 79 |
self == Colormap ifTrue:[ |
80 |
"/ Colormap will be abstract in the near future |
|
81 |
self obsoleteFeatureWarning:'please change your code to use a concrete subclass of ColorPalette'. |
|
82 |
]. |
|
83 |
||
3844 | 84 |
^ self |
85 |
redVector:(ByteArray new:numColors withAll:0) |
|
86 |
greenVector:(ByteArray new:numColors withAll:0) |
|
87 |
blueVector:(ByteArray new:numColors withAll:0) |
|
88 |
||
89 |
" |
|
3876 | 90 |
MappedPalette new:100 |
3844 | 91 |
" |
2448
89c338d3412e
more for collection-protocol compatibility
Claus Gittinger <cg@exept.de>
parents:
1435
diff
changeset
|
92 |
! |
89c338d3412e
more for collection-protocol compatibility
Claus Gittinger <cg@exept.de>
parents:
1435
diff
changeset
|
93 |
|
3844 | 94 |
redVector:rV greenVector:gV blueVector:bV |
1377 | 95 |
"given vectors of red/green/and blue pixelValues, |
96 |
return a new instance of myself. |
|
97 |
The values must be in the range 0..255." |
|
98 |
||
3876 | 99 |
self == Colormap ifTrue:[ |
100 |
"/ Colormap will be abstract in the near future |
|
101 |
self obsoleteFeatureWarning:'please change your code to use a concrete subclass of ColorPalette'. |
|
102 |
]. |
|
3844 | 103 |
^ self new |
104 |
redVector:rV |
|
105 |
greenVector:gV |
|
106 |
blueVector:bV |
|
1377 | 107 |
|
108 |
" |
|
3876 | 109 |
MappedPalette |
1377 | 110 |
redVector:#[0 127 255] |
111 |
greenVector:#[0 127 255] |
|
112 |
blueVector:#[0 127 255] |
|
113 |
" |
|
114 |
||
115 |
"Modified: 23.4.1996 / 22:16:00 / cg" |
|
116 |
! |
|
117 |
||
3864 | 118 |
rgbBytesVector:rgbVector |
119 |
"given a single vector containing r-g-b byte values, |
|
3844 | 120 |
return a new instance of myself. |
121 |
The values must be in the range 0..255." |
|
122 |
||
123 |
|rV gV bV srcIndex nColors| |
|
124 |
||
125 |
nColors := rgbVector size // 3. |
|
126 |
rV := ByteArray new:nColors. |
|
127 |
gV := ByteArray new:nColors. |
|
128 |
bV := ByteArray new:nColors. |
|
129 |
||
130 |
srcIndex := 1. |
|
131 |
1 to:nColors do:[:dstIndex | |
|
132 |
|r g b| |
|
133 |
||
134 |
r := rgbVector at:srcIndex. |
|
135 |
g := rgbVector at:srcIndex+1. |
|
136 |
b := rgbVector at:srcIndex+2. |
|
137 |
||
138 |
rV at:dstIndex put:r. |
|
139 |
gV at:dstIndex put:g. |
|
140 |
bV at:dstIndex put:b. |
|
141 |
srcIndex := srcIndex + 3. |
|
142 |
]. |
|
143 |
||
144 |
^ self |
|
145 |
redVector:rV |
|
146 |
greenVector:gV |
|
147 |
blueVector:bV |
|
148 |
||
149 |
" |
|
3845 | 150 |
|map| |
151 |
||
6059 | 152 |
map := Colormap rgbBytesVector:#[0 0 0 127 127 127 255 0 0 255 255 255]. |
3845 | 153 |
map atPixelValue:2 |
3844 | 154 |
" |
155 |
! |
|
156 |
||
3864 | 157 |
rgbValueVector:rgbValueVector |
158 |
"given a single vector containing r-g-b pixel-values, |
|
159 |
return a new instance of myself. |
|
160 |
The values must be of the rgb-form i.e. 16rRRGGBB" |
|
161 |
||
162 |
|rV gV bV nColors| |
|
163 |
||
164 |
nColors := rgbValueVector size. |
|
165 |
rV := ByteArray new:nColors. |
|
166 |
gV := ByteArray new:nColors. |
|
167 |
bV := ByteArray new:nColors. |
|
168 |
||
169 |
1 to:nColors do:[:index | |
|
170 |
|rgb r g b| |
|
171 |
||
172 |
rgb := rgbValueVector at:index. |
|
173 |
r := (rgb bitShift:-16) bitAnd:16rFF. |
|
174 |
g := (rgb bitShift:-8) bitAnd:16rFF. |
|
175 |
b := rgb bitAnd:16rFF. |
|
176 |
||
177 |
rV at:index put:r. |
|
178 |
gV at:index put:g. |
|
179 |
bV at:index put:b. |
|
180 |
]. |
|
181 |
||
182 |
^ self |
|
183 |
redVector:rV |
|
184 |
greenVector:gV |
|
185 |
blueVector:bV |
|
186 |
||
187 |
" |
|
188 |
|map| |
|
189 |
||
190 |
map := Colormap rgbValueVector:#(16r000000 16r7F7F7F 16r800000 16rFFFFFF). |
|
191 |
map atPixelValue:2 |
|
192 |
" |
|
193 |
! |
|
194 |
||
1377 | 195 |
withColors:aColorArray |
196 |
"given a sequenceable collection of colors, return a new instance |
|
197 |
of myself. Renamed from #fromColors: for ST-80 compatibility." |
|
198 |
||
3876 | 199 |
self == Colormap ifTrue:[ |
200 |
"/ Colormap will be abstract in the near future |
|
201 |
self obsoleteFeatureWarning:'please change your code to use a concrete subclass of ColorPalette'. |
|
202 |
]. |
|
1378
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
203 |
^ self new colors:aColorArray |
118 | 204 |
|
205 |
" |
|
3876 | 206 |
MappedPalette |
1377 | 207 |
withColors:(Array with:Color black |
602 | 208 |
with:Color red |
209 |
with:Color white) |
|
118 | 210 |
" |
602 | 211 |
|
1377 | 212 |
"Created: 25.2.1997 / 18:59:09 / cg" |
1378
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
213 |
"Modified: 25.2.1997 / 19:03:08 / cg" |
285 | 214 |
! ! |
91 | 215 |
|
285 | 216 |
!Colormap methodsFor:'accessing'! |
91 | 217 |
|
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
218 |
at:index |
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
219 |
"return the color for a index. |
3844 | 220 |
Notice that index range is 1...nColors" |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
221 |
|
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
222 |
|r g b idx "{ Class: SmallInteger }" | |
91 | 223 |
|
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
224 |
idx := index. |
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
225 |
r := self redByteAt:idx. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
226 |
g := self greenByteAt:idx. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
227 |
b := self blueByteAt:idx. |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
228 |
|
1351 | 229 |
^ Color redByte:r greenByte:g blueByte:b |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
230 |
|
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
231 |
"Created: 2.5.1996 / 12:21:40 / cg" |
808 | 232 |
"Modified: 8.6.1996 / 14:25:30 / cg" |
91 | 233 |
! |
234 |
||
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
235 |
at:index put:aColor |
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
236 |
"set the color for a index. Return aColor (sigh). |
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
237 |
Notice that index range is 1..." |
91 | 238 |
|
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
239 |
|r g b idx "{ Class: SmallInteger }" | |
572 | 240 |
|
91 | 241 |
r := (aColor red * 255 / 100) rounded. |
242 |
g := (aColor green * 255 / 100) rounded. |
|
243 |
b := (aColor blue * 255 / 100) rounded. |
|
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
244 |
|
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
245 |
idx := index. |
4794 | 246 |
self redByteAt:idx put:(r max:0). |
247 |
self greenByteAt:idx put:(g max:0). |
|
248 |
self blueByteAt:idx put:(b max:0). |
|
572 | 249 |
^ aColor |
250 |
||
4794 | 251 |
"Modified: / 22-07-2007 / 15:28:32 / cg" |
118 | 252 |
! |
91 | 253 |
|
3844 | 254 |
atPixelValue:pixelValue |
255 |
"return the color for a pixelValue. |
|
256 |
Notice that pixelValue range is 0...nColors-1" |
|
257 |
||
258 |
^ self at:(pixelValue + 1) |
|
259 |
! |
|
260 |
||
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
261 |
blueAt:index |
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
262 |
"return the blue component for some index. |
153 | 263 |
The returned value is scaled from the internal 0.. 255 to |
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
264 |
a percentage value 0..100. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
265 |
Notice that index range is 1..." |
153 | 266 |
|
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
267 |
^ (self blueByteAt:index) * 100 / 255 |
285 | 268 |
|
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
269 |
"Modified: 2.5.1996 / 17:29:17 / cg" |
285 | 270 |
! |
271 |
||
272 |
colors |
|
273 |
"ST-80 compatibility: return a collection containing the colors I hold" |
|
274 |
||
275 |
^ self asArray |
|
153 | 276 |
! |
277 |
||
1378
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
278 |
colors:aCollectionOfColors |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
279 |
"setup the receiver from colors given in a sequenceable collection of colors" |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
280 |
|
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
281 |
|sz "{Class: SmallInteger }"| |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
282 |
|
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
283 |
sz := aCollectionOfColors size. |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
284 |
redVector := ByteArray new:sz. |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
285 |
greenVector := ByteArray new:sz. |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
286 |
blueVector := ByteArray new:sz. |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
287 |
|
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
288 |
1 to:sz do:[:i | |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
289 |
|clr r g b| |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
290 |
|
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
291 |
clr := aCollectionOfColors at:i. |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
292 |
clr notNil ifTrue:[ |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
293 |
redVector at:i put:(clr redByte). |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
294 |
greenVector at:i put:(clr greenByte). |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
295 |
blueVector at:i put:(clr blueByte). |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
296 |
] |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
297 |
]. |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
298 |
|
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
299 |
"Modified: 25.2.1997 / 19:02:47 / cg" |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
300 |
! |
a83a3522a199
moved #colors: from mappedPalette; use it in #withColors.
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
301 |
|
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
302 |
greenAt:index |
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
303 |
"return the green component for some index. |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
304 |
The returned value is scaled from the internal 0.. 255 to |
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
305 |
a percentage value 0..100. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
306 |
Notice that index range is 1..." |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
307 |
|
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
308 |
^ (self greenByteAt:index) * 100 / 255 |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
309 |
|
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
310 |
"Modified: 2.5.1996 / 17:29:36 / cg" |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
311 |
! |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
312 |
|
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
313 |
redAt:index |
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
314 |
"return the red component for some index. |
153 | 315 |
The returned value is scaled from the internal 0.. 255 to |
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
316 |
a percentage value 0..100. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
317 |
Notice that index range is 1..." |
153 | 318 |
|
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
319 |
^ (self redByteAt:index) * 100 / 255 |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
320 |
|
637
08e099c202db
oops - had to undo 0-based indexing (some images use arrays as colormap)
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
321 |
"Modified: 2.5.1996 / 17:29:44 / cg" |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
322 |
! ! |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
323 |
|
1092 | 324 |
!Colormap methodsFor:'accessing-internals'! |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
325 |
|
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
326 |
blueByteAt:index |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
327 |
"return the blueByte component for some index. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
328 |
The returned value is from the internal 0.. 255" |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
329 |
|
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
330 |
^ (blueVector at:index) |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
331 |
! |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
332 |
|
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
333 |
blueByteAt:index put:anInteger |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
334 |
"change the internal blueByte component for some index. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
335 |
The argument, anInteger should be from the internal 0.. 255. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
336 |
Notice that index range is 1..." |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
337 |
|
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
338 |
^ blueVector at:index put:anInteger |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
339 |
! |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
340 |
|
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
341 |
blueVector |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
342 |
"return the blueVector" |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
343 |
|
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
344 |
^ blueVector |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
345 |
|
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
346 |
"Modified: 2.5.1996 / 12:44:17 / cg" |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
347 |
! |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
348 |
|
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
349 |
blueVector:something |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
350 |
"set blueVector" |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
351 |
|
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
352 |
blueVector := something. |
153 | 353 |
! |
354 |
||
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
355 |
greenByteAt:index |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
356 |
"return the greenByte component for some index. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
357 |
The returned value is from the internal 0.. 255" |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
358 |
|
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
359 |
^ (greenVector at:index) |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
360 |
! |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
361 |
|
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
362 |
greenByteAt:index put:anInteger |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
363 |
"change the internal greenByte component for some index. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
364 |
The argument, anInteger should be from the internal 0.. 255. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
365 |
Notice that index range is 1..." |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
366 |
|
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
367 |
^ greenVector at:index put:anInteger |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
368 |
! |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
369 |
|
285 | 370 |
greenVector |
371 |
"return greenVector" |
|
372 |
||
373 |
^ greenVector |
|
374 |
! |
|
375 |
||
376 |
greenVector:something |
|
377 |
"set greenVector" |
|
378 |
||
379 |
greenVector := something. |
|
380 |
! |
|
381 |
||
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
382 |
redByteAt:index |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
383 |
"return the redByte component for some index. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
384 |
The returned value is from the internal 0.. 255" |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
385 |
|
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
386 |
^ (redVector at:index) |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
387 |
! |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
388 |
|
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
389 |
redByteAt:index put:anInteger |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
390 |
"change the internal redByte component for some index. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
391 |
The argument, anInteger should be from the internal 0.. 255. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
392 |
Notice that index range is 1..." |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
393 |
|
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
394 |
^ redVector at:index put:anInteger |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
395 |
! |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
396 |
|
285 | 397 |
redVector |
398 |
"return redVector" |
|
399 |
||
400 |
^ redVector |
|
153 | 401 |
! |
402 |
||
285 | 403 |
redVector:something |
404 |
"set redVector" |
|
153 | 405 |
|
285 | 406 |
redVector := something. |
407 |
! |
|
91 | 408 |
|
285 | 409 |
redVector:r greenVector:g blueVector:b |
602 | 410 |
"set the red, green and blueVectors" |
411 |
||
285 | 412 |
redVector := r. |
413 |
greenVector := g. |
|
414 |
blueVector := b. |
|
602 | 415 |
|
416 |
"Modified: 23.4.1996 / 22:13:31 / cg" |
|
91 | 417 |
! ! |
418 |
||
943 | 419 |
!Colormap methodsFor:'converting'! |
917
d0ab9a4e0344
postCopt must copy the vectors
Claus Gittinger <cg@exept.de>
parents:
808
diff
changeset
|
420 |
|
941 | 421 |
asArray |
944 | 422 |
"return the receiver as an array containing my colors" |
941 | 423 |
|
424 |
|r g b n "{ Class: SmallInteger }" |
|
425 |
scale array| |
|
426 |
||
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
427 |
n := self size. |
941 | 428 |
array := Array new:n. |
429 |
scale := Color scalingValue / 255.0. |
|
430 |
||
431 |
1 to:n do:[:idx | |
|
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
432 |
r := self redByteAt:idx. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
433 |
g := self greenByteAt:idx. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
434 |
b := self blueByteAt:idx. |
941 | 435 |
|
436 |
array at:idx put:(Color |
|
437 |
scaledRed:(r * scale) rounded |
|
438 |
scaledGreen:(g * scale) rounded |
|
439 |
scaledBlue:(b * scale) rounded) |
|
943 | 440 |
]. |
441 |
^ array |
|
941 | 442 |
|
443 |
"Created: 11.7.1996 / 20:19:45 / cg" |
|
944 | 444 |
"Modified: 11.7.1996 / 21:34:16 / cg" |
943 | 445 |
! ! |
446 |
||
447 |
!Colormap methodsFor:'copying'! |
|
941 | 448 |
|
2483 | 449 |
copyFrom:start to:stop |
3844 | 450 |
^ self class |
451 |
redVector:(redVector copyFrom:start to:stop) |
|
452 |
greenVector:(greenVector copyFrom:start to:stop) |
|
453 |
blueVector:(blueVector copyFrom:start to:stop) |
|
2483 | 454 |
! |
455 |
||
917
d0ab9a4e0344
postCopt must copy the vectors
Claus Gittinger <cg@exept.de>
parents:
808
diff
changeset
|
456 |
postCopy |
d0ab9a4e0344
postCopt must copy the vectors
Claus Gittinger <cg@exept.de>
parents:
808
diff
changeset
|
457 |
redVector := redVector copy. |
d0ab9a4e0344
postCopt must copy the vectors
Claus Gittinger <cg@exept.de>
parents:
808
diff
changeset
|
458 |
greenVector := greenVector copy. |
d0ab9a4e0344
postCopt must copy the vectors
Claus Gittinger <cg@exept.de>
parents:
808
diff
changeset
|
459 |
blueVector := blueVector copy. |
d0ab9a4e0344
postCopt must copy the vectors
Claus Gittinger <cg@exept.de>
parents:
808
diff
changeset
|
460 |
|
d0ab9a4e0344
postCopt must copy the vectors
Claus Gittinger <cg@exept.de>
parents:
808
diff
changeset
|
461 |
"Created: 5.7.1996 / 14:52:15 / cg" |
d0ab9a4e0344
postCopt must copy the vectors
Claus Gittinger <cg@exept.de>
parents:
808
diff
changeset
|
462 |
! ! |
d0ab9a4e0344
postCopt must copy the vectors
Claus Gittinger <cg@exept.de>
parents:
808
diff
changeset
|
463 |
|
91 | 464 |
!Colormap methodsFor:'misc'! |
465 |
||
2448
89c338d3412e
more for collection-protocol compatibility
Claus Gittinger <cg@exept.de>
parents:
1435
diff
changeset
|
466 |
grow:howBig |
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
467 |
"change the receivers size" |
2448
89c338d3412e
more for collection-protocol compatibility
Claus Gittinger <cg@exept.de>
parents:
1435
diff
changeset
|
468 |
|
3271 | 469 |
|t| |
2448
89c338d3412e
more for collection-protocol compatibility
Claus Gittinger <cg@exept.de>
parents:
1435
diff
changeset
|
470 |
|
3271 | 471 |
howBig == self size ifTrue:[^ self]. |
472 |
redVector isNil ifTrue:[ |
|
473 |
redVector := ByteArray new:howBig. |
|
474 |
greenVector := ByteArray new:howBig. |
|
475 |
blueVector := ByteArray new:howBig. |
|
476 |
^ self |
|
477 |
]. |
|
478 |
t := redVector. redVector := ByteArray new:howBig. redVector replaceFrom:1 to:t size with:t startingAt:1. |
|
479 |
t := greenVector. greenVector := ByteArray new:howBig. greenVector replaceFrom:1 to:t size with:t startingAt:1. |
|
480 |
t := blueVector. blueVector := ByteArray new:howBig. blueVector replaceFrom:1 to:t size with:t startingAt:1. |
|
481 |
^ self |
|
2448
89c338d3412e
more for collection-protocol compatibility
Claus Gittinger <cg@exept.de>
parents:
1435
diff
changeset
|
482 |
! |
89c338d3412e
more for collection-protocol compatibility
Claus Gittinger <cg@exept.de>
parents:
1435
diff
changeset
|
483 |
|
91 | 484 |
scaleValuesBy:scaleFactor |
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
485 |
"multiply all values by scaleFactor; finally round to integer. |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
486 |
This can be used to brighten/darken an images colormap" |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
487 |
|
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
488 |
|sz "{ Class: SmallInteger }" | |
91 | 489 |
|
635
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
490 |
sz := redVector size. |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
491 |
1 to:sz do:[:index | |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
492 |
redVector at:index put:((redVector at:index) * scaleFactor) rounded. |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
493 |
greenVector at:index put:((greenVector at:index) * scaleFactor) rounded. |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
494 |
blueVector at:index put:((blueVector at:index) * scaleFactor) rounded. |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
495 |
] |
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
496 |
|
1e1c3f870ba8
colorMap is now 0-index based (more compatibility with ST-80's Palette)
Claus Gittinger <cg@exept.de>
parents:
611
diff
changeset
|
497 |
"Modified: 2.5.1996 / 12:46:07 / cg" |
91 | 498 |
! ! |
285 | 499 |
|
3276 | 500 |
!Colormap methodsFor:'printing & storing'! |
501 |
||
502 |
storeOn:aStream |
|
503 |
"append a representation to aStream, from which the receiver |
|
504 |
can be reconstructed" |
|
505 |
||
506 |
aStream nextPutAll:'(' , self class name ,' redVector:'. |
|
507 |
redVector storeOn:aStream. |
|
508 |
aStream nextPutAll:' greenVector:'. |
|
509 |
greenVector storeOn:aStream. |
|
510 |
aStream nextPutAll:' blueVector:'. |
|
511 |
blueVector storeOn:aStream. |
|
512 |
aStream nextPutAll:')' |
|
513 |
||
514 |
"Created: 30.5.1996 / 16:28:27 / ca" |
|
515 |
"Modified: 30.5.1996 / 16:32:44 / ca" |
|
516 |
! ! |
|
517 |
||
1435 | 518 |
!Colormap methodsFor:'queries'! |
519 |
||
520 |
indexOfPaintNearest: color |
|
521 |
|minDistance minIndex dist |
|
522 |
sz "{ Class: SmallInteger }"| |
|
523 |
||
524 |
minDistance := (self at:1) deltaFrom:color. |
|
525 |
minIndex := 1. |
|
526 |
sz := self size. |
|
527 |
2 to:sz do:[:idx | |
|
528 |
dist := (self at:idx) deltaFrom:color. |
|
529 |
dist < minDistance ifTrue:[ |
|
530 |
minDistance := dist. |
|
531 |
minIndex := idx. |
|
532 |
] |
|
533 |
]. |
|
534 |
^ minIndex |
|
535 |
||
536 |
"Created: 6.3.1997 / 15:45:39 / cg" |
|
3265 | 537 |
! |
538 |
||
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
539 |
isFixedPalette |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
540 |
^ false |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
541 |
! |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
542 |
|
3840 | 543 |
isGreyscaleColormap |
544 |
"return true, if the receiver is actually a greymap. |
|
545 |
Could be used to convert images as read from imageFiles |
|
546 |
(for example, GIF-files) automatically to greyScale (which is not yet done)." |
|
547 |
||
548 |
|sz "{ Class: SmallInteger }" |
|
549 |
redVal| |
|
550 |
||
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
551 |
sz := self size. |
3840 | 552 |
|
553 |
1 to:sz do:[:i | |
|
4185
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
554 |
redVal := self redByteAt:i. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
555 |
redVal ~~ (self greenByteAt:i) ifTrue:[^ false]. |
cc96d1c1e28c
fixedPalette has more functionality
Claus Gittinger <cg@exept.de>
parents:
4176
diff
changeset
|
556 |
redVal ~~ (self blueByteAt:i) ifTrue:[^ false]. |
3840 | 557 |
]. |
558 |
^ true |
|
559 |
! |
|
560 |
||
3265 | 561 |
size |
562 |
"return the number of colors in the receiver" |
|
563 |
||
564 |
^ redVector size |
|
565 |
||
566 |
"Modified: 23.4.1996 / 22:13:43 / cg" |
|
1435 | 567 |
! ! |
568 |
||
1092 | 569 |
!Colormap class methodsFor:'documentation'! |
285 | 570 |
|
571 |
version |
|
6059 | 572 |
^ '$Header: /cvs/stx/stx/libview/Colormap.st,v 1.40 2013-05-06 18:26:05 cg Exp $' |
285 | 573 |
! ! |
6059 | 574 |