author | Claus Gittinger <cg@exept.de> |
Fri, 15 Jul 2005 11:34:54 +0200 | |
changeset 1917 | 53832fa044f1 |
parent 1916 | c91c39976bef |
child 1921 | 699dca2ebb51 |
permissions | -rw-r--r-- |
400 | 1 |
" |
767 | 2 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 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 |
|
405 | 7 |
inclusion of the above copyright notice. This software may not |
400 | 8 |
be provided or otherwise made available to, or used by, any |
405 | 9 |
other person. No title to or ownership of the software is |
400 | 10 |
hereby transferred. |
11 |
" |
|
12 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
13 |
"{ Package: 'stx:libtool2' }" |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
14 |
|
400 | 15 |
ToolApplicationModel subclass:#ImageEditor |
975 | 16 |
instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
17 |
selectedColorIndex postOpenAction imageSeqNr drawingColormap' |
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
18 |
classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
19 |
DefaultRelativeSizes' |
929 | 20 |
poolDictionaries:'' |
21 |
category:'Interface-UIPainter' |
|
400 | 22 |
! |
23 |
||
24 |
!ImageEditor class methodsFor:'documentation'! |
|
25 |
||
26 |
copyright |
|
27 |
" |
|
767 | 28 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 29 |
All Rights Reserved |
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
405 | 33 |
inclusion of the above copyright notice. This software may not |
400 | 34 |
be provided or otherwise made available to, or used by, any |
405 | 35 |
other person. No title to or ownership of the software is |
400 | 36 |
hereby transferred. |
37 |
" |
|
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
737 | 42 |
Image Editor allows you to create, design, modify or just inspect images. |
400 | 43 |
|
44 |
[start with:] |
|
45 |
ImageEditor open |
|
941 | 46 |
ImageEditor openOnClass:Icon andSelector:#startIcon |
400 | 47 |
|
48 |
[see also:] |
|
49 |
ImageEditView Image |
|
50 |
||
51 |
[author:] |
|
544 | 52 |
Thomas Zwick, eXept Software AG |
1806 | 53 |
Claus Gittinger, eXept Software AG |
400 | 54 |
" |
55 |
! ! |
|
56 |
||
57 |
!ImageEditor class methodsFor:'instance creation'! |
|
58 |
||
59 |
openModalOnClass: aClass andSelector: aSelector |
|
900 | 60 |
"opens modal a Image Editor on aClass and aSelector" |
767 | 61 |
" |
62 |
self openModalOnClass: self andSelector: #leftMouseKeyIcon |
|
63 |
" |
|
400 | 64 |
|
767 | 65 |
|imageEditor imageEditView className resourceClassName resourceSelector| |
66 |
||
400 | 67 |
imageEditor := self new. |
767 | 68 |
|
900 | 69 |
aClass isClass ifTrue: [className := aClass name]. |
70 |
aClass isString ifTrue: [className := aClass]. |
|
903 | 71 |
aClass isNil ifTrue: [className := '']. |
400 | 72 |
|
688 | 73 |
imageEditor postOpenAction: [imageEditView := imageEditor imageEditView. imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector]. |
400 | 74 |
imageEditor openModal. |
75 |
||
688 | 76 |
resourceClassName := imageEditView resourceClass. |
767 | 77 |
resourceSelector := imageEditView resourceSelector. |
415 | 78 |
|
815 | 79 |
((className asString ~= resourceClassName) |
80 |
or:[aSelector asString ~= resourceSelector]) |
|
415 | 81 |
ifTrue: [^resourceClassName, ' ', resourceSelector] |
82 |
ifFalse:[^nil] |
|
400 | 83 |
! |
84 |
||
85 |
openOnClass: aClass andSelector: aSelector |
|
900 | 86 |
"opens a Image Editor on aClass and aSelector" |
767 | 87 |
" |
88 |
self openOnClass: self andSelector: #leftMouseKeyIcon |
|
89 |
" |
|
400 | 90 |
|
1057 | 91 |
|editor| |
92 |
||
93 |
editor := self new. |
|
94 |
editor allButOpen. |
|
1381 | 95 |
aSelector notNil ifTrue:[ |
96 |
editor loadFromMessage: aClass name, ' ', aSelector. |
|
97 |
] ifFalse:[ |
|
98 |
editor resourceClass:aClass |
|
99 |
]. |
|
1057 | 100 |
editor openWindow |
101 |
||
102 |
"Modified: / 16.3.1999 / 21:33:49 / cg" |
|
400 | 103 |
! |
104 |
||
767 | 105 |
openOnFile: aFileName |
900 | 106 |
"opens a Image Editor on aFileName" |
767 | 107 |
" |
108 |
self openOnFile: 'bitmaps/SmalltalkX.xbm' |
|
109 |
" |
|
400 | 110 |
|
1057 | 111 |
|editor| |
112 |
||
113 |
editor := self new. |
|
114 |
editor allButOpen. |
|
115 |
editor loadFromFile: aFileName. |
|
116 |
editor openWindow |
|
117 |
||
118 |
"Modified: / 16.3.1999 / 21:33:25 / cg" |
|
400 | 119 |
! |
120 |
||
767 | 121 |
openOnImage: anImage |
900 | 122 |
"opens a Image Editor on anImage" |
767 | 123 |
" |
895 | 124 |
self openOnImage: Icon startIcon |
767 | 125 |
" |
400 | 126 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
127 |
|editor| |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
128 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
129 |
editor := self new. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
130 |
editor allButOpen. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
131 |
editor loadFromImage: anImage. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
132 |
editor openWindow |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
133 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
134 |
"Modified: / 11.3.1999 / 16:18:33 / cg" |
400 | 135 |
! ! |
136 |
||
137 |
!ImageEditor class methodsFor:'accessing'! |
|
138 |
||
139 |
listOfColorMaps |
|
767 | 140 |
"returns the list of default color maps for a new image" |
400 | 141 |
|
142 |
|colorMap| |
|
898 | 143 |
|
400 | 144 |
(colorMap := OrderedCollection new) |
145 |
add: Color black; |
|
146 |
add: Color white; |
|
147 |
add: Color red; |
|
148 |
add: Color green; |
|
149 |
add: Color blue; |
|
150 |
add: Color cyan; |
|
151 |
add: Color yellow; |
|
152 |
add: Color magenta; |
|
898 | 153 |
add: (Color redByte: 127 greenByte: 0 blueByte: 0); |
154 |
add: (Color redByte: 0 greenByte: 127 blueByte: 0); |
|
155 |
add: (Color redByte: 0 greenByte: 0 blueByte: 127); |
|
156 |
add: (Color redByte: 0 greenByte: 127 blueByte: 127); |
|
157 |
add: (Color redByte: 127 greenByte: 127 blueByte: 0); |
|
158 |
add: (Color redByte: 127 greenByte: 0 blueByte: 127); |
|
159 |
add: (Color redByte: 127 greenByte: 127 blueByte: 127); |
|
160 |
add: (Color redByte: 170 greenByte: 170 blueByte: 170). |
|
161 |
||
400 | 162 |
0 to: 5 do: |
163 |
[:r| |
|
164 |
0 to: 5 do: |
|
165 |
[:g| |
|
166 |
0 to: 5 do: |
|
167 |
[:b| |
|
898 | 168 |
colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling) |
400 | 169 |
] |
170 |
] |
|
171 |
]. |
|
172 |
||
173 |
1 to: 25 do: |
|
174 |
[:g| |
|
898 | 175 |
colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling) |
400 | 176 |
]. |
177 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
178 |
^ Dictionary new |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
179 |
at: #depth24 put:(FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
180 |
at: #masked24 put:(FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
181 |
at: #depth16 put:(FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
182 |
at: #masked16 put:(FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
183 |
at: #depth8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
184 |
at: #masked8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
185 |
at: #depth4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
186 |
at: #masked4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
187 |
at: #depth2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
188 |
at: #masked2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
189 |
at: #depth1 put: (colorMap copyFrom: 1 to: 2); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
190 |
at: #masked1 put: (colorMap copyFrom: 1 to: 2); |
400 | 191 |
yourself |
192 |
! |
|
193 |
||
194 |
listOfDefaultSizes |
|
767 | 195 |
"returns the list of default sizes for a new image" |
400 | 196 |
|
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
197 |
^#('8x8' '16x16' '22x22' '32x32' '48x48' '64x64') |
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
198 |
|
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
199 |
"Modified: / 31.7.1998 / 01:57:34 / cg" |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
200 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
201 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
202 |
namesOfColorMaps |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
203 |
^ Dictionary new |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
204 |
at: #depth24 put: '24-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
205 |
at: #masked24 put: '24-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
206 |
at: #depth16 put: '16-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
207 |
at: #masked16 put: '16-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
208 |
at: #depth8 put: ' 8-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
209 |
at: #masked8 put: ' 8-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
210 |
at: #depth4 put: ' 4-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
211 |
at: #masked4 put: ' 4-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
212 |
at: #depth2 put: ' 2-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
213 |
at: #masked2 put: ' 2-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
214 |
at: #depth1 put: ' 1-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
215 |
at: #masked1 put: ' 1-plane + mask' ; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
216 |
yourself |
400 | 217 |
! ! |
218 |
||
460 | 219 |
!ImageEditor class methodsFor:'help specs'! |
220 |
||
1545 | 221 |
flyByHelpSpec |
222 |
<resource: #help> |
|
223 |
||
224 |
^super flyByHelpSpec addPairsFrom:#( |
|
225 |
||
226 |
#drawModeBox |
|
227 |
'Rectangle' |
|
228 |
||
229 |
#drawModeCopy |
|
230 |
'Copy' |
|
231 |
||
232 |
#drawModeFill |
|
1637 | 233 |
'Flood-Fill' |
1545 | 234 |
|
235 |
#drawModeFilledBox |
|
1637 | 236 |
'Filled Rectangle' |
1545 | 237 |
|
238 |
#drawModePaste |
|
239 |
'Paste' |
|
240 |
||
241 |
#drawModePasteUnder |
|
1637 | 242 |
'Paste Under' |
243 |
||
244 |
#drawModePasteWithMask |
|
1656 | 245 |
'Paste with Mask' |
1545 | 246 |
|
247 |
#drawModePoint |
|
248 |
'Point' |
|
249 |
||
1639 | 250 |
#drawModeSpecial |
251 |
'Special Operations' |
|
252 |
||
1545 | 253 |
#fileGrabImage |
1748
a62052c6ee71
toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents:
1741
diff
changeset
|
254 |
'Pick from Screen' |
1545 | 255 |
|
256 |
#fileLoadFromClass |
|
1884 | 257 |
'Load from Method...' |
1545 | 258 |
|
259 |
#fileLoadFromFile |
|
1884 | 260 |
'Load from File...' |
1545 | 261 |
|
262 |
#fileNewImage |
|
1637 | 263 |
'New Image' |
1545 | 264 |
|
265 |
#filePrint |
|
266 |
'Print' |
|
267 |
||
268 |
#fileSaveAs |
|
1884 | 269 |
'Save to File...' |
1545 | 270 |
|
271 |
#fileSaveMaskAs |
|
1884 | 272 |
'Save Mask to File...' |
1545 | 273 |
|
274 |
#fileSaveMethod |
|
1637 | 275 |
'Save as Method' |
1545 | 276 |
|
277 |
#fileSaveMethodAs |
|
1884 | 278 |
'Save as Method...' |
1545 | 279 |
|
280 |
) |
|
281 |
! |
|
282 |
||
460 | 283 |
helpSpec |
737 | 284 |
"This resource specification was automatically generated |
285 |
by the UIHelpTool of ST/X." |
|
286 |
||
287 |
"Do not manually edit this!! If it is corrupted, |
|
288 |
the UIHelpTool may not be able to read the specification." |
|
460 | 289 |
|
290 |
" |
|
737 | 291 |
UIHelpTool openOnClass:ImageEditor |
460 | 292 |
" |
293 |
||
737 | 294 |
<resource: #help> |
295 |
||
296 |
^super helpSpec addPairsFrom:#( |
|
460 | 297 |
|
298 |
#colorMap |
|
929 | 299 |
'ColorMap functions.' |
300 |
||
301 |
#colorMap1 |
|
302 |
'Convert to depth-1 image.' |
|
303 |
||
986 | 304 |
#colorMap1M |
305 |
'Convert to depth-1 image plus mask.' |
|
306 |
||
929 | 307 |
#colorMap2 |
308 |
'Convert to depth-2 image.' |
|
309 |
||
986 | 310 |
#colorMap2M |
311 |
'Convert to depth-2 image plus mask.' |
|
312 |
||
929 | 313 |
#colorMap4 |
314 |
'Convert to depth-4 image.' |
|
315 |
||
986 | 316 |
#colorMap4M |
317 |
'Convert to depth-4 image plus mask.' |
|
318 |
||
929 | 319 |
#colorMap8 |
320 |
'Convert to depth-8 image.' |
|
321 |
||
322 |
#colorMap8M |
|
323 |
'Convert to depth-8 image plus mask.' |
|
324 |
||
986 | 325 |
#colorMapTable |
326 |
'Shows a list of used colors of the image.' |
|
327 |
||
929 | 328 |
#compressColormap |
329 |
'Remove unneeded entries from the colorMap.' |
|
460 | 330 |
|
1045 | 331 |
#cropAll |
986 | 332 |
'Find and remove all borders.' |
333 |
||
1045 | 334 |
#cropBottom |
986 | 335 |
'Find and remove bottom border.' |
336 |
||
1045 | 337 |
#cropLeft |
986 | 338 |
'Find and remove left border.' |
339 |
||
1045 | 340 |
#cropManual |
986 | 341 |
'Specify border(s) to remove.' |
342 |
||
1045 | 343 |
#cropRight |
986 | 344 |
'Find and remove right border.' |
345 |
||
1045 | 346 |
#cropTop |
986 | 347 |
'Find and remove top border.' |
487 | 348 |
|
460 | 349 |
#drawModeBox |
1637 | 350 |
'Rectangle Drawing Mode.' |
460 | 351 |
|
352 |
#drawModeCopy |
|
1637 | 353 |
'Area Copy Mode.' |
460 | 354 |
|
355 |
#drawModeFill |
|
1637 | 356 |
'Flood Fill Mode.' |
460 | 357 |
|
358 |
#drawModeFilledBox |
|
1637 | 359 |
'Filled Rectangle Drawing Mode.' |
460 | 360 |
|
361 |
#drawModePaste |
|
1637 | 362 |
'Paste Mode.' |
914 | 363 |
|
364 |
#drawModePasteUnder |
|
1637 | 365 |
'Paste-Under Mode.' |
366 |
||
367 |
#drawModePasteWithMask |
|
368 |
'Paste-with-Mask Mode.' |
|
460 | 369 |
|
370 |
#drawModePoint |
|
1637 | 371 |
'Point Drawing Mode.' |
460 | 372 |
|
1639 | 373 |
#drawModeSpecial |
374 |
'Special Operations' |
|
375 |
||
460 | 376 |
#editFlipHorizontal |
1637 | 377 |
'Flip the image horizontally.' |
460 | 378 |
|
379 |
#editFlipVertical |
|
1637 | 380 |
'Flip the image vertically.' |
460 | 381 |
|
382 |
#editMagnifyImage |
|
914 | 383 |
'Magnify the image.' |
460 | 384 |
|
385 |
#editNegate |
|
914 | 386 |
'Invert the images colors.' |
460 | 387 |
|
388 |
#editResize |
|
914 | 389 |
'Resize the image (preserving the old image).' |
460 | 390 |
|
391 |
#editRotate |
|
914 | 392 |
'Rotate the image.' |
460 | 393 |
|
929 | 394 |
#fileGrabImage |
395 |
'Pick an image from the screen.' |
|
396 |
||
460 | 397 |
#fileLoadFromClass |
929 | 398 |
'Select and load an image from a resource method.' |
460 | 399 |
|
400 |
#fileLoadFromFile |
|
929 | 401 |
'Select and load an image from a file.' |
460 | 402 |
|
403 |
#fileNewImage |
|
914 | 404 |
'Create a new image' |
460 | 405 |
|
406 |
#filePrint |
|
407 |
'Print the image on a postscript printer.' |
|
408 |
||
409 |
#fileSaveAs |
|
914 | 410 |
'Save the image to a file.' |
460 | 411 |
|
412 |
#fileSaveMaskAs |
|
914 | 413 |
'Save the mask of the image to a file.' |
460 | 414 |
|
1613 | 415 |
#fileSaveButtonImageAs |
416 |
'Save an image of a button with the image to a file (for html use).' |
|
417 |
||
460 | 418 |
#fileSaveMethod |
914 | 419 |
'Save the image as resource method in the current class and selector.' |
460 | 420 |
|
421 |
#fileSaveMethodAs |
|
914 | 422 |
'Save the image as resource method in a class.' |
460 | 423 |
|
487 | 424 |
#magnificationNumber |
914 | 425 |
'Shows the current magnification.' |
487 | 426 |
|
427 |
#magnifyImageDown |
|
914 | 428 |
'Decrease magnification.' |
487 | 429 |
|
430 |
#magnifyImageUp |
|
914 | 431 |
'Increase magnification.' |
487 | 432 |
|
433 |
#mouseKeyColorMode |
|
1637 | 434 |
'Toggle between left and right mouse button color.' |
487 | 435 |
|
436 |
#previewView |
|
914 | 437 |
'Shows a preview of the image.' |
487 | 438 |
|
905 | 439 |
#settingsGridMagnification |
914 | 440 |
'Change the grid magnification of the edit view.' |
905 | 441 |
|
460 | 442 |
) |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
443 |
|
986 | 444 |
"Modified: / 7.9.1998 / 18:20:26 / cg" |
460 | 445 |
! ! |
446 |
||
737 | 447 |
!ImageEditor class methodsFor:'image specs'! |
448 |
||
1637 | 449 |
copyIcon |
450 |
"This resource specification was automatically generated |
|
451 |
by the ImageEditor of ST/X." |
|
452 |
||
453 |
"Do not manually edit this!! If it is corrupted, |
|
454 |
the ImageEditor may not be able to read the specification." |
|
455 |
||
456 |
" |
|
457 |
self copyIcon inspect |
|
458 |
ImageEditor openOnClass:self andSelector:#copyIcon |
|
459 |
Icon flushCachedIcons |
|
460 |
" |
|
461 |
||
462 |
<resource: #image> |
|
463 |
||
464 |
^Icon |
|
465 |
constantNamed:#'ImageEditor class copyIcon' |
|
466 |
ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@** @@J)UUTB*Z*)@*&**PJ)**$B*Z*)@*&**PJ)**$@@Z*)@@F**P@AUUT@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@C? O>@??3??O?<??3??O?<??3??@_<A?0@@@@a') ; yourself); yourself] |
|
467 |
! |
|
468 |
||
469 |
fillIcon |
|
470 |
"This resource specification was automatically generated |
|
471 |
by the ImageEditor of ST/X." |
|
472 |
||
473 |
"Do not manually edit this!! If it is corrupted, |
|
474 |
the ImageEditor may not be able to read the specification." |
|
475 |
||
476 |
" |
|
477 |
self fillIcon inspect |
|
478 |
ImageEditor openOnClass:self andSelector:#fillIcon |
|
479 |
Icon flushCachedIcons |
|
480 |
" |
|
481 |
||
482 |
<resource: #image> |
|
483 |
||
484 |
^Icon |
|
485 |
constantNamed:#'ImageEditor class fillIcon' |
|
486 |
ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@ @@@@*H@@D*(@@DUUP@EAUU@AAEU@@@@U@@DDA@@@@@@@@PP@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C @Q@BN@I<@?8C?0[?!!G<@O P\@@ D@@@@@@@@@a') ; yourself); yourself] |
|
487 |
! |
|
488 |
||
489 |
fillRectIcon |
|
490 |
"This resource specification was automatically generated |
|
491 |
by the ImageEditor of ST/X." |
|
492 |
||
493 |
"Do not manually edit this!! If it is corrupted, |
|
494 |
the ImageEditor may not be able to read the specification." |
|
495 |
||
496 |
" |
|
497 |
self fillRectIcon inspect |
|
498 |
ImageEditor openOnClass:self andSelector:#fillRectIcon |
|
499 |
Icon flushCachedIcons |
|
500 |
" |
|
501 |
||
502 |
<resource: #image> |
|
503 |
||
504 |
^Icon |
|
505 |
constantNamed:#'ImageEditor class fillRectIcon' |
|
506 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a') ; yourself); yourself] |
|
507 |
! |
|
508 |
||
737 | 509 |
leftMouseKeyIcon |
510 |
"This resource specification was automatically generated |
|
511 |
by the ImageEditor of ST/X." |
|
512 |
||
513 |
"Do not manually edit this!! If it is corrupted, |
|
514 |
the ImageEditor may not be able to read the specification." |
|
515 |
||
516 |
" |
|
1405 | 517 |
self leftMouseKeyIcon inspect |
737 | 518 |
ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon |
519 |
" |
|
520 |
||
521 |
<resource: #image> |
|
522 |
||
523 |
^Icon |
|
524 |
constantNamed:#'ImageEditor leftMouseKeyIcon' |
|
1433 | 525 |
ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@EJJ@@AR" @@T((@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself] |
526 |
! |
|
737 | 527 |
|
1637 | 528 |
pasteIcon |
529 |
"This resource specification was automatically generated |
|
530 |
by the ImageEditor of ST/X." |
|
531 |
||
532 |
"Do not manually edit this!! If it is corrupted, |
|
533 |
the ImageEditor may not be able to read the specification." |
|
534 |
||
535 |
" |
|
536 |
self pasteIcon inspect |
|
537 |
ImageEditor openOnClass:self andSelector:#pasteIcon |
|
538 |
Icon flushCachedIcons |
|
539 |
" |
|
540 |
||
541 |
<resource: #image> |
|
542 |
||
543 |
^Icon |
|
544 |
constantNamed:#'ImageEditor class pasteIcon' |
|
545 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L0A&@@D3LC@@A @AL3@3@FX@@QDPY&Y& |
|
546 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself] |
|
547 |
! |
|
548 |
||
549 |
pasteUnderIcon |
|
550 |
"This resource specification was automatically generated |
|
551 |
by the ImageEditor of ST/X." |
|
552 |
||
553 |
"Do not manually edit this!! If it is corrupted, |
|
554 |
the ImageEditor may not be able to read the specification." |
|
555 |
||
556 |
" |
|
557 |
self pasteUnderIcon inspect |
|
558 |
ImageEditor openOnClass:self andSelector:#pasteUnderIcon |
|
559 |
Icon flushCachedIcons |
|
560 |
" |
|
561 |
||
562 |
<resource: #image> |
|
563 |
||
564 |
^Icon |
|
565 |
constantNamed:#'ImageEditor class pasteUnderIcon' |
|
566 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L0A&@@D3LC@@A @AL3@3@FX@@QDPY&Y& |
|
567 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself] |
|
568 |
! |
|
569 |
||
570 |
pasteWithMaskIcon |
|
571 |
"This resource specification was automatically generated |
|
572 |
by the ImageEditor of ST/X." |
|
573 |
||
574 |
"Do not manually edit this!! If it is corrupted, |
|
575 |
the ImageEditor may not be able to read the specification." |
|
576 |
||
577 |
" |
|
578 |
self pasteWithMaskIcon inspect |
|
579 |
ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon |
|
580 |
Icon flushCachedIcons |
|
581 |
" |
|
582 |
||
583 |
<resource: #image> |
|
584 |
||
585 |
^Icon |
|
586 |
constantNamed:#'ImageEditor class pasteWithMaskIcon' |
|
587 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L3A&@@D3LCL0A @AL3@3LFX@@QDPY&Y& |
|
588 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself] |
|
589 |
! |
|
590 |
||
591 |
pointIcon |
|
592 |
"This resource specification was automatically generated |
|
593 |
by the ImageEditor of ST/X." |
|
594 |
||
595 |
"Do not manually edit this!! If it is corrupted, |
|
596 |
the ImageEditor may not be able to read the specification." |
|
597 |
||
598 |
" |
|
599 |
self pointIcon inspect |
|
600 |
ImageEditor openOnClass:self andSelector:#pointIcon |
|
601 |
Icon flushCachedIcons |
|
602 |
" |
|
603 |
||
604 |
<resource: #image> |
|
605 |
||
606 |
^Icon |
|
607 |
constantNamed:#'ImageEditor class pointIcon' |
|
608 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@B@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@0@G@@8@G@@8@G@@8@G@@X@B@@@@@@@@@a') ; yourself); yourself] |
|
609 |
! |
|
610 |
||
611 |
rectIcon |
|
612 |
"This resource specification was automatically generated |
|
613 |
by the ImageEditor of ST/X." |
|
614 |
||
615 |
"Do not manually edit this!! If it is corrupted, |
|
616 |
the ImageEditor may not be able to read the specification." |
|
617 |
||
618 |
" |
|
619 |
self rectIcon inspect |
|
620 |
ImageEditor openOnClass:self andSelector:#rectIcon |
|
621 |
Icon flushCachedIcons |
|
622 |
" |
|
623 |
||
624 |
<resource: #image> |
|
625 |
||
626 |
^Icon |
|
627 |
constantNamed:#'ImageEditor class rectIcon' |
|
628 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0HA@ DB@PHA@ DB@PHA@ DC?0@@@@@@@a') ; yourself); yourself] |
|
629 |
! |
|
630 |
||
737 | 631 |
rightMouseKeyIcon |
632 |
"This resource specification was automatically generated |
|
633 |
by the ImageEditor of ST/X." |
|
634 |
||
635 |
"Do not manually edit this!! If it is corrupted, |
|
636 |
the ImageEditor may not be able to read the specification." |
|
637 |
||
638 |
" |
|
1405 | 639 |
self rightMouseKeyIcon inspect |
737 | 640 |
ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon |
641 |
" |
|
642 |
||
643 |
<resource: #image> |
|
644 |
||
645 |
^Icon |
|
646 |
constantNamed:#'ImageEditor rightMouseKeyIcon' |
|
1433 | 647 |
ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@JJE@@B"!!P@@((T@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself] |
1637 | 648 |
! |
649 |
||
650 |
specialIcon |
|
651 |
"This resource specification was automatically generated |
|
652 |
by the ImageEditor of ST/X." |
|
653 |
||
654 |
"Do not manually edit this!! If it is corrupted, |
|
655 |
the ImageEditor may not be able to read the specification." |
|
656 |
||
657 |
" |
|
658 |
self specialIcon inspect |
|
659 |
ImageEditor openOnClass:self andSelector:#specialIcon |
|
660 |
Icon flushCachedIcons |
|
661 |
" |
|
662 |
||
663 |
<resource: #image> |
|
664 |
||
665 |
^Icon |
|
666 |
constantNamed:#'ImageEditor class specialIcon' |
|
667 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@@@B@@@@@0@@@@@@@@@@@@@@@P@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@L@@0@G @^@A8@G @L@@0@@@@L@@0@@@@@a') ; yourself); yourself] |
|
1433 | 668 |
! ! |
737 | 669 |
|
400 | 670 |
!ImageEditor class methodsFor:'interface specs'! |
671 |
||
1650 | 672 |
changeHLSDialogSpec |
673 |
"This resource specification was automatically generated |
|
674 |
by the UIPainter of ST/X." |
|
675 |
||
676 |
"Do not manually edit this!! If it is corrupted, |
|
677 |
the UIPainter may not be able to read the specification." |
|
678 |
||
679 |
" |
|
680 |
UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec |
|
681 |
ImageEditor new openInterface:#changeHLSDialogSpec |
|
682 |
" |
|
683 |
||
684 |
<resource: #canvas> |
|
685 |
||
686 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
687 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
688 |
name: changeHLSDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
689 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
690 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
691 |
label: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
692 |
name: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
693 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
694 |
bounds: (Rectangle 14 46 326 229) |
1650 | 695 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
696 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
697 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
698 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
699 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
700 |
label: 'Hue-Shift:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
701 |
name: 'HueLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
702 |
layout: (LayoutFrame 20 0 21 0 120 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
703 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
704 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
705 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
706 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
707 |
name: 'HueShiftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
708 |
layout: (LayoutFrame 123 0 21 0 166 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
709 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
710 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
711 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
712 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
713 |
maxValue: 360 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
714 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
715 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
716 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
717 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
718 |
name: 'HueWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
719 |
layout: (LayoutFrame 180 0 22 0 297 0 42 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
720 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
721 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
722 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
723 |
endlessRotation: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
724 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
725 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
726 |
label: 'Light Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
727 |
name: 'LightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
728 |
layout: (LayoutFrame 18 0 50 0 120 0 72 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
729 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
730 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
731 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
732 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
733 |
name: 'LightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
734 |
layout: (LayoutFrame 123 0 50 0 166 0 72 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
735 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
736 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
737 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
738 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
739 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
740 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
741 |
acceptOnPointerLeave: false |
1650 | 742 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
743 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
744 |
name: 'LightWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
745 |
layout: (LayoutFrame 180 0 51 0 297 0 71 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
746 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
747 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
748 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
749 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
750 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
751 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
752 |
label: 'Saturation Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
753 |
name: 'SaturationLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
754 |
layout: (LayoutFrame 9 0 79 0 120 0 101 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
755 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
756 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
757 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
758 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
759 |
name: 'SaturationEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
760 |
layout: (LayoutFrame 123 0 79 0 166 0 101 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
761 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
762 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
763 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
764 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
765 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
766 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
767 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
768 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
769 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
770 |
name: 'SaturationWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
771 |
layout: (LayoutFrame 180 0 80 0 297 0 100 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
772 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
773 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
774 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
775 |
step: 1 |
1650 | 776 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
777 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
778 |
name: 'HueColorLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
779 |
layout: (LayoutFrame 10 0.0 109 0 -10 1.0 148 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
780 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
781 |
backgroundChannel: hlsColor |
1650 | 782 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
783 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
784 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
785 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
786 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
787 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
788 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
789 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
790 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
791 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
792 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
793 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
794 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
795 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
796 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
797 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
798 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
799 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
800 |
extent: (Point 151 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
801 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
802 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
803 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
804 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
805 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
806 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
807 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
808 |
extent: (Point 152 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
809 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
810 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
811 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
812 |
) |
1650 | 813 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
814 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
815 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
816 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
817 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
818 |
! |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
819 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
820 |
cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
821 |
"This resource specification was automatically generated |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
822 |
by the UIPainter of ST/X." |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
823 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
824 |
"Do not manually edit this!! If it is corrupted, |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
825 |
the UIPainter may not be able to read the specification." |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
826 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
827 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
828 |
UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
829 |
ImageEditor new openInterface:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
830 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
831 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
832 |
<resource: #canvas> |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
833 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
834 |
^ |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
835 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
836 |
name: cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
837 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
838 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
839 |
label: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
840 |
name: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
841 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
842 |
bounds: (Rectangle 14 46 259 229) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
843 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
844 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
845 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
846 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
847 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
848 |
label: 'Left:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
849 |
name: 'GropLeftLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
850 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
851 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
852 |
adjust: right |
1650 | 853 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
854 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
855 |
name: 'GropLeftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
856 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
857 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
858 |
model: left |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
859 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
860 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
861 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
862 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
863 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
864 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
865 |
name: 'GropLeftNowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
866 |
layout: (LayoutFrame 148 0 21 0 221 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
867 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
868 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
869 |
model: gropLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
870 |
autoRepeat: true |
1650 | 871 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
872 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
873 |
label: 'Right:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
874 |
name: 'GropRightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
875 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
876 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
877 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
878 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
879 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
880 |
name: 'GropRightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
881 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
882 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
883 |
model: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
884 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
885 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
886 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
887 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
888 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
889 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
890 |
name: 'GropRightButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
891 |
layout: (LayoutFrame 148 0 51 0 221 0 73 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
892 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
893 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
894 |
model: gropRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
895 |
autoRepeat: true |
1650 | 896 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
897 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
898 |
label: 'Top:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
899 |
name: 'GropTopLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
900 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
901 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
902 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
903 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
904 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
905 |
name: 'GropTopEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
906 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
907 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
908 |
model: top |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
909 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
910 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
911 |
acceptOnPointerLeave: false |
1650 | 912 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
913 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
914 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
915 |
name: 'GropTopButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
916 |
layout: (LayoutFrame 148 0 81 0 221 0 103 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
917 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
918 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
919 |
model: gropTopNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
920 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
921 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
922 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
923 |
label: 'Bottom:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
924 |
name: 'GropBottomLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
925 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
926 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
927 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
928 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
929 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
930 |
name: 'GropBottomEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
931 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
932 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
933 |
model: bottom |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
934 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
935 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
936 |
acceptOnPointerLeave: false |
1650 | 937 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
938 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
939 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
940 |
name: 'GropBottomButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
941 |
layout: (LayoutFrame 148 0 111 0 221 0 133 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
942 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
943 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
944 |
model: gropBottomNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
945 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
946 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
947 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
948 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
949 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
950 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
951 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
952 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
953 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
954 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
955 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
956 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
957 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
958 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
959 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
960 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
961 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
962 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
963 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
964 |
extent: (Point 77 22) |
1650 | 965 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
966 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
967 |
label: 'Apply' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
968 |
name: 'Button3' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
969 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
970 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
971 |
model: applyAction |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
972 |
extent: (Point 78 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
973 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
974 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
975 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
976 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
977 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
978 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
979 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
980 |
extent: (Point 78 22) |
1650 | 981 |
) |
982 |
) |
|
983 |
||
984 |
) |
|
985 |
) |
|
986 |
) |
|
987 |
||
988 |
) |
|
989 |
) |
|
990 |
! |
|
991 |
||
767 | 992 |
dialogSpecForNewImage |
737 | 993 |
"This resource specification was automatically generated |
994 |
by the UIPainter of ST/X." |
|
519 | 995 |
|
737 | 996 |
"Do not manually edit this!! If it is corrupted, |
997 |
the UIPainter may not be able to read the specification." |
|
519 | 998 |
|
999 |
" |
|
767 | 1000 |
UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage |
1001 |
ImageEditor new openInterface:#dialogSpecForNewImage |
|
519 | 1002 |
" |
1003 |
||
1004 |
<resource: #canvas> |
|
1005 |
||
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1006 |
^ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1007 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1008 |
name: dialogSpecForNewImage |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1009 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1010 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1011 |
label: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1012 |
name: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1013 |
min: (Point 10 10) |
1806 | 1014 |
bounds: (Rectangle 0 0 301 119) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1015 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1016 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1017 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1018 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1019 |
(ViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1020 |
name: 'View' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1021 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -35 1.0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1022 |
level: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1023 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1024 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1025 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1026 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1027 |
label: 'Size' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1028 |
name: 'framedBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1029 |
layout: (LayoutFrame 1 0.0 7 0.0 0 0.4 76 0) |
1806 | 1030 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1031 |
labelPosition: topLeft |
1806 | 1032 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1033 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1034 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1035 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1036 |
(ComboBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1037 |
name: 'defaultSizesComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1038 |
layout: (LayoutFrame 0 0.0 10 0.0 0 1 35 0.0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1039 |
model: selectionOfSize |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1040 |
type: string |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1041 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1042 |
comboList: listOfDefaultSizes |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1043 |
isFilenameBox: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1044 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1045 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1046 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1047 |
) |
1490 | 1048 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1049 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1050 |
label: 'Color Map' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1051 |
name: 'framedBox2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1052 |
layout: (LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0) |
1806 | 1053 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1054 |
labelPosition: topLeft |
1806 | 1055 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1056 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1057 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1058 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1059 |
(ComboListSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1060 |
name: 'colorMapComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1061 |
layout: (LayoutFrame 0 0.0 10 0.0 0 1 35 0.0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1062 |
model: selectionOfColorMap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1063 |
comboList: listOfColorMaps |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1064 |
useIndex: false |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1065 |
hidePullDownMenuButton: false |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1066 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1067 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1068 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1069 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1070 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1071 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1072 |
|
986 | 1073 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1074 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1075 |
(UISubSpecification |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1076 |
name: 'windowSpecForCommitWithoutChannels' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1077 |
layout: (LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1078 |
minorKey: windowSpecForCommitWithoutChannels |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1079 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1080 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1081 |
|
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1082 |
) |
986 | 1083 |
) |
1084 |
! |
|
1085 |
||
1557 | 1086 |
shiftDialogSpec |
1087 |
"This resource specification was automatically generated |
|
1088 |
by the UIPainter of ST/X." |
|
1089 |
||
1090 |
"Do not manually edit this!! If it is corrupted, |
|
1091 |
the UIPainter may not be able to read the specification." |
|
1092 |
||
1093 |
" |
|
1094 |
UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec |
|
1095 |
ImageEditor new openInterface:#shiftDialogSpec |
|
1096 |
" |
|
1097 |
||
1098 |
<resource: #canvas> |
|
1099 |
||
1100 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1101 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1102 |
name: shiftDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1103 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1104 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1105 |
label: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1106 |
name: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1107 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1108 |
bounds: (Rectangle 14 46 259 229) |
1557 | 1109 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1110 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1111 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1112 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1113 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1114 |
label: 'Amount:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1115 |
name: 'AmountLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1116 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1117 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1118 |
adjust: right |
1557 | 1119 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1120 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1121 |
name: 'AmountEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1122 |
layout: (LayoutFrame 95 0 21 0 139 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1123 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1124 |
model: shiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1125 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1126 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1127 |
acceptOnPointerLeave: false |
1557 | 1128 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1129 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1130 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1131 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1132 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1133 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1134 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1135 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1136 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1137 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1138 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1139 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1140 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1141 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1142 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1143 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1144 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1145 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1146 |
extent: (Point 118 22) |
1557 | 1147 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1148 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1149 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1150 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1151 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1152 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1153 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1154 |
extent: (Point 118 22) |
1557 | 1155 |
) |
1156 |
) |
|
1157 |
||
1158 |
) |
|
1159 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1160 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1161 |
name: 'upArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1162 |
layout: (LayoutFrame 105 0 63 0 127 0 85 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1163 |
model: shiftUpNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1164 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1165 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1166 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1167 |
direction: up |
1557 | 1168 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1169 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1170 |
name: 'leftArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1171 |
layout: (LayoutFrame 84 0 86 0 106 0 108 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1172 |
model: shiftLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1173 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1174 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1175 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1176 |
direction: left |
1557 | 1177 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1178 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1179 |
name: 'rightArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1180 |
layout: (LayoutFrame 126 0 86 0 148 0 108 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1181 |
model: shiftRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1182 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1183 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1184 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1185 |
direction: right |
1557 | 1186 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1187 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1188 |
name: 'downArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1189 |
layout: (LayoutFrame 105 0 107 0 127 0 129 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1190 |
model: shiftDownNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1191 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1192 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1193 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1194 |
direction: down |
1557 | 1195 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1196 |
(CheckBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1197 |
label: 'Wrap' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1198 |
name: 'CheckBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1199 |
layout: (LayoutFrame 153 0 22 0 289 0 44 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1200 |
model: wrap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1201 |
translateLabel: true |
1713 | 1202 |
) |
1557 | 1203 |
) |
1204 |
||
1205 |
) |
|
1206 |
) |
|
1207 |
! |
|
1208 |
||
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1209 |
uncropDialogSpec |
1480 | 1210 |
"This resource specification was automatically generated |
1211 |
by the UIPainter of ST/X." |
|
1796 | 1212 |
|
1480 | 1213 |
"Do not manually edit this!! If it is corrupted, |
1214 |
the UIPainter may not be able to read the specification." |
|
1796 | 1215 |
|
1480 | 1216 |
" |
1796 | 1217 |
UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec |
1218 |
ImageEditor new openInterface:#uncropDialogSpec |
|
1480 | 1219 |
" |
1796 | 1220 |
|
1221 |
<resource: #canvas> |
|
1222 |
||
1223 |
^ |
|
1224 |
#(FullSpec |
|
1225 |
name: uncropDialogSpec |
|
1226 |
window: |
|
1227 |
(WindowSpec |
|
1228 |
label: 'Add Border(s)' |
|
1229 |
name: 'Add Border(s)' |
|
1230 |
min: (Point 10 10) |
|
1231 |
max: (Point 800 478) |
|
1232 |
bounds: (Rectangle 0 0 261 228) |
|
1233 |
) |
|
1234 |
component: |
|
1235 |
(SpecCollection |
|
1236 |
collection: ( |
|
1237 |
(LabelSpec |
|
1238 |
label: 'Left:' |
|
1239 |
name: 'Label1' |
|
1240 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
|
1241 |
translateLabel: true |
|
1242 |
adjust: right |
|
1243 |
) |
|
1244 |
(InputFieldSpec |
|
1245 |
name: 'EntryField1' |
|
1246 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
|
1247 |
model: left |
|
1248 |
type: number |
|
1249 |
acceptOnPointerLeave: false |
|
1250 |
) |
|
1251 |
(LabelSpec |
|
1252 |
label: 'Right:' |
|
1253 |
name: 'Label2' |
|
1254 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
|
1255 |
translateLabel: true |
|
1256 |
adjust: right |
|
1257 |
) |
|
1258 |
(InputFieldSpec |
|
1259 |
name: 'EntryField2' |
|
1260 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
|
1261 |
model: right |
|
1262 |
type: number |
|
1263 |
acceptOnPointerLeave: false |
|
1264 |
) |
|
1265 |
(LabelSpec |
|
1266 |
label: 'Top:' |
|
1267 |
name: 'Label3' |
|
1268 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
|
1269 |
translateLabel: true |
|
1270 |
adjust: right |
|
1271 |
) |
|
1272 |
(InputFieldSpec |
|
1273 |
name: 'EntryField3' |
|
1274 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
|
1275 |
model: top |
|
1276 |
type: number |
|
1277 |
acceptOnPointerLeave: false |
|
1278 |
) |
|
1279 |
(LabelSpec |
|
1280 |
label: 'Bottom:' |
|
1281 |
name: 'Label4' |
|
1282 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
|
1283 |
translateLabel: true |
|
1284 |
adjust: right |
|
1285 |
) |
|
1286 |
(InputFieldSpec |
|
1287 |
name: 'EntryField4' |
|
1288 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
|
1289 |
model: bottom |
|
1290 |
type: number |
|
1291 |
acceptOnPointerLeave: false |
|
1292 |
) |
|
1293 |
(HorizontalPanelViewSpec |
|
1294 |
name: 'HorizontalPanel1' |
|
1295 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
|
1296 |
horizontalLayout: fitSpace |
|
1297 |
verticalLayout: center |
|
1298 |
horizontalSpace: 3 |
|
1299 |
verticalSpace: 3 |
|
1300 |
reverseOrderIfOKAtLeft: true |
|
1301 |
component: |
|
1302 |
(SpecCollection |
|
1303 |
collection: ( |
|
1304 |
(ActionButtonSpec |
|
1305 |
label: 'Cancel' |
|
1306 |
name: 'Button1' |
|
1307 |
translateLabel: true |
|
1308 |
model: cancel |
|
1309 |
extent: (Point 118 22) |
|
1310 |
) |
|
1311 |
(ActionButtonSpec |
|
1312 |
label: 'OK' |
|
1313 |
name: 'Button2' |
|
1314 |
translateLabel: true |
|
1315 |
model: accept |
|
1316 |
extent: (Point 118 22) |
|
1317 |
) |
|
1318 |
) |
|
1319 |
||
1320 |
) |
|
1321 |
) |
|
1322 |
) |
|
1323 |
||
1324 |
) |
|
1325 |
) |
|
1480 | 1326 |
! |
1327 |
||
767 | 1328 |
windowSpec |
1329 |
"This resource specification was automatically generated |
|
1330 |
by the UIPainter of ST/X." |
|
1331 |
||
1332 |
"Do not manually edit this!! If it is corrupted, |
|
1333 |
the UIPainter may not be able to read the specification." |
|
1334 |
||
1335 |
" |
|
1336 |
UIPainter new openOnClass:ImageEditor andSelector:#windowSpec |
|
1337 |
ImageEditor new openInterface:#windowSpec |
|
1338 |
ImageEditor open |
|
1339 |
" |
|
1340 |
||
1341 |
<resource: #canvas> |
|
1342 |
||
1558 | 1343 |
^ |
1820 | 1344 |
#(FullSpec |
1345 |
name: windowSpec |
|
1346 |
window: |
|
1347 |
(WindowSpec |
|
1348 |
label: 'Image Editor' |
|
1349 |
name: 'Image Editor' |
|
1350 |
min: (Point 400 320) |
|
1351 |
bounds: (Rectangle 0 0 450 350) |
|
1352 |
menu: menu |
|
1558 | 1353 |
) |
1820 | 1354 |
component: |
1355 |
(SpecCollection |
|
1356 |
collection: ( |
|
1357 |
(MenuPanelSpec |
|
1358 |
name: 'menuToolbarView' |
|
1359 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1360 |
style: (FontDescription helvetica medium roman 10) |
|
1361 |
menu: menuToolbar |
|
1362 |
showSeparatingLines: true |
|
1558 | 1363 |
) |
1820 | 1364 |
(VariableHorizontalPanelSpec |
1365 |
name: 'horizontalPanel' |
|
1366 |
layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
1367 |
snapMode: both |
|
1843 | 1368 |
barLevel: 0 |
1820 | 1369 |
component: |
1370 |
(SpecCollection |
|
1371 |
collection: ( |
|
1372 |
(ViewSpec |
|
1373 |
name: 'leftView' |
|
1374 |
level: 1 |
|
1375 |
component: |
|
1376 |
(SpecCollection |
|
1377 |
collection: ( |
|
1378 |
(VariableVerticalPanelSpec |
|
1379 |
name: 'verticalPanel' |
|
1380 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1381 |
level: 0 |
|
1382 |
snapMode: both |
|
1383 |
component: |
|
1384 |
(SpecCollection |
|
1385 |
collection: ( |
|
1386 |
(ViewSpec |
|
1387 |
name: 'View1' |
|
1388 |
component: |
|
1389 |
(SpecCollection |
|
1390 |
collection: ( |
|
1391 |
(MenuPanelSpec |
|
1392 |
name: 'MouseButtonColorToolBar' |
|
1393 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
1394 |
level: 0 |
|
1395 |
menu: menuMouseButtonColors |
|
1558 | 1396 |
) |
1820 | 1397 |
(DataSetSpec |
1398 |
name: 'colorDataSetView' |
|
1399 |
layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
1400 |
activeHelpKey: colorMapTable |
|
1401 |
style: (FontDescription helvetica medium roman 10) |
|
1402 |
model: selectionOfColor |
|
1403 |
menu: colorMapMenu |
|
1404 |
hasHorizontalScrollBar: true |
|
1405 |
hasVerticalScrollBar: true |
|
1406 |
miniScrollerHorizontal: true |
|
1407 |
miniScrollerVertical: true |
|
1408 |
dataList: listOfColors |
|
1409 |
has3Dsepartors: true |
|
1410 |
has3Dseparators: true |
|
1900 | 1411 |
columnHolder: colorTableColumns |
1820 | 1412 |
verticalSpacing: 1 |
1900 | 1413 |
"/ columns: |
1414 |
"/ (OrderedCollection |
|
1415 |
"/ |
|
1416 |
"/ (DataSetColumnSpec |
|
1417 |
"/ labelButtonType: Button |
|
1418 |
"/ rendererType: rowSelector |
|
1419 |
"/ backgroundSelector: theColorItSelf: |
|
1420 |
"/ ) |
|
1421 |
"/ (DataSetColumnSpec |
|
1422 |
"/ label: 'R' |
|
1423 |
"/ labelAlignment: left |
|
1424 |
"/ labelButtonType: Button |
|
1425 |
"/ columnAlignment: right |
|
1426 |
"/ editorType: InputField |
|
1427 |
"/ type: number |
|
1428 |
"/ model: redFromColor: |
|
1429 |
"/ writeSelector: redAtColor:put: |
|
1430 |
"/ selectSelector: canSelectRedInColor: |
|
1431 |
"/ ) |
|
1432 |
"/ |
|
1433 |
"/ (DataSetColumnSpec |
|
1434 |
"/ label: 'G' |
|
1435 |
"/ labelAlignment: left |
|
1436 |
"/ labelButtonType: Button |
|
1437 |
"/ columnAlignment: right |
|
1438 |
"/ editorType: InputField |
|
1439 |
"/ type: number |
|
1440 |
"/ model: greenFromColor: |
|
1441 |
"/ writeSelector: greenAtColor:put: |
|
1442 |
"/ selectSelector: canSelectGreenInColor: |
|
1443 |
"/ ) |
|
1444 |
"/ (DataSetColumnSpec |
|
1445 |
"/ label: 'B' |
|
1446 |
"/ labelAlignment: left |
|
1447 |
"/ labelButtonType: Button |
|
1448 |
"/ columnAlignment: right |
|
1449 |
"/ editorType: InputField |
|
1450 |
"/ type: number |
|
1451 |
"/ model: blueFromColor: |
|
1452 |
"/ writeSelector: blueAtColor:put: |
|
1453 |
"/ selectSelector: canSelectBlueInColor: |
|
1454 |
"/ ) |
|
1455 |
"/ ) |
|
1820 | 1456 |
columnAdaptor: colorColumnAdaptor |
767 | 1457 |
) |
1558 | 1458 |
) |
1459 |
||
1460 |
) |
|
1461 |
) |
|
1820 | 1462 |
(ArbitraryComponentSpec |
1463 |
name: 'imagePreView' |
|
1464 |
activeHelpKey: previewView |
|
1465 |
menu: previewMenu |
|
1466 |
hasHorizontalScrollBar: true |
|
1467 |
hasVerticalScrollBar: true |
|
1468 |
miniScrollerHorizontal: true |
|
1469 |
miniScrollerVertical: true |
|
1470 |
hasBorder: false |
|
1471 |
component: ImageView |
|
767 | 1472 |
) |
1558 | 1473 |
) |
1474 |
||
767 | 1475 |
) |
1820 | 1476 |
handles: (Any 0.5 1.0) |
767 | 1477 |
) |
1558 | 1478 |
) |
1479 |
||
767 | 1480 |
) |
1558 | 1481 |
) |
1820 | 1482 |
(ViewSpec |
1483 |
name: 'rightView' |
|
1484 |
component: |
|
1485 |
(SpecCollection |
|
1486 |
collection: ( |
|
1487 |
(MenuPanelSpec |
|
1488 |
name: 'ToolBar1' |
|
1489 |
layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0) |
|
1490 |
level: 1 |
|
1491 |
menu: toolsMenuToolbar |
|
1492 |
verticalLayout: true |
|
1493 |
centerItems: true |
|
1494 |
textDefault: true |
|
1558 | 1495 |
) |
1820 | 1496 |
(ViewSpec |
1497 |
name: 'editingView' |
|
1498 |
layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0) |
|
1499 |
level: 1 |
|
1500 |
component: |
|
1501 |
(SpecCollection |
|
1502 |
collection: ( |
|
1503 |
(ArbitraryComponentSpec |
|
1504 |
name: 'imageEditView' |
|
1505 |
layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0) |
|
1506 |
hasHorizontalScrollBar: true |
|
1507 |
hasVerticalScrollBar: true |
|
1508 |
hasBorder: false |
|
1509 |
component: ImageEditView |
|
1637 | 1510 |
) |
1820 | 1511 |
(LabelSpec |
1512 |
name: 'coordLabel' |
|
1513 |
layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0) |
|
1514 |
level: -1 |
|
1515 |
labelChannel: imageInfoHolder |
|
1516 |
resizeForLabel: false |
|
1517 |
adjust: left |
|
1637 | 1518 |
) |
1820 | 1519 |
(ArrowButtonSpec |
1520 |
name: 'magnifyDownButton' |
|
1521 |
layout: (LayoutFrame -80 1 -22 1 -58 1 0 1) |
|
1522 |
activeHelpKey: magnifyImageDown |
|
1523 |
model: doMagnifyDown |
|
1524 |
enableChannel: imageIsLoaded |
|
1525 |
isTriggerOnDown: true |
|
1526 |
direction: left |
|
1637 | 1527 |
) |
1820 | 1528 |
(ArrowButtonSpec |
1529 |
name: 'magnifyUpButton' |
|
1530 |
layout: (LayoutFrame -24 1 -22 1 -2 1 0 1) |
|
1531 |
activeHelpKey: magnifyImageUp |
|
1532 |
model: doMagnifyUp |
|
1533 |
enableChannel: imageIsLoaded |
|
1534 |
isTriggerOnDown: true |
|
1535 |
direction: right |
|
1637 | 1536 |
) |
1820 | 1537 |
(InputFieldSpec |
1538 |
name: 'magnificationInputField' |
|
1539 |
layout: (LayoutFrame -57 1 -22 1 -26 1 0 1) |
|
1540 |
activeHelpKey: magnificationNumber |
|
1541 |
enableChannel: imageIsLoaded |
|
1542 |
model: valueOfMagnification |
|
1543 |
type: numberInRange |
|
1544 |
acceptOnReturn: false |
|
1545 |
acceptOnTab: false |
|
1546 |
numChars: 2 |
|
1547 |
minValue: 1 |
|
1548 |
maxValue: 99 |
|
1549 |
acceptOnPointerLeave: false |
|
1637 | 1550 |
) |
1551 |
) |
|
1552 |
||
1553 |
) |
|
1558 | 1554 |
) |
1555 |
) |
|
1556 |
||
1557 |
) |
|
1558 |
) |
|
1559 |
) |
|
1560 |
||
767 | 1561 |
) |
1843 | 1562 |
handles: (Any 0.288889 1.0) |
1558 | 1563 |
) |
1820 | 1564 |
(UISubSpecification |
1565 |
name: 'infoBarSubSpec' |
|
1566 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
1567 |
majorKey: ToolApplicationModel |
|
1568 |
minorKey: windowSpecForInfoBar |
|
1558 | 1569 |
) |
1570 |
) |
|
1571 |
||
1572 |
) |
|
767 | 1573 |
) |
519 | 1574 |
! ! |
1575 |
||
1576 |
!ImageEditor class methodsFor:'menu specs'! |
|
1577 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1578 |
colorMapMenu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1579 |
"This resource specification was automatically generated |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1580 |
by the MenuEditor of ST/X." |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1581 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1582 |
"Do not manually edit this!! If it is corrupted, |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1583 |
the MenuEditor may not be able to read the specification." |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1584 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1585 |
" |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1586 |
MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1587 |
(Menu new fromLiteralArrayEncoding:(ImageEditor colorMapMenu)) startUp |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1588 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1589 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1590 |
<resource: #menu> |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1591 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1592 |
^ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1593 |
#(Menu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1594 |
( |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1595 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1596 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1597 |
label: 'Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1598 |
itemValue: addColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1599 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1600 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1601 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1602 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1603 |
label: 'Pick and Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1604 |
itemValue: pickAndAddColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1605 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1606 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1607 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1608 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1609 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1610 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1611 |
enabled: hasColormap |
1852 | 1612 |
label: 'Cut Color' |
1613 |
itemValue: cutColorFromColormap |
|
1614 |
translateLabel: true |
|
1615 |
isVisible: false |
|
1616 |
) |
|
1617 |
(MenuItem |
|
1618 |
enabled: hasColormap |
|
1619 |
label: 'Copy Color' |
|
1620 |
itemValue: copyColorFromColormap |
|
1621 |
translateLabel: true |
|
1622 |
) |
|
1623 |
(MenuItem |
|
1624 |
enabled: hasColormap |
|
1625 |
label: 'Pick Color' |
|
1626 |
itemValue: pickColor |
|
1627 |
translateLabel: true |
|
1628 |
) |
|
1629 |
(MenuItem |
|
1630 |
enabled: hasColormap |
|
1631 |
label: 'Paste Color' |
|
1632 |
itemValue: pasteColorIntoColormap |
|
1633 |
translateLabel: true |
|
1634 |
) |
|
1635 |
(MenuItem |
|
1636 |
label: '-' |
|
1637 |
) |
|
1638 |
(MenuItem |
|
1639 |
enabled: hasColormap |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1640 |
label: 'Brighter' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1641 |
itemValue: makeSelectedColorBrighter |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1642 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1643 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1644 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1645 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1646 |
label: 'Darker' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1647 |
itemValue: makeSelectedColorDarker |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1648 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1649 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1650 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1651 |
enabled: hasColormap |
1884 | 1652 |
label: 'Make Gray' |
1653 |
itemValue: makeSelectedColorGray |
|
1654 |
translateLabel: true |
|
1655 |
) |
|
1656 |
(MenuItem |
|
1657 |
enabled: hasColormap |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1658 |
label: 'Edit Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1659 |
itemValue: editSelectedColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1660 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1661 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1662 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1663 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1664 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1665 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1666 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1667 |
label: 'Inspect Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1668 |
itemValue: inspectColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1669 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1670 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1671 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1672 |
nil |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1673 |
nil |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1674 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1675 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1676 |
|
400 | 1677 |
menu |
737 | 1678 |
"This resource specification was automatically generated |
1679 |
by the MenuEditor of ST/X." |
|
400 | 1680 |
|
737 | 1681 |
"Do not manually edit this!! If it is corrupted, |
1682 |
the MenuEditor may not be able to read the specification." |
|
400 | 1683 |
|
1684 |
" |
|
1685 |
MenuEditor new openOnClass:ImageEditor andSelector:#menu |
|
1686 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp |
|
1687 |
" |
|
1688 |
||
1689 |
<resource: #menu> |
|
1690 |
||
1124 | 1691 |
^ |
1882 | 1692 |
#(Menu |
1693 |
( |
|
1694 |
(MenuItem |
|
1695 |
label: '&File' |
|
1696 |
translateLabel: true |
|
1697 |
submenu: |
|
1698 |
(Menu |
|
1699 |
( |
|
1700 |
(MenuItem |
|
1701 |
activeHelpKey: fileNewImage |
|
1702 |
label: 'New...' |
|
1703 |
itemValue: doNewImage |
|
1704 |
translateLabel: true |
|
1124 | 1705 |
) |
1882 | 1706 |
(MenuItem |
1707 |
activeHelpKey: fileNewImage |
|
1708 |
label: 'New from ClipBoard' |
|
1709 |
itemValue: doNewImageFromClipboard |
|
1710 |
translateLabel: true |
|
1682 | 1711 |
) |
1882 | 1712 |
(MenuItem |
1713 |
label: '-' |
|
1124 | 1714 |
) |
1882 | 1715 |
(MenuItem |
1716 |
activeHelpKey: fileLoadFromClass |
|
1717 |
label: 'Load...' |
|
1718 |
itemValue: doLoadFromClass |
|
1719 |
translateLabel: true |
|
1124 | 1720 |
) |
1882 | 1721 |
(MenuItem |
1722 |
activeHelpKey: fileLoadFromFile |
|
1723 |
label: 'Load from File...' |
|
1724 |
itemValue: doLoadFromFile |
|
1725 |
translateLabel: true |
|
1124 | 1726 |
) |
1882 | 1727 |
(MenuItem |
1728 |
activeHelpKey: fileGrabImage |
|
1729 |
label: 'Grab from Screen...' |
|
1730 |
itemValue: grabScreenImage |
|
1731 |
translateLabel: true |
|
1124 | 1732 |
) |
1882 | 1733 |
(MenuItem |
1734 |
enabled: imageHasNextImage |
|
1735 |
label: 'Next in Sequence' |
|
1736 |
itemValue: nextImageInSequence |
|
1737 |
translateLabel: true |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
1738 |
) |
1882 | 1739 |
(MenuItem |
1740 |
label: '-' |
|
1124 | 1741 |
) |
1882 | 1742 |
(MenuItem |
1743 |
activeHelpKey: fileSaveMethod |
|
1744 |
enabled: imageIsLoadedAndClassDefined |
|
1745 |
label: 'Save' |
|
1746 |
itemValue: doSaveMethod |
|
1747 |
translateLabel: true |
|
1124 | 1748 |
) |
1882 | 1749 |
(MenuItem |
1750 |
activeHelpKey: fileSaveMethodAs |
|
1751 |
enabled: imageIsLoaded |
|
1752 |
label: 'Save As...' |
|
1753 |
itemValue: doSaveMethodAs |
|
1754 |
translateLabel: true |
|
1124 | 1755 |
) |
1882 | 1756 |
(MenuItem |
1757 |
activeHelpKey: fileSaveAs |
|
1758 |
enabled: imageIsLoaded |
|
1759 |
label: 'Save to File...' |
|
1760 |
itemValue: doSaveImageFileAs |
|
1761 |
translateLabel: true |
|
1124 | 1762 |
) |
1882 | 1763 |
(MenuItem |
1764 |
activeHelpKey: fileSaveMaskAs |
|
1765 |
enabled: imageIsLoaded |
|
1766 |
label: 'Save Mask to File...' |
|
1767 |
itemValue: doSaveImageMaskFileAs |
|
1768 |
translateLabel: true |
|
1124 | 1769 |
) |
1882 | 1770 |
(MenuItem |
1771 |
activeHelpKey: fileSaveButtonImageAs |
|
1772 |
enabled: imageIsLoaded |
|
1773 |
label: 'Save as Button to File...' |
|
1774 |
itemValue: doSaveButtonImageToFileAs |
|
1775 |
translateLabel: true |
|
1613 | 1776 |
) |
1882 | 1777 |
(MenuItem |
1778 |
enabled: imageIsLoaded |
|
1779 |
label: 'Copy to Clipboard' |
|
1780 |
itemValue: doCopyImageToClipboard |
|
1781 |
translateLabel: true |
|
1703 | 1782 |
) |
1882 | 1783 |
(MenuItem |
1784 |
label: '-' |
|
1124 | 1785 |
) |
1882 | 1786 |
(MenuItem |
1787 |
activeHelpKey: fileShowStoreString |
|
1788 |
enabled: imageIsLoaded |
|
1789 |
label: 'Show storeString' |
|
1790 |
itemValue: doShowStoreString |
|
1791 |
translateLabel: true |
|
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1792 |
) |
1882 | 1793 |
(MenuItem |
1794 |
activeHelpKey: fileEditMask |
|
1795 |
enabled: imageIsLoaded |
|
1796 |
label: 'Edit Mask' |
|
1797 |
itemValue: doEditMask |
|
1798 |
translateLabel: true |
|
1433 | 1799 |
) |
1882 | 1800 |
(MenuItem |
1801 |
label: '-' |
|
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1802 |
) |
1882 | 1803 |
(MenuItem |
1804 |
activeHelpKey: filePrint |
|
1805 |
enabled: imageIsLoaded |
|
1806 |
label: 'Print' |
|
1807 |
itemValue: doPrint |
|
1808 |
translateLabel: true |
|
1124 | 1809 |
) |
1882 | 1810 |
(MenuItem |
1811 |
label: '-' |
|
1124 | 1812 |
) |
1882 | 1813 |
(MenuItem |
1814 |
activeHelpKey: fileBrowseClass |
|
1815 |
enabled: hasClassDefined |
|
1816 |
label: 'Browse Class' |
|
1817 |
itemValue: doBrowseClass |
|
1818 |
translateLabel: true |
|
1124 | 1819 |
) |
1882 | 1820 |
(MenuItem |
1896 | 1821 |
label: 'Inspect Image' |
1822 |
itemValue: doInspectImage |
|
1823 |
translateLabel: true |
|
1824 |
) |
|
1825 |
(MenuItem |
|
1882 | 1826 |
label: '-' |
1124 | 1827 |
) |
1882 | 1828 |
(MenuItem |
1829 |
activeHelpKey: fileExit |
|
1830 |
label: 'Exit' |
|
1831 |
itemValue: closeRequest |
|
1832 |
translateLabel: true |
|
1124 | 1833 |
) |
1834 |
) |
|
1835 |
nil |
|
1836 |
nil |
|
400 | 1837 |
) |
1124 | 1838 |
) |
1882 | 1839 |
(MenuItem |
1840 |
enabled: imageIsLoaded |
|
1841 |
label: 'Edit' |
|
1842 |
translateLabel: true |
|
1843 |
submenu: |
|
1844 |
(Menu |
|
1845 |
( |
|
1846 |
(MenuItem |
|
1847 |
activeHelpKey: editUndo |
|
1848 |
enabled: valueOfCanUndo |
|
1849 |
label: 'Undo' |
|
1850 |
itemValue: doUndo |
|
1851 |
translateLabel: true |
|
1124 | 1852 |
) |
1882 | 1853 |
(MenuItem |
1854 |
label: '-' |
|
1124 | 1855 |
) |
1882 | 1856 |
(MenuItem |
1857 |
activeHelpKey: editFlipVertical |
|
1858 |
label: 'Flip - Vertical' |
|
1859 |
itemValue: doFlipVertical |
|
1860 |
translateLabel: true |
|
1861 |
) |
|
1862 |
(MenuItem |
|
1863 |
activeHelpKey: editFlipHorizontal |
|
1864 |
label: 'Flip - Horizontal' |
|
1865 |
itemValue: doFlipHorizontal |
|
1866 |
translateLabel: true |
|
1124 | 1867 |
) |
1882 | 1868 |
(MenuItem |
1869 |
label: '-' |
|
1124 | 1870 |
) |
1882 | 1871 |
(MenuItem |
1872 |
activeHelpKey: editResize |
|
1873 |
label: 'Resize...' |
|
1874 |
itemValue: doResizeImage |
|
1875 |
translateLabel: true |
|
1124 | 1876 |
) |
1882 | 1877 |
(MenuItem |
1878 |
activeHelpKey: editMagnifyImage |
|
1879 |
label: 'Magnify...' |
|
1880 |
itemValue: doMagnifyImage |
|
1881 |
translateLabel: true |
|
1124 | 1882 |
) |
1882 | 1883 |
(MenuItem |
1884 |
activeHelpKey: editMagnifyImage |
|
1885 |
label: 'Magnify By...' |
|
1886 |
itemValue: doMagnifyImageBy |
|
1887 |
translateLabel: true |
|
1124 | 1888 |
) |
1882 | 1889 |
(MenuItem |
1890 |
activeHelpKey: editRotate |
|
1891 |
label: 'Rotate...' |
|
1892 |
itemValue: doRotateImage |
|
1893 |
translateLabel: true |
|
1479 | 1894 |
) |
1882 | 1895 |
(MenuItem |
1896 |
label: '-' |
|
1124 | 1897 |
) |
1882 | 1898 |
(MenuItem |
1899 |
label: 'Invert' |
|
1900 |
itemValue: doNegativeImage |
|
1901 |
translateLabel: true |
|
1124 | 1902 |
) |
1882 | 1903 |
(MenuItem |
1904 |
label: 'Brighten' |
|
1905 |
itemValue: doBrightenImage |
|
1906 |
translateLabel: true |
|
1146 | 1907 |
) |
1882 | 1908 |
(MenuItem |
1909 |
label: 'Darken' |
|
1910 |
itemValue: doDarkenImage |
|
1911 |
translateLabel: true |
|
1146 | 1912 |
) |
1882 | 1913 |
(MenuItem |
1914 |
label: '-' |
|
1915 |
) |
|
1916 |
(MenuItem |
|
1917 |
label: 'Crop' |
|
1918 |
translateLabel: true |
|
1919 |
submenu: |
|
1920 |
(Menu |
|
1921 |
( |
|
1922 |
(MenuItem |
|
1888 | 1923 |
activeHelpKey: cropManual |
1924 |
label: 'Manual...' |
|
1925 |
itemValue: doCropManual |
|
1926 |
translateLabel: true |
|
1927 |
) |
|
1928 |
(MenuItem |
|
1929 |
label: '-' |
|
1930 |
) |
|
1931 |
(MenuItem |
|
1882 | 1932 |
activeHelpKey: cropAll |
1933 |
label: 'All' |
|
1934 |
itemValue: doCropAll |
|
1935 |
translateLabel: true |
|
400 | 1936 |
) |
1882 | 1937 |
(MenuItem |
1938 |
label: '-' |
|
986 | 1939 |
) |
1882 | 1940 |
(MenuItem |
1941 |
activeHelpKey: cropLeft |
|
1942 |
label: 'Left' |
|
1943 |
itemValue: doCropLeft |
|
1944 |
translateLabel: true |
|
1124 | 1945 |
) |
1882 | 1946 |
(MenuItem |
1947 |
activeHelpKey: cropRight |
|
1948 |
label: 'Right' |
|
1949 |
itemValue: doCropRight |
|
1950 |
translateLabel: true |
|
986 | 1951 |
) |
1882 | 1952 |
(MenuItem |
1953 |
activeHelpKey: cropTop |
|
1954 |
label: 'Top' |
|
1955 |
itemValue: doCropTop |
|
1956 |
translateLabel: true |
|
672 | 1957 |
) |
1882 | 1958 |
(MenuItem |
1959 |
activeHelpKey: cropBottom |
|
1960 |
label: 'Bottom' |
|
1961 |
itemValue: doCropBottom |
|
1962 |
translateLabel: true |
|
400 | 1963 |
) |
1124 | 1964 |
) |
1965 |
nil |
|
400 | 1966 |
nil |
1124 | 1967 |
) |
400 | 1968 |
) |
1882 | 1969 |
(MenuItem |
1970 |
activeHelpKey: uncropManual |
|
1971 |
label: 'Uncrop (Add Border)...' |
|
1972 |
itemValue: doUnCropManual |
|
1973 |
translateLabel: true |
|
1713 | 1974 |
) |
1882 | 1975 |
(MenuItem |
1976 |
activeHelpKey: shiftManual |
|
1977 |
label: 'Shift...' |
|
1978 |
itemValue: doShiftManual |
|
1979 |
translateLabel: true |
|
1557 | 1980 |
) |
1124 | 1981 |
) |
1982 |
nil |
|
1983 |
nil |
|
400 | 1984 |
) |
1124 | 1985 |
) |
1882 | 1986 |
(MenuItem |
1987 |
enabled: imageIsLoaded |
|
1988 |
label: 'Mode' |
|
1989 |
translateLabel: true |
|
1990 |
submenuChannel: modeMenu |
|
1637 | 1991 |
) |
1882 | 1992 |
(MenuItem |
1993 |
enabled: imageIsLoaded |
|
1994 |
label: 'ColorMap' |
|
1995 |
translateLabel: true |
|
1996 |
submenu: |
|
1997 |
(Menu |
|
1998 |
( |
|
1999 |
(MenuItem |
|
2000 |
label: 'Depth' |
|
2001 |
translateLabel: true |
|
2002 |
submenu: |
|
2003 |
(Menu |
|
2004 |
( |
|
2005 |
(MenuItem |
|
2006 |
activeHelpKey: colorMap8 |
|
2007 |
label: '8-Plane' |
|
2008 |
itemValue: colorMapMode: |
|
2009 |
translateLabel: true |
|
2010 |
argument: depth8 |
|
2011 |
choice: colorMapMode |
|
2012 |
choiceValue: depth8 |
|
1649 | 2013 |
) |
1882 | 2014 |
(MenuItem |
2015 |
activeHelpKey: colorMap4 |
|
2016 |
label: '4-Plane' |
|
2017 |
itemValue: colorMapMode: |
|
2018 |
translateLabel: true |
|
2019 |
argument: depth4 |
|
2020 |
choice: colorMapMode |
|
2021 |
choiceValue: depth4 |
|
1649 | 2022 |
) |
1882 | 2023 |
(MenuItem |
2024 |
activeHelpKey: colorMap2 |
|
2025 |
label: '2-Plane' |
|
2026 |
itemValue: colorMapMode: |
|
2027 |
translateLabel: true |
|
2028 |
argument: depth2 |
|
2029 |
choice: colorMapMode |
|
2030 |
choiceValue: depth2 |
|
1649 | 2031 |
) |
1882 | 2032 |
(MenuItem |
2033 |
activeHelpKey: colorMap1 |
|
2034 |
label: '1-Plane' |
|
2035 |
itemValue: colorMapMode: |
|
2036 |
translateLabel: true |
|
2037 |
argument: depth1 |
|
2038 |
choice: colorMapMode |
|
2039 |
choiceValue: depth1 |
|
1649 | 2040 |
) |
1882 | 2041 |
(MenuItem |
2042 |
label: '-' |
|
1649 | 2043 |
) |
1882 | 2044 |
(MenuItem |
2045 |
activeHelpKey: colorMap8M |
|
2046 |
label: '8-Plane + Mask' |
|
2047 |
itemValue: colorMapMode: |
|
2048 |
translateLabel: true |
|
2049 |
argument: masked8 |
|
2050 |
choice: colorMapMode |
|
2051 |
choiceValue: masked8 |
|
1649 | 2052 |
) |
1882 | 2053 |
(MenuItem |
2054 |
activeHelpKey: colorMap4M |
|
2055 |
label: '4-Plane + Mask' |
|
2056 |
itemValue: colorMapMode: |
|
2057 |
translateLabel: true |
|
2058 |
argument: masked4 |
|
2059 |
choice: colorMapMode |
|
2060 |
choiceValue: masked4 |
|
1649 | 2061 |
) |
1882 | 2062 |
(MenuItem |
2063 |
activeHelpKey: colorMap2M |
|
2064 |
label: '2-Plane + Mask' |
|
2065 |
itemValue: colorMapMode: |
|
2066 |
translateLabel: true |
|
2067 |
argument: masked2 |
|
2068 |
choice: colorMapMode |
|
2069 |
choiceValue: masked2 |
|
1649 | 2070 |
) |
1882 | 2071 |
(MenuItem |
2072 |
activeHelpKey: colorMap1M |
|
2073 |
label: '1-Plane + Mask' |
|
2074 |
itemValue: colorMapMode: |
|
2075 |
translateLabel: true |
|
2076 |
argument: masked1 |
|
2077 |
choice: colorMapMode |
|
2078 |
choiceValue: masked1 |
|
1649 | 2079 |
) |
2080 |
) |
|
2081 |
nil |
|
2082 |
nil |
|
2083 |
) |
|
1124 | 2084 |
) |
1882 | 2085 |
(MenuItem |
2086 |
label: 'Colors' |
|
2087 |
translateLabel: true |
|
2088 |
submenu: |
|
2089 |
(Menu |
|
2090 |
( |
|
2091 |
(MenuItem |
|
2092 |
activeHelpKey: compressColormap |
|
2093 |
enabled: hasColormap |
|
2094 |
label: 'Compress Colormap' |
|
2095 |
itemValue: compressColorMap |
|
2096 |
translateLabel: true |
|
1649 | 2097 |
) |
1882 | 2098 |
(MenuItem |
2099 |
enabled: hasColormap |
|
2100 |
label: 'Sort Colormap' |
|
2101 |
itemValue: sortColorMap |
|
2102 |
translateLabel: true |
|
1649 | 2103 |
) |
1882 | 2104 |
(MenuItem |
2105 |
label: 'Reduce Number of Colors...' |
|
2106 |
itemValue: reduceNumberOfColors |
|
2107 |
translateLabel: true |
|
1649 | 2108 |
) |
2109 |
) |
|
2110 |
nil |
|
2111 |
nil |
|
2112 |
) |
|
1124 | 2113 |
) |
1882 | 2114 |
(MenuItem |
2115 |
label: 'Process' |
|
2116 |
translateLabel: true |
|
2117 |
submenu: |
|
2118 |
(Menu |
|
2119 |
( |
|
2120 |
(MenuItem |
|
2121 |
label: 'Make GrayScale' |
|
2122 |
itemValue: makeGrayScale |
|
2123 |
translateLabel: true |
|
1649 | 2124 |
) |
1882 | 2125 |
(MenuItem |
2126 |
label: 'Make Brighter' |
|
2127 |
itemValue: makeBrighter |
|
2128 |
translateLabel: true |
|
1649 | 2129 |
) |
1882 | 2130 |
(MenuItem |
2131 |
label: 'Make Darker' |
|
2132 |
itemValue: makeDarker |
|
2133 |
translateLabel: true |
|
1649 | 2134 |
) |
1882 | 2135 |
(MenuItem |
2136 |
label: 'Make Inverse' |
|
2137 |
itemValue: makeInverse |
|
2138 |
translateLabel: true |
|
1649 | 2139 |
) |
1882 | 2140 |
(MenuItem |
2141 |
label: '-' |
|
1649 | 2142 |
) |
1882 | 2143 |
(MenuItem |
2144 |
label: 'Change HLS...' |
|
2145 |
itemValue: changeHLS |
|
2146 |
translateLabel: true |
|
1649 | 2147 |
) |
2148 |
) |
|
2149 |
nil |
|
2150 |
nil |
|
2151 |
) |
|
1436 | 2152 |
) |
1882 | 2153 |
(MenuItem |
2154 |
label: 'Mask' |
|
2155 |
translateLabel: true |
|
2156 |
submenu: |
|
2157 |
(Menu |
|
2158 |
( |
|
2159 |
(MenuItem |
|
2160 |
activeHelpKey: copyMask |
|
2161 |
enabled: hasMask |
|
2162 |
label: 'Copy Mask' |
|
2163 |
itemValue: copyMask |
|
2164 |
translateLabel: true |
|
1649 | 2165 |
) |
1882 | 2166 |
(MenuItem |
2167 |
activeHelpKey: pasteMask |
|
2168 |
enabled: hasMask |
|
2169 |
label: 'Paste Mask' |
|
2170 |
itemValue: pasteMask |
|
2171 |
translateLabel: true |
|
1649 | 2172 |
) |
1882 | 2173 |
(MenuItem |
2174 |
label: 'Clear Masked Pixels' |
|
2175 |
itemValue: clearMaskedPixels |
|
2176 |
translateLabel: true |
|
1649 | 2177 |
) |
2178 |
) |
|
2179 |
nil |
|
2180 |
nil |
|
2181 |
) |
|
1598 | 2182 |
) |
1124 | 2183 |
) |
2184 |
nil |
|
2185 |
nil |
|
756 | 2186 |
) |
1124 | 2187 |
) |
1882 | 2188 |
(MenuItem |
2189 |
label: 'Settings' |
|
2190 |
translateLabel: true |
|
2191 |
submenu: |
|
2192 |
(Menu |
|
2193 |
( |
|
2194 |
(MenuItem |
|
2195 |
activeHelpKey: settingsGridMagnification |
|
2196 |
label: 'Grid Magnification Limit...' |
|
2197 |
itemValue: doChangeGridMagnification |
|
2198 |
translateLabel: true |
|
1124 | 2199 |
) |
2200 |
) |
|
2201 |
nil |
|
2202 |
nil |
|
400 | 2203 |
) |
1124 | 2204 |
) |
1882 | 2205 |
(MenuItem |
2206 |
label: 'History' |
|
2207 |
translateLabel: true |
|
2208 |
submenuChannel: menuHistory |
|
1124 | 2209 |
) |
1882 | 2210 |
(MenuItem |
2211 |
label: 'Help' |
|
2212 |
translateLabel: true |
|
2213 |
startGroup: right |
|
2214 |
submenuChannel: menuHelp |
|
1124 | 2215 |
) |
2216 |
) |
|
2217 |
nil |
|
2218 |
nil |
|
400 | 2219 |
) |
2220 |
! |
|
2221 |
||
679 | 2222 |
menuMouseButtonColors |
737 | 2223 |
"This resource specification was automatically generated |
2224 |
by the MenuEditor of ST/X." |
|
679 | 2225 |
|
737 | 2226 |
"Do not manually edit this!! If it is corrupted, |
2227 |
the MenuEditor may not be able to read the specification." |
|
679 | 2228 |
|
2229 |
" |
|
2230 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
2231 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
2232 |
" |
|
2233 |
||
2234 |
<resource: #menu> |
|
2235 |
||
2236 |
^ |
|
2237 |
||
2238 |
#(#Menu |
|
2239 |
||
2240 |
#( |
|
2241 |
#(#MenuItem |
|
2242 |
#label: 'Left Mouse Button' |
|
2243 |
#nameKey: #leftMouseKeyButton |
|
2244 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 2245 |
#enabled: #imageIsLoaded |
679 | 2246 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 2247 |
#choice: #mouseKeyColorMode |
2248 |
#choiceValue: 1 |
|
679 | 2249 |
) |
2250 |
#(#MenuItem |
|
2251 |
#label: 'Right Mouse Button' |
|
2252 |
#nameKey: #rightMouseKeyButton |
|
2253 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 2254 |
#enabled: #imageIsLoaded |
679 | 2255 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 2256 |
#choice: #mouseKeyColorMode |
2257 |
#choiceValue: 2 |
|
679 | 2258 |
) |
2259 |
) nil |
|
2260 |
nil |
|
2261 |
) |
|
2262 |
! |
|
2263 |
||
400 | 2264 |
menuToolbar |
737 | 2265 |
"This resource specification was automatically generated |
2266 |
by the MenuEditor of ST/X." |
|
400 | 2267 |
|
737 | 2268 |
"Do not manually edit this!! If it is corrupted, |
2269 |
the MenuEditor may not be able to read the specification." |
|
400 | 2270 |
|
2271 |
" |
|
2272 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
2273 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
2274 |
" |
|
2275 |
||
2276 |
<resource: #menu> |
|
2277 |
||
1196 | 2278 |
^ |
1820 | 2279 |
#(Menu |
2280 |
( |
|
2281 |
(MenuItem |
|
2282 |
activeHelpKey: fileNewImage |
|
2283 |
label: 'newImage' |
|
2284 |
itemValue: doNewImage |
|
2285 |
translateLabel: true |
|
2286 |
isButton: true |
|
1883 | 2287 |
labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon) |
1196 | 2288 |
) |
1820 | 2289 |
(MenuItem |
2290 |
activeHelpKey: fileLoadFromFile |
|
2291 |
label: 'loadFromFile' |
|
2292 |
itemValue: doLoadFromFile |
|
2293 |
translateLabel: true |
|
2294 |
isButton: true |
|
1884 | 2295 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon) |
1820 | 2296 |
) |
2297 |
(MenuItem |
|
2298 |
activeHelpKey: fileSaveAs |
|
2299 |
enabled: imageIsLoaded |
|
2300 |
label: 'saveAsFile' |
|
2301 |
itemValue: doSaveImageFileAs |
|
2302 |
translateLabel: true |
|
2303 |
isButton: true |
|
1885 | 2304 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon) |
1820 | 2305 |
) |
2306 |
(MenuItem |
|
2307 |
label: '' |
|
1196 | 2308 |
) |
1820 | 2309 |
(MenuItem |
2310 |
activeHelpKey: fileLoadFromClass |
|
2311 |
label: 'loadFromClass' |
|
2312 |
itemValue: doLoadFromClass |
|
2313 |
translateLabel: true |
|
2314 |
isButton: true |
|
1883 | 2315 |
submenuChannel: menuHistory |
1885 | 2316 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromMethodIcon) |
1820 | 2317 |
keepLinkedMenu: true |
1748
a62052c6ee71
toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents:
1741
diff
changeset
|
2318 |
) |
1820 | 2319 |
(MenuItem |
2320 |
activeHelpKey: fileSaveMethodAs |
|
2321 |
enabled: imageIsLoaded |
|
2322 |
label: 'saveAsMethod' |
|
2323 |
itemValue: doSaveMethodAs |
|
2324 |
translateLabel: true |
|
2325 |
isButton: true |
|
1889 | 2326 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodAsIcon) |
1820 | 2327 |
) |
2328 |
(MenuItem |
|
2329 |
label: '' |
|
1196 | 2330 |
) |
1820 | 2331 |
(MenuItem |
2332 |
label: '' |
|
1196 | 2333 |
) |
1820 | 2334 |
(MenuItem |
2335 |
activeHelpKey: editUndo |
|
2336 |
enabled: valueOfCanUndo |
|
2337 |
label: 'Undo' |
|
2338 |
itemValue: doUndo |
|
2339 |
translateLabel: true |
|
2340 |
isButton: true |
|
1883 | 2341 |
labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
1196 | 2342 |
) |
1637 | 2343 |
) |
2344 |
nil |
|
2345 |
nil |
|
2346 |
) |
|
2347 |
! |
|
2348 |
||
2349 |
modeMenu |
|
2350 |
"This resource specification was automatically generated |
|
2351 |
by the MenuEditor of ST/X." |
|
2352 |
||
2353 |
"Do not manually edit this!! If it is corrupted, |
|
2354 |
the MenuEditor may not be able to read the specification." |
|
2355 |
||
2356 |
" |
|
2357 |
MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu |
|
2358 |
(Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp |
|
2359 |
" |
|
2360 |
||
2361 |
<resource: #menu> |
|
2362 |
||
2363 |
^ |
|
2364 |
#(#Menu |
|
2365 |
#( |
|
1196 | 2366 |
#(#MenuItem |
2367 |
#activeHelpKey: #drawModePoint |
|
2368 |
#enabled: #imageIsLoaded |
|
1637 | 2369 |
#label: 'Point' |
2370 |
#translateLabel: true |
|
1196 | 2371 |
#choice: #editMode |
2372 |
#choiceValue: #point |
|
2373 |
) |
|
2374 |
#(#MenuItem |
|
2375 |
#activeHelpKey: #drawModeBox |
|
2376 |
#enabled: #imageIsLoaded |
|
1637 | 2377 |
#label: 'Rect' |
2378 |
#translateLabel: true |
|
1196 | 2379 |
#choice: #editMode |
2380 |
#choiceValue: #box |
|
2381 |
) |
|
2382 |
#(#MenuItem |
|
2383 |
#activeHelpKey: #drawModeFilledBox |
|
2384 |
#enabled: #imageIsLoaded |
|
1656 | 2385 |
#label: 'Filled Rectangle' |
1637 | 2386 |
#translateLabel: true |
1196 | 2387 |
#choice: #editMode |
2388 |
#choiceValue: #filledBox |
|
2389 |
) |
|
2390 |
#(#MenuItem |
|
2391 |
#activeHelpKey: #drawModeFill |
|
2392 |
#enabled: #imageIsLoaded |
|
1637 | 2393 |
#label: 'Fill' |
2394 |
#translateLabel: true |
|
1196 | 2395 |
#choice: #editMode |
2396 |
#choiceValue: #fill |
|
2397 |
) |
|
2398 |
#(#MenuItem |
|
2399 |
#activeHelpKey: #drawModeCopy |
|
2400 |
#enabled: #imageIsLoaded |
|
1637 | 2401 |
#label: 'Copy' |
2402 |
#translateLabel: true |
|
1196 | 2403 |
#choice: #editMode |
2404 |
#choiceValue: #copy |
|
2405 |
) |
|
2406 |
#(#MenuItem |
|
2407 |
#activeHelpKey: #drawModePaste |
|
2408 |
#enabled: #imageIsLoaded |
|
1637 | 2409 |
#label: 'Paste' |
2410 |
#translateLabel: true |
|
1196 | 2411 |
#choice: #editMode |
2412 |
#choiceValue: #paste |
|
2413 |
) |
|
2414 |
#(#MenuItem |
|
2415 |
#activeHelpKey: #drawModePasteUnder |
|
2416 |
#enabled: #imageIsLoaded |
|
1637 | 2417 |
#label: 'Paste Under' |
2418 |
#translateLabel: true |
|
1196 | 2419 |
#choice: #editMode |
2420 |
#choiceValue: #pasteUnder |
|
2421 |
) |
|
1411 | 2422 |
#(#MenuItem |
1579 | 2423 |
#activeHelpKey: #drawModePasteWithMask |
2424 |
#enabled: #imageIsLoaded |
|
1656 | 2425 |
#label: 'Paste with Mask' |
1637 | 2426 |
#translateLabel: true |
1579 | 2427 |
#choice: #editMode |
2428 |
#choiceValue: #pasteWithMask |
|
2429 |
) |
|
2430 |
#(#MenuItem |
|
1411 | 2431 |
#activeHelpKey: #drawModeSpecial |
2432 |
#enabled: #imageIsLoaded |
|
1637 | 2433 |
#label: 'Special' |
2434 |
#translateLabel: true |
|
1411 | 2435 |
#choice: #editMode |
2436 |
#choiceValue: #specialOperation |
|
2437 |
) |
|
1196 | 2438 |
) |
2439 |
nil |
|
2440 |
nil |
|
400 | 2441 |
) |
1558 | 2442 |
! |
2443 |
||
2444 |
previewMenu |
|
2445 |
"This resource specification was automatically generated |
|
2446 |
by the MenuEditor of ST/X." |
|
2447 |
||
2448 |
"Do not manually edit this!! If it is corrupted, |
|
2449 |
the MenuEditor may not be able to read the specification." |
|
2450 |
||
2451 |
" |
|
2452 |
MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu |
|
2453 |
(Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp |
|
2454 |
" |
|
2455 |
||
2456 |
<resource: #menu> |
|
2457 |
||
2458 |
^ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2459 |
#(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2460 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2461 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2462 |
label: 'TileMode' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2463 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2464 |
indication: tileModeHolder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2465 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2466 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2467 |
label: '-' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2468 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2469 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2470 |
label: 'Background Color' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2471 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2472 |
submenu: |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2473 |
(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2474 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2475 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2476 |
label: 'Gray' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2477 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2478 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2479 |
choiceValue: nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2480 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2481 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2482 |
label: 'Black' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2483 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2484 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2485 |
choiceValue: black |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2486 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2487 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2488 |
label: 'White' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2489 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2490 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2491 |
choiceValue: white |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2492 |
) |
1774 | 2493 |
(MenuItem |
2494 |
label: '-' |
|
2495 |
) |
|
2496 |
(MenuItem |
|
2497 |
label: 'Red' |
|
2498 |
translateLabel: true |
|
2499 |
choice: previewBackgroundColor |
|
2500 |
choiceValue: red |
|
2501 |
) |
|
2502 |
(MenuItem |
|
2503 |
label: 'Green' |
|
2504 |
translateLabel: true |
|
2505 |
choice: previewBackgroundColor |
|
2506 |
choiceValue: green |
|
2507 |
) |
|
2508 |
(MenuItem |
|
2509 |
label: 'Blue' |
|
2510 |
translateLabel: true |
|
2511 |
choice: previewBackgroundColor |
|
2512 |
choiceValue: blue |
|
2513 |
) |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2514 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2515 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2516 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2517 |
) |
1558 | 2518 |
) |
2519 |
) |
|
2520 |
nil |
|
2521 |
nil |
|
2522 |
) |
|
1637 | 2523 |
! |
2524 |
||
2525 |
toolsMenuToolbar |
|
2526 |
"This resource specification was automatically generated |
|
2527 |
by the MenuEditor of ST/X." |
|
2528 |
||
2529 |
"Do not manually edit this!! If it is corrupted, |
|
2530 |
the MenuEditor may not be able to read the specification." |
|
2531 |
||
2532 |
" |
|
2533 |
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar |
|
2534 |
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp |
|
2535 |
" |
|
2536 |
||
2537 |
<resource: #menu> |
|
2538 |
||
2539 |
^ |
|
2540 |
#(#Menu |
|
2541 |
#( |
|
2542 |
#(#MenuItem |
|
2543 |
#activeHelpKey: #drawModePoint |
|
2544 |
#enabled: #imageIsLoaded |
|
2545 |
#label: 'Point' |
|
2546 |
#translateLabel: true |
|
2547 |
#isButton: true |
|
2548 |
#labelImage: #(#ResourceRetriever #ImageEditor #pointIcon) |
|
2549 |
#choice: #editMode |
|
2550 |
#choiceValue: #point |
|
2551 |
) |
|
2552 |
#(#MenuItem |
|
2553 |
#activeHelpKey: #drawModeBox |
|
2554 |
#enabled: #imageIsLoaded |
|
2555 |
#label: 'Rect' |
|
2556 |
#translateLabel: true |
|
2557 |
#isButton: true |
|
2558 |
#labelImage: #(#ResourceRetriever #ImageEditor #rectIcon) |
|
2559 |
#choice: #editMode |
|
2560 |
#choiceValue: #box |
|
2561 |
) |
|
2562 |
#(#MenuItem |
|
2563 |
#activeHelpKey: #drawModeFilledBox |
|
2564 |
#enabled: #imageIsLoaded |
|
2565 |
#label: 'FillRect' |
|
2566 |
#translateLabel: true |
|
2567 |
#isButton: true |
|
2568 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillRectIcon) |
|
2569 |
#choice: #editMode |
|
2570 |
#choiceValue: #filledBox |
|
2571 |
) |
|
2572 |
#(#MenuItem |
|
2573 |
#activeHelpKey: #drawModeFill |
|
2574 |
#enabled: #imageIsLoaded |
|
2575 |
#label: 'Fill' |
|
2576 |
#translateLabel: true |
|
2577 |
#isButton: true |
|
2578 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillIcon) |
|
2579 |
#choice: #editMode |
|
2580 |
#choiceValue: #fill |
|
2581 |
) |
|
2582 |
#(#MenuItem |
|
2583 |
#activeHelpKey: #drawModeCopy |
|
2584 |
#enabled: #imageIsLoaded |
|
2585 |
#label: 'Copy' |
|
2586 |
#translateLabel: true |
|
2587 |
#isButton: true |
|
2588 |
#labelImage: #(#ResourceRetriever #ImageEditor #copyIcon) |
|
2589 |
#choice: #editMode |
|
2590 |
#choiceValue: #copy |
|
2591 |
) |
|
2592 |
#(#MenuItem |
|
2593 |
#activeHelpKey: #drawModePaste |
|
2594 |
#enabled: #imageIsLoaded |
|
2595 |
#label: 'Paste' |
|
2596 |
#translateLabel: true |
|
2597 |
#isButton: true |
|
2598 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteIcon) |
|
2599 |
#choice: #editMode |
|
2600 |
#choiceValue: #paste |
|
2601 |
) |
|
2602 |
#(#MenuItem |
|
2603 |
#activeHelpKey: #drawModePasteUnder |
|
2604 |
#enabled: #imageIsLoaded |
|
2605 |
#label: 'Paste Under' |
|
2606 |
#translateLabel: true |
|
2607 |
#isButton: true |
|
2608 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteUnderIcon) |
|
2609 |
#choice: #editMode |
|
2610 |
#choiceValue: #pasteUnder |
|
2611 |
) |
|
2612 |
#(#MenuItem |
|
2613 |
#activeHelpKey: #drawModePasteWithMask |
|
2614 |
#enabled: #imageIsLoaded |
|
2615 |
#label: 'Paste With Mask' |
|
2616 |
#translateLabel: true |
|
2617 |
#isButton: true |
|
2618 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteWithMaskIcon) |
|
2619 |
#choice: #editMode |
|
2620 |
#choiceValue: #pasteWithMask |
|
2621 |
) |
|
2622 |
#(#MenuItem |
|
2623 |
#activeHelpKey: #drawModeSpecial |
|
2624 |
#enabled: #imageIsLoaded |
|
2625 |
#label: 'Special' |
|
2626 |
#translateLabel: true |
|
2627 |
#isButton: true |
|
2628 |
#labelImage: #(#ResourceRetriever #ImageEditor #specialIcon) |
|
2629 |
#choice: #editMode |
|
2630 |
#choiceValue: #specialOperation |
|
2631 |
) |
|
2632 |
) |
|
2633 |
nil |
|
2634 |
nil |
|
2635 |
) |
|
400 | 2636 |
! ! |
2637 |
||
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2638 |
!ImageEditor class methodsFor:'tableColumns specs'! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2639 |
|
1900 | 2640 |
colorTableColumns |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2641 |
"This resource specification was automatically generated |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2642 |
by the DataSetBuilder of ST/X." |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2643 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2644 |
"Do not manually edit this!! If it is corrupted, |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2645 |
the DataSetBuilder may not be able to read the specification." |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2646 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2647 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2648 |
DataSetBuilder new openOnClass:ImageEditor andSelector:#tableColumns |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2649 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2650 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2651 |
<resource: #tableColumns> |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2652 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2653 |
^#( |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2654 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2655 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2656 |
rendererType: rowSelector |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2657 |
backgroundSelector: theColorItSelf: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2658 |
selectedBackgroundSelector: theColorItSelf: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2659 |
isResizeable: false |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2660 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2661 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2662 |
label: 'R' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2663 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2664 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2665 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2666 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2667 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2668 |
model: redFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2669 |
writeSelector: redAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2670 |
selectSelector: canSelectRedInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2671 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2672 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2673 |
label: 'G' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2674 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2675 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2676 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2677 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2678 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2679 |
model: greenFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2680 |
writeSelector: greenAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2681 |
selectSelector: canSelectGreenInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2682 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2683 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2684 |
label: 'B' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2685 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2686 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2687 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2688 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2689 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2690 |
model: blueFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2691 |
writeSelector: blueAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2692 |
selectSelector: canSelectBlueInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2693 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2694 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2695 |
! ! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2696 |
|
400 | 2697 |
!ImageEditor methodsFor:'accessing'! |
2698 |
||
2699 |
image |
|
767 | 2700 |
"returns the current editing image" |
400 | 2701 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2702 |
^ imageEditView image |
400 | 2703 |
! |
2704 |
||
2705 |
postOpenAction: anAction |
|
767 | 2706 |
"sets an action which is evaluated after opening" |
400 | 2707 |
|
2708 |
postOpenAction := anAction |
|
1381 | 2709 |
! |
2710 |
||
2711 |
resourceClass:aClass |
|
2712 |
imageEditView resourceClass:aClass |
|
400 | 2713 |
! ! |
2714 |
||
1398 | 2715 |
!ImageEditor methodsFor:'accessing-views'! |
400 | 2716 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2717 |
colorDataSetView |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2718 |
"returns the view of the colormap" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2719 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2720 |
^(self componentAt: #colorDataSetView) |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2721 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2722 |
"Created: / 26.7.1998 / 12:02:14 / cg" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2723 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2724 |
|
487 | 2725 |
coordLabel |
767 | 2726 |
"returns the view the coord label" |
487 | 2727 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2728 |
^self componentAt: #coordLabel |
487 | 2729 |
! |
2730 |
||
400 | 2731 |
imageEditView |
911 | 2732 |
"returns the view of the image" |
400 | 2733 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2734 |
imageEditView isNil ifTrue:[ |
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2735 |
imageEditView := (self componentAt: #imageEditView) scrolledView. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2736 |
imageEditView addDependent:self. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2737 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2738 |
^ imageEditView |
1345 | 2739 |
|
2740 |
"Modified: / 10.2.2000 / 23:19:20 / cg" |
|
400 | 2741 |
! |
2742 |
||
2743 |
imagePreView |
|
767 | 2744 |
"returns the preview of the image" |
400 | 2745 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2746 |
^ (self componentAt: #imagePreView) subViews first |
475 | 2747 |
! ! |
2748 |
||
400 | 2749 |
!ImageEditor methodsFor:'aspects'! |
2750 |
||
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2751 |
activityInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2752 |
^ self valueOfInfoLabel |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2753 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2754 |
"Modified: / 29.7.1998 / 18:49:03 / cg" |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2755 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2756 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2757 |
colorColumnAdaptor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2758 |
^ self |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2759 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2760 |
"Created: / 26.7.1998 / 12:17:03 / cg" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2761 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2762 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2763 |
hasClassAndSelectorDefined |
1054 | 2764 |
^ [ |
2765 |
|clsName| |
|
2766 |
||
2767 |
(clsName := imageEditView resourceClass) size > 0 |
|
2768 |
and:[(Smalltalk at:clsName ifAbsent:nil) notNil |
|
2769 |
and:[imageEditView resourceSelector notNil]] |
|
2770 |
] |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2771 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2772 |
"Created: / 31.7.1998 / 02:02:54 / cg" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2773 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2774 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2775 |
hasClassDefined |
1054 | 2776 |
^ [ |
2777 |
|clsName| |
|
2778 |
||
1443 | 2779 |
(clsName := imageEditView resourceClass) size > 0 |
1054 | 2780 |
and:[(Smalltalk at:clsName ifAbsent:nil) notNil] |
2781 |
] |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2782 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2783 |
"Created: / 31.7.1998 / 02:02:22 / cg" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2784 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2785 |
|
1008 | 2786 |
hasColormap |
2787 |
^ [self image notNil and:[self image colorMap notNil]] |
|
2788 |
||
2789 |
"Created: / 30.9.1998 / 23:53:55 / cg" |
|
2790 |
! |
|
2791 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2792 |
imageHasNextImage |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2793 |
"returns whether an image is loaded as value holder" |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2794 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2795 |
^ [self image notNil |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2796 |
and:[self image imageSequence notNil]] |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2797 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2798 |
"Created: / 31.7.1998 / 02:04:18 / cg" |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2799 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2800 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2801 |
imageInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2802 |
|holder| |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2803 |
(holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2804 |
builder aspectAt:#imageInfoHolder put:(holder := '' asValue). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2805 |
]. |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2806 |
^ holder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2807 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2808 |
"Modified: / 29.7.1998 / 18:32:08 / cg" |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2809 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2810 |
|
400 | 2811 |
imageIsLoaded |
767 | 2812 |
"returns whether an image is loaded as value holder" |
400 | 2813 |
|
2814 |
|holder| |
|
2815 |
(holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
2816 |
builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
2817 |
]. |
|
2818 |
^ holder |
|
2819 |
! |
|
2820 |
||
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2821 |
imageIsLoadedAndClassDefined |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2822 |
"returns whether an image is loaded as value holder" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2823 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2824 |
^ [self hasClassAndSelectorDefined value |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2825 |
and:[self imageIsLoaded value]] |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2826 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2827 |
"Created: / 31.7.1998 / 02:04:18 / cg" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2828 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2829 |
|
400 | 2830 |
listOfColors |
1896 | 2831 |
"returns the list of colors" |
2832 |
||
2833 |
|list| |
|
2834 |
||
2835 |
(list := builder bindingAt:#listOfColors) isNil ifTrue:[ |
|
2836 |
builder aspectAt:#listOfColors put:(list := List new). |
|
2837 |
list addDependent:self. |
|
400 | 2838 |
]. |
1896 | 2839 |
^ list |
400 | 2840 |
! |
2841 |
||
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2842 |
previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2843 |
|holder| |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2844 |
(holder := builder bindingAt:#previewBackgroundColor) isNil ifTrue:[ |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2845 |
builder aspectAt:#previewBackgroundColor put:(holder := nil asValue). |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2846 |
holder addDependent:self. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2847 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2848 |
^ holder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2849 |
! |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2850 |
|
400 | 2851 |
selectionOfColor |
1682 | 2852 |
"returns a valueHolder for the current selection of the edit color. |
2853 |
Here, an AspectAdaptor which accesses selectedColorIndex is returned." |
|
400 | 2854 |
|
2855 |
|holder| |
|
1682 | 2856 |
|
400 | 2857 |
(holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[ |
2858 |
builder aspectAt:#selectionOfColor put:( |
|
1682 | 2859 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ). |
400 | 2860 |
]. |
2861 |
^ holder |
|
2862 |
! |
|
2863 |
||
1558 | 2864 |
tileModeHolder |
2865 |
|holder| |
|
2866 |
(holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[ |
|
2867 |
builder aspectAt:#tileModeHolder put:(holder := false asValue). |
|
2868 |
holder addDependent:self. |
|
2869 |
]. |
|
2870 |
^ holder |
|
2871 |
! |
|
2872 |
||
400 | 2873 |
valueOfMagnification |
767 | 2874 |
"returns current magnification of the image as an AspectAdaptor" |
400 | 2875 |
|
2876 |
|holder| |
|
2877 |
(holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[ |
|
2878 |
builder aspectAt:#valueOfMagnification put:( |
|
2879 |
holder := AspectAdaptor new subject:self; forAspect:#magnification) |
|
2880 |
]. |
|
2881 |
^ holder |
|
2882 |
! ! |
|
2883 |
||
767 | 2884 |
!ImageEditor methodsFor:'change & update'! |
2885 |
||
2886 |
findColorMapMode |
|
899 | 2887 |
"finds the colorMapMode for a new image" |
767 | 2888 |
|
1904 | 2889 |
|image listOfColors colorMapModeKey drawColor1 drawColor2| |
1054 | 2890 |
|
2891 |
image := self image. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2892 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2893 |
image mask notNil ifTrue: [ |
1896 | 2894 |
colorMapModeKey := 'masked'. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2895 |
] ifFalse:[ |
1896 | 2896 |
colorMapModeKey := 'depth'. |
1054 | 2897 |
]. |
1896 | 2898 |
colorMapModeKey := colorMapModeKey , image depth printString. |
2899 |
colorMapMode setValue:colorMapModeKey. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2900 |
|
1904 | 2901 |
listOfColors := self listOfColors. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2902 |
image depth > 12 ifTrue:[ |
1904 | 2903 |
listOfColors removeAll. |
2904 |
image colorMap isEmptyOrNil ifTrue:[ |
|
2905 |
listOfColors add:Color black; add:Color white. |
|
2906 |
] ifFalse:[ |
|
2907 |
listOfColors addAll:(image colorMap). |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2908 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2909 |
] ifFalse:[ |
1904 | 2910 |
listOfColors isEmpty ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2911 |
self colorMapMode: colorMapMode value. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2912 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2913 |
]. |
767 | 2914 |
]. |
1904 | 2915 |
drawColor1 := listOfColors at:1. |
2916 |
drawColor2 := listOfColors at:2 ifAbsent:drawColor1. |
|
1054 | 2917 |
|
1900 | 2918 |
self hasMask ifTrue: [ |
1896 | 2919 |
(listOfColors contains: [:clr| clr = (Color colorId:0)]) |
2920 |
ifFalse:[ |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2921 |
listOfColors addFirst:(Color colorId:0). |
1904 | 2922 |
drawColor1 := listOfColors at:2. |
2923 |
drawColor2 := listOfColors at:3 ifAbsent:drawColor1. |
|
898 | 2924 |
] |
767 | 2925 |
]. |
1904 | 2926 |
|
2927 |
imageEditView drawingColors:(Array with: drawColor1 with: drawColor2). |
|
2928 |
||
1054 | 2929 |
self selectionOfColor |
1446 | 2930 |
setValue: 0; |
1904 | 2931 |
value: (listOfColors indexOf: imageEditView selectedColor). |
767 | 2932 |
! |
2933 |
||
942 | 2934 |
update:something with:aParameter from:changedObject |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2935 |
|clrIndex img clr| |
1436 | 2936 |
|
2937 |
img := self image. |
|
1558 | 2938 |
|
2939 |
changedObject == self tileModeHolder ifTrue:[ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2940 |
self imagePreView |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2941 |
tileMode:(changedObject value) tileOffset:(img extent); |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2942 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2943 |
invalidate. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2944 |
^ self |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2945 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2946 |
changedObject == self previewBackgroundColor ifTrue:[ |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2947 |
clr := changedObject value isNil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2948 |
ifTrue:[imageEditView viewBackground] |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2949 |
ifFalse:[Color perform:changedObject value]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2950 |
self imagePreView |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2951 |
viewBackground:clr; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2952 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2953 |
invalidate. |
1558 | 2954 |
^ self |
2955 |
]. |
|
2956 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2957 |
changedObject == self listOfColors ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2958 |
something == #at: ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2959 |
"/ colormap entry changed at aParameter |
960 | 2960 |
|
2961 |
clrIndex := aParameter. |
|
2962 |
(self hasMask) ifTrue:[ |
|
2963 |
clrIndex := clrIndex - 1. |
|
2964 |
]. |
|
2965 |
||
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
2966 |
(img colorMap ? drawingColormap) at:clrIndex put:(changedObject at:aParameter). |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2967 |
self colorMapChanged. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2968 |
^ self |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2969 |
]. |
1896 | 2970 |
^ self |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
2971 |
]. |
1124 | 2972 |
|
2973 |
changedObject == imageEditView undoImages ifTrue:[ |
|
2974 |
self valueOfCanUndo value:(changedObject notEmpty). |
|
2975 |
^ self. |
|
2976 |
]. |
|
2977 |
||
1345 | 2978 |
changedObject == imageEditView ifTrue:[ |
2979 |
something == #imageColors ifTrue:[ |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2980 |
self updateListOfColorsAndColormapMode. |
1345 | 2981 |
^ self. |
2982 |
]. |
|
2983 |
something == #image ifTrue:[ |
|
1436 | 2984 |
self imagePreView image:img. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2985 |
self updateListOfColorsAndColormapMode. |
1558 | 2986 |
self tileModeHolder value ifTrue:[ |
2987 |
self imagePreView tileMode:true tileOffset:(img extent). |
|
2988 |
]. |
|
1345 | 2989 |
^ self. |
2990 |
]. |
|
2991 |
something == #subImageIn ifTrue:[ |
|
1436 | 2992 |
self imagePreView image ~~ img ifTrue:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
2993 |
self error:'internal error' mayProceed:true. |
1406 | 2994 |
]. |
1558 | 2995 |
self tileModeHolder value ifTrue:[ |
2996 |
self imagePreView invalidate. |
|
2997 |
] ifFalse:[ |
|
2998 |
self imagePreView invalidate:aParameter. |
|
2999 |
]. |
|
1345 | 3000 |
^ self. |
3001 |
]. |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3002 |
something == #selectedColor ifTrue:[ |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3003 |
(aParameter isNil or:[aParameter = (Color colorId:0)]) ifTrue:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3004 |
"/ no color/mask */ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3005 |
"/ self halt. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3006 |
clrIndex := self hasMask ifTrue:[1] ifFalse:[0]. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3007 |
] ifFalse:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3008 |
clrIndex := self listOfColors indexOf:aParameter. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3009 |
]. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3010 |
self selectionOfColor value:clrIndex. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3011 |
^ self. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3012 |
]. |
1345 | 3013 |
^ self. |
3014 |
]. |
|
3015 |
||
1880 | 3016 |
changedObject == imageEditView modifiedHolder ifTrue:[ |
3017 |
"/ self halt:'to be implemented'. |
|
3018 |
^ self |
|
3019 |
]. |
|
3020 |
||
1345 | 3021 |
changedObject == imageEditView image ifTrue:[ |
1377 | 3022 |
self halt:'to be implemented'. |
1345 | 3023 |
^ self. |
3024 |
]. |
|
3025 |
||
942 | 3026 |
super update:something with:aParameter from:changedObject |
3027 |
||
1345 | 3028 |
"Modified: / 10.2.2000 / 23:36:49 / cg" |
942 | 3029 |
! |
3030 |
||
1900 | 3031 |
updateColorsFromImage:image |
3032 |
|colors| |
|
3033 |
||
1904 | 3034 |
colors := image colorMap. |
3035 |
colors isNil ifTrue:[ |
|
1906 | 3036 |
Error handle:[:ex | |
3037 |
colors := OrderedCollection new. |
|
3038 |
] do:[ |
|
3039 |
colors := image usedColors asSet. |
|
3040 |
] |
|
1900 | 3041 |
]. |
1904 | 3042 |
self listOfColors contents:(colors asOrderedCollection). |
1900 | 3043 |
! |
3044 |
||
1054 | 3045 |
updateForNoImage |
767 | 3046 |
"updates channels and view, if image is loaded" |
3047 |
||
3048 |
self imageIsLoaded value: false. |
|
3049 |
self listOfColors removeAll. |
|
3050 |
self imagePreView image: nil |
|
3051 |
||
3052 |
||
3053 |
||
3054 |
||
3055 |
! |
|
3056 |
||
3057 |
updateLabelsAndHistory |
|
3058 |
"updates labels and history, if something has changed" |
|
3059 |
||
1910 | 3060 |
|image| |
3061 |
||
3062 |
image := self image. |
|
3063 |
||
3064 |
self imageIsLoaded value: image notNil. |
|
3065 |
image isNil ifTrue: [^nil]. |
|
767 | 3066 |
|
3067 |
self updateInfoLabel. |
|
3068 |
||
911 | 3069 |
imageEditView resourceMessage asCollectionOfWords size = 2 |
3070 |
ifTrue: [self addToHistory: imageEditView resourceMessage -> #loadFromMessage:]. |
|
767 | 3071 |
|
1910 | 3072 |
image fileName notNil |
3073 |
ifTrue: [self addToHistory: image fileName -> #loadFromFile:]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3074 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3075 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3076 |
updateListOfColorsAndColormapMode |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3077 |
|colorMap image| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3078 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3079 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3080 |
colorMap := image colorMap. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3081 |
colorMap size <= 4096 ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3082 |
self listOfColors contents:colorMap. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3083 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3084 |
self listOfColors removeAll. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3085 |
colorMap isFixedPalette ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3086 |
image colorMap:nil. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3087 |
image photometric:#rgb. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3088 |
image samplesPerPixel:3. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3089 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3090 |
image bitsPerSample:(Array |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3091 |
with:(colorMap bitsRed) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3092 |
with:(colorMap bitsGreen) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3093 |
with:(colorMap bitsBlue)). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3094 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3095 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3096 |
self findColorMapMode. |
767 | 3097 |
! ! |
3098 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3099 |
!ImageEditor methodsFor:'data access'! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3100 |
|
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3101 |
atColor:aOldColor put:aNewColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3102 |
"a color changed to a new color |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3103 |
" |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3104 |
|index list| |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3105 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3106 |
list := self listOfColors. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3107 |
index := list identityIndexOf:aOldColor. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3108 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3109 |
index ~~ 0 ifTrue:[ |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3110 |
list at:index put:aNewColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3111 |
] ifFalse:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
3112 |
self error:'internal error' mayProceed:true. |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3113 |
list add:aNewColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3114 |
]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3115 |
! |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3116 |
|
942 | 3117 |
blueAtColor:aColor put:newBlue |
3118 |
"helper used to return a new row element, when blue is changed" |
|
3119 |
||
3120 |
|byte| |
|
3121 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3122 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3123 |
byte := newBlue clampBetween:0 and:255. |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3124 |
byte = aColor blueByte ifTrue:[^ self ]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3125 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3126 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3127 |
put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte). |
942 | 3128 |
! |
3129 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3130 |
blueFromColor:aColor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3131 |
"helper used to access a color as a row in the dataSet view" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3132 |
|
930 | 3133 |
aColor isNil ifTrue:[^ 'none']. |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3134 |
^ aColor blueByte ? 'mask' |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3135 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3136 |
"Created: / 26.7.1998 / 12:30:35 / cg" |
930 | 3137 |
"Modified: / 31.7.1998 / 01:11:18 / cg" |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3138 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3139 |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3140 |
canSelectBlueInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3141 |
^ aColor blueByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3142 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3143 |
"Created: / 7.8.1998 / 22:50:34 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3144 |
"Modified: / 7.8.1998 / 22:52:57 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3145 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3146 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3147 |
canSelectGreenInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3148 |
^ aColor greenByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3149 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3150 |
"Created: / 7.8.1998 / 22:50:22 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3151 |
"Modified: / 7.8.1998 / 22:52:46 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3152 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3153 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3154 |
canSelectRedInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3155 |
^ aColor redByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3156 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3157 |
"Created: / 7.8.1998 / 22:50:00 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3158 |
"Modified: / 7.8.1998 / 22:51:03 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3159 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3160 |
|
942 | 3161 |
greenAtColor:aColor put:newGreen |
3162 |
"helper used to return a new row element, when green is changed" |
|
3163 |
||
3164 |
|byte| |
|
3165 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3166 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3167 |
byte := newGreen clampBetween:0 and:255. |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3168 |
byte = aColor greenByte ifTrue:[^ self]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3169 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3170 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3171 |
put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)). |
942 | 3172 |
! |
3173 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3174 |
greenFromColor:aColor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3175 |
"helper used to access a color as a row in the dataSet view" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3176 |
|
930 | 3177 |
aColor isNil ifTrue:[^ 'none']. |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3178 |
^ aColor greenByte ? 'mask' |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3179 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3180 |
"Created: / 26.7.1998 / 12:30:29 / cg" |
930 | 3181 |
"Modified: / 31.7.1998 / 01:11:31 / cg" |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3182 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3183 |
|
942 | 3184 |
redAtColor:aColor put:newRed |
3185 |
"helper used to return a new row element, when red is changed" |
|
3186 |
||
3187 |
|byte| |
|
3188 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3189 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3190 |
byte := newRed clampBetween:0 and:255. |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3191 |
byte = aColor redByte ifTrue:[^ self]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3192 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3193 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3194 |
put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)). |
942 | 3195 |
! |
3196 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3197 |
redFromColor:aColor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3198 |
"helper used to access a color as a row in the dataSet view" |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3199 |
|
930 | 3200 |
aColor isNil ifTrue:[^ 'none']. |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3201 |
^ aColor redByte ? 'mask' |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3202 |
|
930 | 3203 |
"Modified: / 31.7.1998 / 01:11:35 / cg" |
1449
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3204 |
! |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3205 |
|
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3206 |
theColorItSelf:aColor |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3207 |
^ aColor |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3208 |
! ! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3209 |
|
672 | 3210 |
!ImageEditor methodsFor:'help'! |
3211 |
||
3212 |
defaultInfoLabel |
|
767 | 3213 |
"returns the default info label" |
672 | 3214 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3215 |
|resourceClass| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3216 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3217 |
resourceClass := imageEditView resourceClass. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3218 |
(resourceClass isSymbol and: [(Smalltalk at:resourceClass) isClass]) |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3219 |
ifTrue:[ |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3220 |
^ resourceClass, ' >> ', imageEditView resourceSelector |
672 | 3221 |
]. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3222 |
^ 'No class and selector defined.' |
674 | 3223 |
! |
3224 |
||
702 | 3225 |
openDocumentation |
767 | 3226 |
"opens the documentation file of the Image Editor" |
674 | 3227 |
|
763 | 3228 |
self openHTMLDocument: 'tools/uipainter/ImageEditor.html' |
3229 |
||
672 | 3230 |
! ! |
3231 |
||
767 | 3232 |
!ImageEditor methodsFor:'loading'! |
3233 |
||
3234 |
loadFromFile: aFileName |
|
3235 |
"loads an image from aFileName and sets up color map list and other info labels" |
|
3236 |
||
960 | 3237 |
|img| |
3238 |
||
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3239 |
self withCursor:Cursor wait do:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3240 |
(imageEditView loadFromFile: aFileName) notNil ifTrue:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3241 |
(img := self image) notNil ifTrue:[ |
1900 | 3242 |
self updateColorsFromImage:img. |
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3243 |
self findColorMapMode. |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3244 |
self updateLabelsAndHistory. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3245 |
img := img onDevice:device. |
1057 | 3246 |
imageEditView image:img. |
960 | 3247 |
] ifFalse:[ |
1054 | 3248 |
self updateForNoImage |
1057 | 3249 |
]. |
767 | 3250 |
] |
3251 |
] |
|
960 | 3252 |
|
1057 | 3253 |
"Modified: / 16.3.1999 / 21:44:26 / cg" |
767 | 3254 |
! |
3255 |
||
960 | 3256 |
loadFromImage:anImage |
767 | 3257 |
"loads an image from anImage and sets up color map list and other info labels" |
3258 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3259 |
|img| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3260 |
|
1057 | 3261 |
anImage notNil ifTrue:[ |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3262 |
img := anImage onDevice:device. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3263 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3264 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3265 |
imageEditView image:img. |
1799
e605f0af928a
clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents:
1796
diff
changeset
|
3266 |
imageEditView clearModified. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3267 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3268 |
img notNil ifTrue:[ |
1900 | 3269 |
self updateColorsFromImage:img. |
767 | 3270 |
self findColorMapMode. |
3271 |
self updateLabelsAndHistory. |
|
960 | 3272 |
] ifFalse:[ |
1054 | 3273 |
self updateForNoImage |
767 | 3274 |
] |
960 | 3275 |
|
1057 | 3276 |
"Modified: / 16.3.1999 / 21:43:56 / cg" |
767 | 3277 |
! |
3278 |
||
3279 |
loadFromMessage: aMessage |
|
3280 |
"loads an image by evaluating aMessage and sets up color map list and other info labels" |
|
3281 |
||
960 | 3282 |
|img| |
3283 |
||
3284 |
(imageEditView loadFromMessage: aMessage) notNil ifTrue:[ |
|
3285 |
(img := self image) notNil ifTrue:[ |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3286 |
img := img onDevice:device. |
1900 | 3287 |
self updateColorsFromImage:img. |
1904 | 3288 |
self findColorMapMode. |
767 | 3289 |
self updateLabelsAndHistory. |
960 | 3290 |
] ifFalse:[ |
1054 | 3291 |
self updateForNoImage |
767 | 3292 |
] |
3293 |
] |
|
960 | 3294 |
|
1057 | 3295 |
"Modified: / 16.3.1999 / 21:44:41 / cg" |
767 | 3296 |
! |
3297 |
||
3298 |
loadFromOrPrepareForMessage: aMessage |
|
3299 |
"loads an image by evaluating aMessage; |
|
3300 |
if no image could extract from aMessage; do set the class and the selector from |
|
3301 |
the aMessage for a saving at the end of editing" |
|
3302 |
||
1900 | 3303 |
(imageEditView loadFromMessage: aMessage) notNil ifTrue: [ |
3304 |
self updateColorsFromImage:self image. |
|
767 | 3305 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3306 |
] ifFalse: [ |
911 | 3307 |
imageEditView resourceMessage: aMessage. |
767 | 3308 |
]. |
3309 |
self updateLabelsAndHistory. |
|
1057 | 3310 |
|
3311 |
"Modified: / 16.3.1999 / 21:45:07 / cg" |
|
767 | 3312 |
! ! |
3313 |
||
400 | 3314 |
!ImageEditor methodsFor:'menu modes'! |
3315 |
||
975 | 3316 |
colorMapMode |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3317 |
"returns the colorMapMode" |
400 | 3318 |
|
975 | 3319 |
colorMapMode isNil ifTrue: [colorMapMode := '' asValue]. |
400 | 3320 |
|
975 | 3321 |
^colorMapMode |
400 | 3322 |
! |
3323 |
||
975 | 3324 |
editMode |
3325 |
"returns editMode" |
|
400 | 3326 |
|
1054 | 3327 |
editMode isNil ifTrue: [ |
975 | 3328 |
editMode := #point asValue. |
1329 | 3329 |
editMode onChangeEvaluate:[imageEditView editMode:(editMode value)] |
975 | 3330 |
]. |
3331 |
||
3332 |
^editMode |
|
400 | 3333 |
! |
3334 |
||
975 | 3335 |
mouseKeyColorMode |
3336 |
"returns mouseKeyColorMode" |
|
400 | 3337 |
|
1345 | 3338 |
mouseKeyColorMode isNil ifTrue:[ |
975 | 3339 |
mouseKeyColorMode := 1 asValue. |
1345 | 3340 |
mouseKeyColorMode onChangeEvaluate: [ |
3341 |
imageEditView mouseKeyColorMode:mouseKeyColorMode value. |
|
3342 |
self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor). |
|
3343 |
] |
|
956 | 3344 |
]. |
400 | 3345 |
|
975 | 3346 |
^mouseKeyColorMode |
1345 | 3347 |
|
3348 |
"Modified: / 10.2.2000 / 23:16:42 / cg" |
|
400 | 3349 |
! ! |
3350 |
||
1558 | 3351 |
!ImageEditor methodsFor:'private'! |
3352 |
||
1598 | 3353 |
updateImage |
3354 |
|img| |
|
3355 |
||
3356 |
img := imageEditView image. |
|
3357 |
imageEditView image:img. |
|
3358 |
self fetchImageData. |
|
3359 |
! |
|
3360 |
||
1558 | 3361 |
updateImagePreView |
3362 |
self tileModeHolder value ifTrue:[ |
|
3363 |
self imagePreView tileMode:true tileOffset:(self image extent). |
|
3364 |
] |
|
3365 |
! ! |
|
3366 |
||
535 | 3367 |
!ImageEditor methodsFor:'queries'! |
3368 |
||
960 | 3369 |
hasMask |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3370 |
^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask'] |
960 | 3371 |
|
3372 |
"Created: / 18.8.1998 / 17:17:38 / cg" |
|
3373 |
! |
|
3374 |
||
535 | 3375 |
preferredExtent |
767 | 3376 |
"returns the preferred extent" |
535 | 3377 |
|
3378 |
^super preferredExtent max: (Screen current width//3)@(Screen current height//3.5) |
|
3379 |
||
3380 |
||
3381 |
! ! |
|
3382 |
||
400 | 3383 |
!ImageEditor methodsFor:'selection'! |
3384 |
||
3385 |
magnification |
|
767 | 3386 |
"returns the magnification of the image" |
400 | 3387 |
|
911 | 3388 |
self imageEditView isNil ifTrue: [^1]. |
3389 |
^imageEditView magnification x |
|
400 | 3390 |
! |
3391 |
||
3392 |
magnification: aValue |
|
767 | 3393 |
"sets the magnification of the image" |
400 | 3394 |
|
905 | 3395 |
|magnification| |
3396 |
magnification := (aValue ? 1) asPoint. |
|
911 | 3397 |
(magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil]. |
3398 |
imageEditView magnification: magnification |
|
400 | 3399 |
! |
3400 |
||
3401 |
selectedColorIndex |
|
767 | 3402 |
"returns the index of the selected color" |
400 | 3403 |
|
3404 |
^selectedColorIndex |
|
3405 |
! |
|
3406 |
||
3407 |
selectedColorIndex: anIndex |
|
767 | 3408 |
"sets the index of the selected color" |
400 | 3409 |
|
1054 | 3410 |
|clr pixel| |
3411 |
||
3412 |
selectedColorIndex := anIndex. |
|
3413 |
clr := self listOfColors at:anIndex ifAbsent:nil. |
|
3414 |
clr isNil ifTrue:[^ self]. |
|
3415 |
||
1075 | 3416 |
pixel := anIndex - 1. |
1054 | 3417 |
(self listOfColors at:1) = Color noColor ifTrue:[ |
3418 |
anIndex == 1 ifTrue:[ |
|
3419 |
pixel := nil. "/ mask |
|
3420 |
] ifFalse:[ |
|
1075 | 3421 |
pixel := pixel - 1 |
1054 | 3422 |
] |
3423 |
]. |
|
3424 |
imageEditView selectedColorIndex:pixel. |
|
3425 |
imageEditView selectedColor:clr. |
|
400 | 3426 |
|
3427 |
! ! |
|
3428 |
||
1716 | 3429 |
!ImageEditor methodsFor:'startup & release'! |
400 | 3430 |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3431 |
closeDownViews |
1644 | 3432 |
builder notNil ifTrue:[ |
3433 |
DefaultRelativeSizes := |
|
3434 |
Array |
|
3435 |
with:(builder componentAt:#horizontalPanel) relativeCorners |
|
3436 |
with:(builder componentAt:#verticalPanel) relativeCorners. |
|
3437 |
]. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3438 |
super closeDownViews |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3439 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3440 |
|
400 | 3441 |
closeRequest |
767 | 3442 |
"close request" |
400 | 3443 |
|
911 | 3444 |
imageEditView checkModified ifTrue:[super closeRequest] |
400 | 3445 |
|
3446 |
! |
|
3447 |
||
3448 |
open |
|
767 | 3449 |
"after opening, sets the masterApplication of the imageEditView to self" |
400 | 3450 |
|
3451 |
super open. |
|
444 | 3452 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3453 |
imageEditView := (self componentAt: #imageEditView) subViews first. |
400 | 3454 |
! |
3455 |
||
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3456 |
postBuildWith:aBuilder |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3457 |
super postBuildWith:aBuilder. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3458 |
|
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3459 |
DefaultRelativeSizes notNil ifTrue:[ |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3460 |
(aBuilder componentAt:#horizontalPanel) relativeCorners:DefaultRelativeSizes first. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3461 |
(aBuilder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3462 |
]. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3463 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3464 |
|
400 | 3465 |
postOpenWith:aBuilder |
767 | 3466 |
"after opening, sets the masterApplication of the imageEditView to self; |
3467 |
evaluate the postOpenAction" |
|
400 | 3468 |
|
1124 | 3469 |
imageEditView undoImages addDependent:self. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3470 |
imageEditView imageInfoHolder:(self imageInfoHolder). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3471 |
imageEditView activityInfoHolder:(self activityInfoHolder). |
1345 | 3472 |
imageEditView clickInfoCallBack:[:button :point | |
3473 |
|mouseButtonColorToolBar| |
|
3474 |
||
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3475 |
mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar. |
1345 | 3476 |
(mouseButtonColorToolBar itemAt:button) toggleIndication. |
3477 |
mouseButtonColorToolBar do: [:i| i updateIndicators]. |
|
3478 |
]. |
|
3479 |
imageEditView addDependent:self. |
|
1880 | 3480 |
imageEditView modifiedHolder addDependent:self. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3481 |
|
400 | 3482 |
postOpenAction notNil ifTrue: [postOpenAction value]. |
3483 |
||
1250 | 3484 |
super postOpenWith:aBuilder. |
3485 |
||
3486 |
aBuilder keyboardProcessor menuBar:nil. |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3487 |
|
1345 | 3488 |
"Modified: / 10.2.2000 / 23:17:43 / cg" |
400 | 3489 |
! ! |
3490 |
||
1715 | 3491 |
!ImageEditor methodsFor:'user actions-colormap'! |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3492 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3493 |
addColorToColormap |
1682 | 3494 |
self addColorToColormap:(Color black) |
3495 |
! |
|
3496 |
||
3497 |
addColorToColormap:newColor |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3498 |
|depth img cMap newColorMap newImage oldCListSize newMode listOfColors| |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3499 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3500 |
img := self image. |
1499
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3501 |
img isNil ifTrue:[ |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3502 |
self warn:'No Image.'. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3503 |
^ self |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3504 |
]. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3505 |
|
1054 | 3506 |
depth := img depth. |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3507 |
cMap := img colorMap. |
1054 | 3508 |
cMap isNil ifTrue:[ |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3509 |
drawingColormap isNil ifTrue:[ |
1916 | 3510 |
self information:(resources stringWithCRs:'Image has no colormap.\The shown colorMap is for drawing only.'). |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3511 |
drawingColormap := OrderedCollection new. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3512 |
]. |
1682 | 3513 |
drawingColormap add:newColor. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3514 |
self listOfColors contents:drawingColormap. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3515 |
self selectionOfColor value:(drawingColormap size). |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3516 |
|
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3517 |
"/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs. |
1054 | 3518 |
^ self |
3519 |
]. |
|
3520 |
||
1583 | 3521 |
("(depth == 1)" false |
1054 | 3522 |
or:[cMap size == (1 bitShift:depth)]) ifTrue:[ |
3523 |
depth >= 8 ifTrue:[ |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3524 |
self warn:'No space for more colors in colormap.'. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3525 |
^ self |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3526 |
]. |
1916 | 3527 |
(self confirm:(resources stringWithCRs:'No space for more colors in colormap.\Change depth ?')) |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3528 |
ifFalse:[ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3529 |
^ self |
1057 | 3530 |
]. |
3531 |
||
3532 |
imageEditView makeUndo. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3533 |
img mask notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3534 |
newMode := 'masked' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3535 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3536 |
newMode := 'depth' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3537 |
]. |
1057 | 3538 |
self colorMapMode:newMode. |
3539 |
] ifFalse:[ |
|
3540 |
imageEditView makeUndo. |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3541 |
]. |
1054 | 3542 |
|
3543 |
cMap := cMap asArray. |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3544 |
listOfColors := self listOfColors. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3545 |
oldCListSize := listOfColors size. |
1054 | 3546 |
|
1682 | 3547 |
newColorMap := cMap copyWith:newColor. |
1054 | 3548 |
|
3549 |
newImage := img species new |
|
3550 |
width:img width |
|
3551 |
height:img height |
|
3552 |
depth:depth |
|
3553 |
fromArray:img bits. |
|
3554 |
||
3555 |
newImage colorMap:newColorMap. |
|
3556 |
newImage fileName:img fileName. |
|
3557 |
newImage mask:(img mask copy). |
|
3558 |
||
3559 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3560 |
listOfColors contents: newImage colorMap. |
1054 | 3561 |
self findColorMapMode. |
3562 |
"/ mhmh - somehow, we get two colors added ... (sigh findColorMapMode adds another one ...) |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3563 |
listOfColors size > (oldCListSize + 1) ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3564 |
listOfColors removeLast |
1054 | 3565 |
]. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3566 |
self selectionOfColor value:(listOfColors size). |
1054 | 3567 |
self updateLabelsAndHistory. |
3568 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3569 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3570 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
1057 | 3571 |
"Modified: / 16.3.1999 / 21:57:26 / cg" |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3572 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3573 |
|
1650 | 3574 |
changeHLS |
3575 |
"interactive Hue/Light/Saturation editing" |
|
3576 |
||
3577 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
1652 | 3578 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema| |
3579 |
||
1741 | 3580 |
"/ compute the averageColor in the background (while asking user) |
1652 | 3581 |
readySema := Semaphore new. |
3582 |
[ |
|
3583 |
originalColormap := imageEditView image colorMap copy. |
|
3584 |
avgColor := imageEditView image averageColor. |
|
3585 |
readySema signal. |
|
3586 |
] forkAt:7. |
|
1649 | 3587 |
|
3588 |
acceptChannel := TriggerValue new. |
|
1652 | 3589 |
avgColorHolder := avgColor asValue. |
1649 | 3590 |
|
3591 |
firstChange := true. |
|
3592 |
||
1651 | 3593 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
3594 |
Color |
|
3595 |
hue:((clr hue) ? 0 + hShift) |
|
3596 |
light:((clr light * lFactor / 100) min:100) |
|
3597 |
saturation:((clr saturation * sFactor / 100) min:100)]. |
|
1652 | 3598 |
|
1649 | 3599 |
shiftAction := |
3600 |
[ |
|
1650 | 3601 |
|hShift lFactor sFactor| |
3602 |
||
1649 | 3603 |
acceptChannel value:true. |
3604 |
||
3605 |
firstChange ifTrue:[ |
|
3606 |
imageEditView makeUndo. |
|
3607 |
firstChange := false. |
|
3608 |
]. |
|
1652 | 3609 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
1650 | 3610 |
|
3611 |
hShift := hueShift value. |
|
3612 |
lFactor := lightValue value. |
|
3613 |
sFactor := saturationValue value. |
|
3614 |
||
1652 | 3615 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
3616 |
||
3617 |
shiftProcess notNil ifTrue:[ |
|
3618 |
shiftProcess terminate. |
|
3619 |
shiftProcess waitUntilTerminated. |
|
3620 |
shiftProcess := nil. |
|
3621 |
]. |
|
3622 |
shiftProcess := |
|
3623 |
[ |
|
3624 |
[ |
|
1656 | 3625 |
imageEditView image |
3626 |
colorMap:originalColormap copy; |
|
3627 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
1652 | 3628 |
self updateImage. |
3629 |
self updateInfoLabel. |
|
3630 |
] ensure:[ shiftProcess := nil ]. |
|
3631 |
] forkAt:7. |
|
1649 | 3632 |
]. |
3633 |
||
3634 |
bindings := IdentityDictionary new. |
|
1650 | 3635 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
1656 | 3636 |
hueShift onChangeEvaluate:shiftAction. |
1650 | 3637 |
|
3638 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
1656 | 3639 |
lightValue onChangeEvaluate:shiftAction. |
1650 | 3640 |
|
3641 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
1656 | 3642 |
saturationValue onChangeEvaluate:shiftAction. |
1650 | 3643 |
|
1649 | 3644 |
bindings at:#acceptChannel put:acceptChannel. |
1652 | 3645 |
bindings at:#hlsColor put:avgColorHolder. |
1650 | 3646 |
|
3647 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
1649 | 3648 |
ifFalse:[ |
3649 |
firstChange ~~ true ifTrue:[ |
|
3650 |
imageEditView undo |
|
3651 |
] |
|
3652 |
]. |
|
1741 | 3653 |
self updateImage |
1649 | 3654 |
! |
3655 |
||
1403 | 3656 |
clearMaskedPixels |
3657 |
"clear all masked pixels (to pixelValue 0)" |
|
3658 |
||
1460 | 3659 |
|newImage oldImage| |
1403 | 3660 |
|
3661 |
oldImage := self image. |
|
3662 |
||
3663 |
imageEditView makeUndo. |
|
3664 |
||
3665 |
self withExecuteCursorDo:[ |
|
3666 |
newImage := oldImage clearMaskedPixels. |
|
1460 | 3667 |
0 to:newImage height - 1 do:[:y | |
3668 |
0 to:newImage width - 1 do:[:x | |
|
3669 |
(newImage maskAtX:x y:y) == 0 ifTrue:[ |
|
3670 |
newImage pixelAtX:x y:y put:0 |
|
3671 |
] |
|
3672 |
] |
|
3673 |
]. |
|
3674 |
||
1403 | 3675 |
(imageEditView image:newImage) notNil ifTrue:[ |
1446 | 3676 |
self fetchImageData. |
1403 | 3677 |
] |
3678 |
] |
|
3679 |
! |
|
3680 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3681 |
colorMapChanged |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3682 |
|img| |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3683 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3684 |
img := self image. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3685 |
img release. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3686 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3687 |
self imageEditView invalidate. |
960 | 3688 |
self imagePreView invalidate. |
3689 |
||
3690 |
"/ (imageEditView image:img) notNil ifTrue:[ |
|
3691 |
"/ self updateLabelsAndHistory. |
|
3692 |
"/ self imagePreView image:img |
|
3693 |
"/ ] |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3694 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3695 |
"Created: / 7.8.1998 / 22:26:10 / cg" |
960 | 3696 |
"Modified: / 18.8.1998 / 17:08:55 / cg" |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3697 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3698 |
|
975 | 3699 |
colorMapMode:aMode |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3700 |
"calculates a new color map for the image from aMode" |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3701 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3702 |
|depth numColors newColorMap newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3703 |
oldImage image newColors realColorMap oldFileName |
1008 | 3704 |
usedColors useNearest usageCounts tmpBits tmpMap quest |
3705 |
prevMode maskThreshold maskImage| |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3706 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3707 |
self withExecuteCursorDo:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3708 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3709 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3710 |
prevMode := colorMapMode value. |
1008 | 3711 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3712 |
newColorMap := self class listOfColorMaps at:aMode. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3713 |
depth := (newColorMap size log:2) asInteger. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3714 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3715 |
useNearest := false. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3716 |
depth == 1 ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3717 |
quest := 'Keep colormap (or use standard B&W)' |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3718 |
] ifFalse:[ |
1008 | 3719 |
prevMode isNil ifTrue:[ |
3720 |
quest := 'Compute colormap (or use standard)' |
|
3721 |
] ifFalse:[ |
|
3722 |
quest := 'Keep colormap (or use standard)' |
|
3723 |
] |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3724 |
]. |
1008 | 3725 |
((prevMode = aMode) |
1057 | 3726 |
or:[depth > oldImage depth |
3727 |
or:[self confirm:(resources string:quest)]]) ifTrue:[ |
|
1008 | 3728 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3729 |
"/ keep the colormap |
1008 | 3730 |
newColorMap atAllPut:Color black. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3731 |
depth > oldImage depth ifTrue:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3732 |
"/ easy - simply copy the part |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3733 |
numColors := 1 bitShift:oldImage depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3734 |
0 to:numColors-1 do:[:pixel | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3735 |
newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3736 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3737 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3738 |
"/ see if all used color fit the new colormap |
986 | 3739 |
usedColors := oldImage usedColorsMax:(1 bitShift:depth). |
1403 | 3740 |
(usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[ |
3741 |
usedColors := oldImage realUsedColors |
|
3742 |
]. |
|
986 | 3743 |
(usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3744 |
"/ yea - just install them |
986 | 3745 |
usedColors asArray keysAndValuesDo:[:idx :clr | |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3746 |
newColorMap at:idx put:clr |
1008 | 3747 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3748 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3749 |
"/ copy over those that are most often used. |
986 | 3750 |
oldImage depth < 8 ifTrue:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3751 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3752 |
oldImage bits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3753 |
expandPixels:(oldImage depth) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3754 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3755 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3756 |
into:tmpBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3757 |
mapping:nil. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3758 |
] ifFalse:[ |
986 | 3759 |
oldImage depth == 8 ifTrue:[ |
3760 |
tmpBits := oldImage bits |
|
3761 |
] ifFalse:[ |
|
1124 | 3762 |
colorMapMode value:prevMode. |
1471 | 3763 |
self warn:('Too many used colors in image (', oldImage usedColors size printString , ').'). |
986 | 3764 |
^ self |
1471 | 3765 |
"/ (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs)) |
3766 |
"/ ifFalse:[. |
|
3767 |
"/ ^ self |
|
3768 |
"/ ]. |
|
3769 |
"/ self image: (Image newForDepth:depth) fromImage:oldImage. |
|
3770 |
"/ ^ self. |
|
986 | 3771 |
] |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3772 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3773 |
usageCounts := tmpBits usageCounts. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3774 |
tmpMap := Array new:usageCounts size. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3775 |
oldImage colorMap asArray keysAndValuesDo:[:i :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3776 |
tmpMap at:i put:clr |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3777 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3778 |
usageCounts sort:[:a :b | a > b] with:tmpMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3779 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3780 |
1 to:(1 bitShift:depth) do:[:idx | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3781 |
newColorMap at:idx put:(tmpMap at:idx) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3782 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3783 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3784 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3785 |
confirmWithCancel:(resources |
1916 | 3786 |
stringWithCRs:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?' |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3787 |
with:usedColors size |
1916 | 3788 |
with:(1 bitShift:depth)) |
1542 | 3789 |
labels:(resources array:#('Cancel' 'First' 'Nearest')). |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3790 |
useNearest isNil ifTrue:[ |
1542 | 3791 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3792 |
^ self "/ cancel |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3793 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3794 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3795 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3796 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3797 |
"/ standard colormap |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3798 |
usedColors := oldImage usedColors. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3799 |
(usedColors conform:[:clr | newColorMap includes:clr]) ifFalse:[ |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3800 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3801 |
confirmWithCancel:(resources |
1916 | 3802 |
stringWithCRs:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?' |
3803 |
) |
|
1542 | 3804 |
labels:(resources string:#('Cancel' 'First' 'Nearest')). |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3805 |
useNearest isNil ifTrue:[ |
1542 | 3806 |
colorMapMode value:prevMode. |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3807 |
^ self "/ cancel |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3808 |
]. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3809 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3810 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3811 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3812 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3813 |
|
1424
d7367ae7f85e
fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
3814 |
newImage := Image newForDepth:depth. |
d7367ae7f85e
fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
3815 |
newImage depth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3816 |
oldFileName := oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3817 |
|
1008 | 3818 |
Image imageErrorSignal handle:[:ex| |
3819 |
Color colorErrorSignal handle:[:ex| |
|
1542 | 3820 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3821 |
imageEditView undo. |
1008 | 3822 |
^ self warn:(resources string:'Conversion failed !!') |
3823 |
] do:[ |
|
1393 | 3824 |
newImage := Image newForDepth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3825 |
newImage width:oldImage width height:oldImage height depth:depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3826 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3827 |
newImage photometric:#palette. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3828 |
newImage bits:(ByteArray new:(newImage bytesPerRow * newImage height)). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3829 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3830 |
oldImage colorsFromX:0 y:0 toX:(oldImage width-1) y:(oldImage height-1) do: |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3831 |
[:x :y :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3832 |
|newColor| |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3833 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3834 |
(newColorMap includes:clr) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3835 |
ifTrue: [newColor := clr] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3836 |
ifFalse: [ |
1008 | 3837 |
newColor := clr nearestIn:newColorMap. |
3838 |
useNearest ifFalse:[ |
|
3839 |
(newColor deltaFrom:clr) > 0.5 ifTrue:[ |
|
3840 |
newColor := oldImage colorFromValue:0 |
|
3841 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3842 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3843 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3844 |
newImage colorAtX:x y:y put:newColor. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3845 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3846 |
image := newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3847 |
]. |
1008 | 3848 |
] do:[ |
3849 |
image := newImage fromImage:oldImage |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3850 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3851 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3852 |
(aMode asString startsWith:'mask') ifTrue:[ |
1008 | 3853 |
image mask isNil ifTrue:[ |
1776 | 3854 |
(Dialog confirm:'Generate mask from black ?' default:false) ifTrue:[ |
1008 | 3855 |
maskThreshold := 0.1. |
3856 |
maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
|
3857 |
] ifFalse:[ |
|
3858 |
maskImage := Depth1Image extent:image extent. |
|
1770 | 3859 |
maskImage bits:(ByteArray |
1008 | 3860 |
new:(maskImage bytesPerRow * maskImage height) |
3861 |
withAll:16rFF). |
|
3862 |
||
3863 |
"/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
|
3864 |
]. |
|
3865 |
image mask:maskImage. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3866 |
]. |
1008 | 3867 |
] ifFalse:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3868 |
image mask: nil. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3869 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3870 |
realColorMap := OrderedCollection new. |
1054 | 3871 |
image realColorMap do:[:clr| |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3872 |
(realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3873 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3874 |
newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
1054 | 3875 |
newColorMap do:[:clr| |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3876 |
((newColors size < newColorMap size) and: [(newColors includes: clr) not]) |
1054 | 3877 |
ifTrue:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3878 |
newColors add: clr |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3879 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3880 |
]. |
975 | 3881 |
image colorMap: newColors. |
1446 | 3882 |
image fileName: oldFileName. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3883 |
|
1054 | 3884 |
(imageEditView image: image) notNil ifTrue:[ |
1446 | 3885 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3886 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3887 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3888 |
|
1057 | 3889 |
"Modified: / 16.3.1999 / 21:55:39 / cg" |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3890 |
! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3891 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3892 |
compressColorMap |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3893 |
"calculates a new color map for the image, using only used colors" |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3894 |
|
927 | 3895 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3896 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3897 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3898 |
depth := oldImage depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3899 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3900 |
oldImage photometric ~~ #palette ifTrue:[ |
930 | 3901 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3902 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3903 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3904 |
|
1403 | 3905 |
usedColors := oldImage realUsedColors. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3906 |
usedColors size == (1 bitShift:depth) ifTrue:[ |
930 | 3907 |
self information:'Compress colorMap: All colors are used - no compression.'. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3908 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3909 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3910 |
usedColors size == oldImage colorMap size ifTrue:[ |
930 | 3911 |
self information:'Compress colorMap: Colormap already compressed - no compression.'. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3912 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3913 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3914 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3915 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3916 |
|
930 | 3917 |
self information:('Compress colorMap: %1 colors used.' bindWith:usedColors size). |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3918 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3919 |
self withExecuteCursorDo:[ |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3920 |
"/ newColorMap := Array new:usedColors size. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3921 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3922 |
"/ translation table |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3923 |
oldToNew := ByteArray new:(1 bitShift:depth). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3924 |
newColorMap := usedColors asArray. |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3925 |
newColorMap sort:[:a :b | |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3926 |
a redByte == b redByte ifTrue:[ |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3927 |
a greenByte == b greenByte ifTrue:[ |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3928 |
a blueByte < b blueByte |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3929 |
] ifFalse:[ |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3930 |
a greenByte < b greenByte |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3931 |
] |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3932 |
] ifFalse:[ |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3933 |
a redByte < b redByte |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3934 |
] |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3935 |
]. |
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3936 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3937 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3938 |
|newPixel| |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3939 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3940 |
(usedColors includes:clr) ifTrue:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3941 |
newPixel := newColorMap indexOf:clr. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3942 |
oldToNew at:oldIdx put:newPixel-1. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3943 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3944 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3945 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3946 |
oldBits := oldImage bits. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3947 |
newBits := ByteArray new:(oldBits size). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3948 |
depth ~~ 8 ifTrue:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3949 |
"/ expand/compress can only handle 8bits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3950 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3951 |
oldBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3952 |
expandPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3953 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3954 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3955 |
into:tmpBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3956 |
mapping:oldToNew. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3957 |
tmpBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3958 |
compressPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3959 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3960 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3961 |
into:newBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3962 |
mapping:nil |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3963 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3964 |
oldBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3965 |
expandPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3966 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3967 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3968 |
into:newBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3969 |
mapping:oldToNew. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3970 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3971 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3972 |
newImage := oldImage species new |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3973 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3974 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3975 |
depth:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3976 |
fromArray:newBits. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3977 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3978 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3979 |
newImage fileName:oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3980 |
newImage mask:(oldImage mask copy). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3981 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3982 |
(imageEditView image:newImage) notNil ifTrue: |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3983 |
[ |
1446 | 3984 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3985 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3986 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3987 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3988 |
"Created: / 28.7.1998 / 20:03:11 / cg" |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
3989 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
1008 | 3990 |
! |
3991 |
||
1852 | 3992 |
copyColorFromColormap |
1871 | 3993 |
imageEditView setClipboardObject:(self selectedColorOrNil) |
1852 | 3994 |
! |
3995 |
||
1480 | 3996 |
copyMask |
3997 |
|mask| |
|
3998 |
||
3999 |
mask := self image mask. |
|
4000 |
MaskClipboard := mask subImageIn: (0@0 extent:mask extent). |
|
4001 |
! |
|
4002 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4003 |
editSelectedColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4004 |
self processSelectedColorWith:[:clr | |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4005 |
|editor| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4006 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4007 |
editor := ColorEditDialog new. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4008 |
editor color:clr. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4009 |
editor open. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4010 |
editor accepted ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4011 |
AbortOperationRequest raise. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4012 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4013 |
editor color |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4014 |
] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4015 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4016 |
|
1446 | 4017 |
fetchImageData |
1460 | 4018 |
|image| |
4019 |
||
4020 |
(image := imageEditView image) notNil ifTrue:[ |
|
4021 |
self findColorMapMode. |
|
4022 |
self updateLabelsAndHistory. |
|
4023 |
] |
|
1446 | 4024 |
! |
4025 |
||
1544 | 4026 |
inspectColor |
1682 | 4027 |
|clrIndex| |
4028 |
||
4029 |
clrIndex := self selectedColorIndexOrNil. |
|
4030 |
clrIndex isNil ifTrue:[ |
|
1544 | 4031 |
^ self |
4032 |
]. |
|
1682 | 4033 |
(self image colorFromValue:clrIndex-1) inspect |
1544 | 4034 |
! |
4035 |
||
1598 | 4036 |
makeBrighter |
4037 |
| anyChange| |
|
4038 |
||
4039 |
self withExecuteCursorDo:[ |
|
4040 |
anyChange := imageEditView makeBrighter. |
|
4041 |
anyChange ifFalse:[ |
|
4042 |
Dialog warn:'Image unchanged'. |
|
4043 |
] ifTrue:[ |
|
4044 |
self updateImage. |
|
4045 |
] |
|
4046 |
]. |
|
4047 |
! |
|
4048 |
||
4049 |
makeDarker |
|
4050 |
| anyChange| |
|
4051 |
||
4052 |
self withExecuteCursorDo:[ |
|
4053 |
anyChange := imageEditView makeDarker. |
|
4054 |
anyChange ifFalse:[ |
|
4055 |
Dialog warn:'Image unchanged'. |
|
4056 |
] ifTrue:[ |
|
4057 |
self updateImage. |
|
4058 |
] |
|
4059 |
]. |
|
4060 |
! |
|
4061 |
||
1436 | 4062 |
makeGrayScale |
1598 | 4063 |
|anyChange| |
1436 | 4064 |
|
4065 |
self withExecuteCursorDo:[ |
|
4066 |
anyChange := imageEditView makeGrayScale. |
|
4067 |
anyChange ifFalse:[ |
|
4068 |
Dialog warn:'Image unchanged'. |
|
4069 |
] ifTrue:[ |
|
1598 | 4070 |
self updateImage. |
4071 |
] |
|
4072 |
]. |
|
4073 |
! |
|
4074 |
||
4075 |
makeInverse |
|
4076 |
| anyChange| |
|
4077 |
||
4078 |
self withExecuteCursorDo:[ |
|
4079 |
anyChange := imageEditView makeInverse. |
|
4080 |
anyChange ifFalse:[ |
|
4081 |
Dialog warn:'Image unchanged'. |
|
4082 |
] ifTrue:[ |
|
4083 |
self updateImage. |
|
1436 | 4084 |
] |
4085 |
]. |
|
4086 |
! |
|
4087 |
||
1446 | 4088 |
makeSelectedColorBrighter |
1682 | 4089 |
self processSelectedColorWith:[:clr | clr lightened] |
1446 | 4090 |
! |
4091 |
||
4092 |
makeSelectedColorDarker |
|
1682 | 4093 |
self processSelectedColorWith:[:clr | clr darkened] |
1446 | 4094 |
! |
4095 |
||
1884 | 4096 |
makeSelectedColorGray |
4097 |
self processSelectedColorWith:[:clr | Color brightness:(clr brightness)] |
|
4098 |
! |
|
4099 |
||
1852 | 4100 |
pasteColorIntoColormap |
4101 |
|copyBufferColor| |
|
4102 |
||
1873 | 4103 |
copyBufferColor := imageEditView getClipboardObject. |
1852 | 4104 |
copyBufferColor isColor ifFalse:[ |
1879
03581b0d7c8f
Send #beep to window instead of device
Stefan Vogel <sv@exept.de>
parents:
1873
diff
changeset
|
4105 |
self window beep. |
1852 | 4106 |
^ self |
4107 |
]. |
|
4108 |
||
4109 |
self processSelectedColorWith:[:clr | |
|
4110 |
copyBufferColor |
|
4111 |
] |
|
4112 |
! |
|
4113 |
||
1480 | 4114 |
pasteMask |
4115 |
|img mask| |
|
4116 |
||
4117 |
imageEditView makeUndo. |
|
4118 |
||
4119 |
img := self image. |
|
4120 |
mask := img mask. |
|
4121 |
||
4122 |
mask |
|
4123 |
copyFrom:MaskClipboard |
|
4124 |
x:0 y:0 |
|
4125 |
toX:0 y:0 |
|
4126 |
width:(mask width min:MaskClipboard width) |
|
4127 |
height:(mask height min:MaskClipboard height). |
|
4128 |
img mask:mask. |
|
4129 |
(imageEditView image:img copy) notNil ifTrue:[ |
|
4130 |
self fetchImageData. |
|
4131 |
] |
|
4132 |
! |
|
4133 |
||
1682 | 4134 |
pickAndAddColorToColormap |
4135 |
self addColorToColormap:(Color fromUser) |
|
4136 |
! |
|
4137 |
||
1852 | 4138 |
pickColor |
1871 | 4139 |
imageEditView setClipboardObject:(Color fromUser) |
1852 | 4140 |
! |
4141 |
||
1682 | 4142 |
processSelectedColorWith:aBlock |
1852 | 4143 |
"undoable color processing: the selected color will be replaced by the |
4144 |
value of aBlock" |
|
4145 |
||
4146 |
|img cMap modifiedColormap oldColor newImage selectedColorIndex oldSelection newColor| |
|
1682 | 4147 |
|
4148 |
selectedColorIndex := self selectedColorIndexOrNil. |
|
4149 |
selectedColorIndex isNil ifTrue:[^ self]. |
|
4150 |
||
4151 |
img := self image. |
|
4152 |
cMap := img colorMap. |
|
4153 |
cMap isNil ifTrue:[ |
|
1916 | 4154 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1682 | 4155 |
^ self |
4156 |
]. |
|
1852 | 4157 |
|
4158 |
oldColor := cMap at:selectedColorIndex. |
|
1682 | 4159 |
imageEditView makeUndo. |
4160 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4161 |
modifiedColormap := cMap asArray copy. |
1852 | 4162 |
|
4163 |
newColor := aBlock value:oldColor. |
|
1859 | 4164 |
modifiedColormap at:selectedColorIndex put:newColor. |
1682 | 4165 |
|
4166 |
newImage := img species new |
|
4167 |
width:img width |
|
4168 |
height:img height |
|
1843 | 4169 |
depth:img depth |
1682 | 4170 |
fromArray:img bits. |
4171 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4172 |
newImage colorMap:modifiedColormap. |
1682 | 4173 |
newImage fileName:img fileName. |
4174 |
newImage mask:(img mask copy). |
|
4175 |
||
4176 |
oldSelection := self selectionOfColor value. |
|
4177 |
||
4178 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
4179 |
self fetchImageData. |
|
4180 |
]. |
|
4181 |
self selectionOfColor value:oldSelection. |
|
4182 |
||
4183 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
|
4184 |
"Modified: / 16.3.1999 / 21:57:26 / cg" |
|
4185 |
! |
|
4186 |
||
1124 | 4187 |
reduceNumberOfColors |
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4188 |
|s n anyChange img usedColors| |
1124 | 4189 |
|
4190 |
s := Dialog request:'Number of color bits to strip (1-7) ?'. |
|
1435 | 4191 |
s size == 0 ifTrue:[^ self]. |
1124 | 4192 |
n := Integer readFrom:s onError:0. |
4193 |
(n between:1 and:7) ifFalse:[ |
|
4194 |
Dialog warn:'Image unchanged'. |
|
4195 |
^ self |
|
4196 |
]. |
|
4197 |
||
4198 |
self withExecuteCursorDo:[ |
|
4199 |
anyChange := imageEditView reduceColorResolutionBy:n. |
|
4200 |
anyChange ifFalse:[ |
|
4201 |
Dialog warn:'Image unchanged'. |
|
4202 |
] ifTrue:[ |
|
4203 |
img := imageEditView image. |
|
4204 |
imageEditView image:img. |
|
1446 | 4205 |
|
4206 |
self fetchImageData. |
|
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4207 |
usedColors := img usedColorsMax:10000. |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4208 |
usedColors size == 10000 ifTrue:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4209 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4210 |
] ifFalse:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4211 |
Dialog information:(usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4212 |
] |
1124 | 4213 |
] |
4214 |
]. |
|
4215 |
! |
|
4216 |
||
1682 | 4217 |
selectedColorIndexOrNil |
4218 |
| img clrIndex| |
|
4219 |
||
4220 |
img := self image. |
|
4221 |
img isNil ifTrue:[ |
|
4222 |
self warn:'No Image.'. |
|
4223 |
^ nil |
|
4224 |
]. |
|
4225 |
clrIndex := self selectionOfColor value. |
|
1896 | 4226 |
self hasMask "img mask notNil" ifTrue: [ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4227 |
clrIndex == 1 ifTrue:[^ nil]. |
1904 | 4228 |
clrIndex == 0 ifTrue:[^ nil]. |
1896 | 4229 |
^ clrIndex - 1 |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4230 |
]. |
1682 | 4231 |
^ clrIndex |
4232 |
! |
|
4233 |
||
1852 | 4234 |
selectedColorOrNil |
1896 | 4235 |
|cmapIndex img cMap| |
4236 |
||
4237 |
cmapIndex := self selectedColorIndexOrNil. |
|
1900 | 4238 |
cmapIndex isNil ifTrue:[^ nil]. |
1852 | 4239 |
|
4240 |
img := self image. |
|
4241 |
cMap := img colorMap. |
|
4242 |
cMap isNil ifTrue:[ |
|
1916 | 4243 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1900 | 4244 |
^ nil |
1852 | 4245 |
]. |
1896 | 4246 |
^ cMap at:cmapIndex. |
1852 | 4247 |
! |
4248 |
||
1008 | 4249 |
sortColorMap |
4250 |
"calculates a new color map for the image, sorting colors" |
|
4251 |
||
4252 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| |
|
4253 |
||
4254 |
oldImage := self image. |
|
4255 |
depth := oldImage depth. |
|
4256 |
||
4257 |
oldImage photometric ~~ #palette ifTrue:[ |
|
4258 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
4259 |
^ self |
|
4260 |
]. |
|
4261 |
||
4262 |
usedColors := oldImage realColorMap. |
|
4263 |
||
4264 |
imageEditView makeUndo. |
|
4265 |
||
4266 |
self withExecuteCursorDo:[ |
|
4267 |
"/ newColorMap := Array new:usedColors size. |
|
4268 |
||
4269 |
"/ translation table |
|
4270 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
4271 |
newColorMap := usedColors asArray. |
|
4272 |
newColorMap sort:[:a :b | |
|
4273 |
a redByte == b redByte ifTrue:[ |
|
4274 |
a greenByte == b greenByte ifTrue:[ |
|
4275 |
a blueByte < b blueByte |
|
4276 |
] ifFalse:[ |
|
4277 |
a greenByte < b greenByte |
|
4278 |
] |
|
4279 |
] ifFalse:[ |
|
4280 |
a redByte < b redByte |
|
4281 |
] |
|
4282 |
]. |
|
4283 |
||
4284 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
4285 |
|newPixel| |
|
4286 |
||
4287 |
(usedColors includes:clr) ifTrue:[ |
|
4288 |
newPixel := newColorMap indexOf:clr. |
|
4289 |
oldToNew at:oldIdx put:newPixel-1. |
|
4290 |
] |
|
4291 |
]. |
|
4292 |
||
4293 |
oldBits := oldImage bits. |
|
4294 |
newBits := ByteArray new:(oldBits size). |
|
4295 |
depth ~~ 8 ifTrue:[ |
|
4296 |
"/ expand/compress can only handle 8bits |
|
4297 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
4298 |
oldBits |
|
4299 |
expandPixels:depth |
|
4300 |
width:oldImage width |
|
4301 |
height:oldImage height |
|
4302 |
into:tmpBits |
|
4303 |
mapping:oldToNew. |
|
4304 |
tmpBits |
|
4305 |
compressPixels:depth |
|
4306 |
width:oldImage width |
|
4307 |
height:oldImage height |
|
4308 |
into:newBits |
|
4309 |
mapping:nil |
|
4310 |
] ifFalse:[ |
|
4311 |
oldBits |
|
4312 |
expandPixels:depth |
|
4313 |
width:oldImage width |
|
4314 |
height:oldImage height |
|
4315 |
into:newBits |
|
4316 |
mapping:oldToNew. |
|
4317 |
]. |
|
4318 |
||
4319 |
newImage := oldImage species new |
|
4320 |
width:oldImage width |
|
4321 |
height:oldImage height |
|
4322 |
depth:depth |
|
4323 |
fromArray:newBits. |
|
4324 |
||
4325 |
newImage colorMap:newColorMap. |
|
4326 |
newImage fileName:oldImage fileName. |
|
4327 |
newImage mask:(oldImage mask copy). |
|
4328 |
||
1054 | 4329 |
(imageEditView image:newImage) notNil ifTrue:[ |
1446 | 4330 |
self fetchImageData. |
1008 | 4331 |
] |
4332 |
] |
|
4333 |
||
4334 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
4335 |
"Created: / 30.9.1998 / 23:51:23 / cg" |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4336 |
! ! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4337 |
|
1715 | 4338 |
!ImageEditor methodsFor:'user actions-editing'! |
400 | 4339 |
|
1882 | 4340 |
doBrightenImage |
4341 |
imageEditView brightenImage. |
|
4342 |
self listOfColors removeAll. |
|
4343 |
self findColorMapMode. |
|
4344 |
imageEditView undoImages removeLast |
|
4345 |
! |
|
4346 |
||
767 | 4347 |
doBrowseClass |
4348 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
400 | 4349 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4350 |
|cls| |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4351 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4352 |
cls := Smalltalk at:(imageEditView resourceClass) ifAbsent:nil. |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4353 |
cls isNil ifTrue:[^ self warn:'No Class specified']. |
1488 | 4354 |
UserPreferences systemBrowserClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4355 |
openInClass:cls class |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4356 |
selector:(imageEditView resourceSelector) |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4357 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4358 |
"Modified: / 31.7.1998 / 02:01:15 / cg" |
400 | 4359 |
! |
4360 |
||
1703 | 4361 |
doCopyImageToClipboard |
4362 |
imageEditView copyImageToClipboard. |
|
4363 |
! |
|
4364 |
||
1045 | 4365 |
doCropAll |
986 | 4366 |
"find all borders and cut them off" |
4367 |
||
1045 | 4368 |
imageEditView cropLeft:true right:true top:true bottom:true. |
986 | 4369 |
self updateInfoLabel |
4370 |
||
4371 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
4372 |
"Created: / 7.9.1998 / 16:33:43 / cg" |
|
4373 |
! |
|
4374 |
||
1045 | 4375 |
doCropBottom |
986 | 4376 |
"find a bottom border and cut it off" |
4377 |
||
1045 | 4378 |
imageEditView cropLeft:false right:false top:false bottom:true. |
986 | 4379 |
self updateInfoLabel |
4380 |
||
4381 |
"Created: / 7.9.1998 / 13:00:20 / cg" |
|
4382 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
4383 |
! |
|
4384 |
||
1045 | 4385 |
doCropLeft |
986 | 4386 |
"find a left border and cut it off" |
4387 |
||
1045 | 4388 |
imageEditView cropLeft:true right:false top:false bottom:false. |
986 | 4389 |
self updateInfoLabel |
4390 |
||
4391 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
4392 |
"Modified: / 7.9.1998 / 14:26:34 / cg" |
|
4393 |
! |
|
4394 |
||
1045 | 4395 |
doCropManual |
986 | 4396 |
"let user specify borders and cut them off" |
4397 |
||
1502 | 4398 |
|bindings left top right bottom img firstChange gropAction acceptChannel| |
4399 |
||
4400 |
acceptChannel := TriggerValue new. |
|
1490 | 4401 |
|
4402 |
firstChange := true. |
|
4403 |
||
1502 | 4404 |
gropAction := |
4405 |
[:lV :rV :tV :bV | |l r t b| |
|
4406 |
acceptChannel value:true. |
|
4407 |
||
4408 |
l := lV value. |
|
4409 |
r := rV value. |
|
4410 |
t := tV value. |
|
4411 |
b := bV value. |
|
4412 |
(l + r + t + b) == 0 ifTrue:[ |
|
1879
03581b0d7c8f
Send #beep to window instead of device
Stefan Vogel <sv@exept.de>
parents:
1873
diff
changeset
|
4413 |
self window beep |
1502 | 4414 |
] ifFalse:[ |
4415 |
img := imageEditView image. |
|
4416 |
firstChange ifTrue:[ |
|
4417 |
imageEditView makeUndo. |
|
4418 |
firstChange := false. |
|
4419 |
]. |
|
4420 |
imageEditView |
|
4421 |
makeSubImageX:l y:t |
|
4422 |
width:(img width - l - r) |
|
4423 |
height:(img height - t - b). |
|
4424 |
self updateInfoLabel |
|
4425 |
]. |
|
1490 | 4426 |
]. |
986 | 4427 |
|
4428 |
bindings := IdentityDictionary new. |
|
1507 | 4429 |
bindings at:#left put:(left := 1 asValue). |
4430 |
bindings at:#right put:(right := 1 asValue). |
|
4431 |
bindings at:#top put:(top := 1 asValue). |
|
4432 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1502 | 4433 |
bindings at:#acceptChannel put:acceptChannel. |
4434 |
||
4435 |
bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
|
4436 |
bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
|
4437 |
bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
|
4438 |
bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
|
4439 |
||
4440 |
bindings at:#applyAction put:[ gropAction value:left value:right value:top value:bottom ]. |
|
1490 | 4441 |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4442 |
(self openDialogInterface:#cropDialogSpec withBindings:bindings) |
1507 | 4443 |
ifFalse:[ |
4444 |
firstChange ~~ true ifTrue:[ |
|
1558 | 4445 |
imageEditView undo. |
4446 |
self updateImagePreView. |
|
1507 | 4447 |
] |
4448 |
]. |
|
986 | 4449 |
|
4450 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4451 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
4452 |
! |
|
4453 |
||
1045 | 4454 |
doCropRight |
986 | 4455 |
"find a right border and cut it off" |
4456 |
||
1045 | 4457 |
imageEditView cropLeft:false right:true top:false bottom:false. |
986 | 4458 |
self updateInfoLabel |
4459 |
||
4460 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
4461 |
"Modified: / 7.9.1998 / 14:26:44 / cg" |
|
4462 |
! |
|
4463 |
||
1045 | 4464 |
doCropTop |
986 | 4465 |
"find a top border and cut it off" |
4466 |
||
1045 | 4467 |
imageEditView cropLeft:false right:false top:true bottom:false. |
986 | 4468 |
self updateInfoLabel |
4469 |
||
4470 |
"Created: / 7.9.1998 / 13:00:19 / cg" |
|
4471 |
"Modified: / 7.9.1998 / 14:26:52 / cg" |
|
4472 |
! |
|
4473 |
||
1882 | 4474 |
doDarkenImage |
4475 |
imageEditView darkenImage. |
|
4476 |
self listOfColors removeAll. |
|
4477 |
self findColorMapMode. |
|
4478 |
imageEditView undoImages removeLast |
|
4479 |
! |
|
4480 |
||
1433 | 4481 |
doEditMask |
4482 |
"" |
|
4483 |
||
4484 |
self image mask edit |
|
4485 |
! |
|
4486 |
||
767 | 4487 |
doFlipHorizontal |
4488 |
"flips horizontally current image" |
|
400 | 4489 |
|
911 | 4490 |
imageEditView flipHorizontal |
400 | 4491 |
! |
4492 |
||
767 | 4493 |
doFlipVertical |
4494 |
"flips vertically current image" |
|
400 | 4495 |
|
911 | 4496 |
imageEditView flipVertical |
400 | 4497 |
! |
4498 |
||
1896 | 4499 |
doInspectImage |
4500 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
4501 |
||
4502 |
self image inspect |
|
4503 |
! |
|
4504 |
||
767 | 4505 |
doMagnifyDown |
4506 |
"magnifies current image one step down" |
|
400 | 4507 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4508 |
|magHolder mag| |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4509 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4510 |
magHolder := self valueOfMagnification. |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4511 |
(mag := magHolder value) > 1 ifTrue: [ |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4512 |
magHolder value: mag - 1 |
400 | 4513 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4514 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4515 |
"Modified: / 26.7.1998 / 20:24:08 / cg" |
400 | 4516 |
! |
4517 |
||
767 | 4518 |
doMagnifyImage |
1479 | 4519 |
"magnifies the current image to a new size" |
400 | 4520 |
|
1353 | 4521 |
|box newSize image| |
4522 |
||
4523 |
image := imageEditView image. |
|
4524 |
||
4525 |
box := EnterBox new. |
|
4526 |
box title:(resources string:'Images new size:'). |
|
4527 |
box okText:(resources string:'OK'). |
|
4528 |
box abortText:(resources string:'Cancel'). |
|
4529 |
box initialText:image extent printString. |
|
4530 |
box showAtPointer. |
|
4531 |
(box accepted |
|
4532 |
and: [(newSize := Object readFromString:(box contents) onError:nil) notNil]) |
|
4533 |
ifTrue:[ |
|
1479 | 4534 |
newSize isPoint ifFalse:[ |
4535 |
self warn:'please enter the new size as ''x @ y''.'. |
|
4536 |
^ self. |
|
4537 |
]. |
|
4538 |
imageEditView magnifyImageTo:newSize. |
|
4539 |
]. |
|
4540 |
||
4541 |
self updateInfoLabel |
|
4542 |
! |
|
4543 |
||
4544 |
doMagnifyImageBy |
|
4545 |
"magnifies the current image (by a scale)" |
|
4546 |
||
4547 |
|box oldSize newSize scale image| |
|
4548 |
||
4549 |
image := imageEditView image. |
|
4550 |
oldSize := image extent. |
|
4551 |
||
4552 |
box := EnterBox new. |
|
4553 |
box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):'). |
|
4554 |
box okText:(resources string:'OK'). |
|
4555 |
box abortText:(resources string:'Cancel'). |
|
4556 |
box initialText:1 printString. |
|
4557 |
box showAtPointer. |
|
4558 |
||
4559 |
(box accepted |
|
4560 |
and: [(scale := Object readFromString:(box contents) onError:nil) notNil]) |
|
4561 |
ifTrue:[ |
|
4562 |
scale isNumber ifFalse:[ |
|
4563 |
self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'. |
|
4564 |
^ self. |
|
4565 |
]. |
|
4566 |
newSize := oldSize * scale. |
|
1353 | 4567 |
imageEditView magnifyImageTo:newSize. |
4568 |
]. |
|
4569 |
||
400 | 4570 |
self updateInfoLabel |
4571 |
! |
|
4572 |
||
767 | 4573 |
doMagnifyUp |
4574 |
"magnifies current image one step up" |
|
400 | 4575 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4576 |
|magHolder mag| |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4577 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4578 |
magHolder := self valueOfMagnification. |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4579 |
(mag := magHolder value) < 99 ifTrue: [ |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4580 |
magHolder value: mag + 1 |
400 | 4581 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4582 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4583 |
"Modified: / 26.7.1998 / 20:23:52 / cg" |
400 | 4584 |
! |
4585 |
||
767 | 4586 |
doNegativeImage |
4587 |
"negates current image by negating the color map" |
|
400 | 4588 |
|
1598 | 4589 |
self image depth ~~ 1 ifTrue:[ |
4590 |
Dialog warn:'Only useful for depth 1 images'. |
|
4591 |
^ self |
|
4592 |
]. |
|
911 | 4593 |
imageEditView negativeImage. |
400 | 4594 |
self listOfColors removeAll. |
901 | 4595 |
self findColorMapMode. |
911 | 4596 |
imageEditView undoImages removeLast |
400 | 4597 |
! |
4598 |
||
767 | 4599 |
doResizeImage |
1353 | 4600 |
"resizes the current image" |
4601 |
||
4602 |
|box newSize image| |
|
4603 |
||
4604 |
image := imageEditView image. |
|
4605 |
||
4606 |
box := EnterBox new. |
|
4607 |
box title:(resources string:'Images new size:'). |
|
4608 |
box okText:(resources string:'OK'). |
|
4609 |
box abortText:(resources string:'Cancel'). |
|
4610 |
box initialText:image extent printString. |
|
4611 |
box showAtPointer. |
|
4612 |
(box accepted |
|
4613 |
and: [(newSize := Object readFromString:(box contents) onError:nil) notNil]) |
|
4614 |
ifTrue:[ |
|
4615 |
imageEditView resizeImageTo:newSize. |
|
4616 |
]. |
|
400 | 4617 |
! |
4618 |
||
767 | 4619 |
doRotateImage |
4620 |
"rotates current image" |
|
400 | 4621 |
|
1353 | 4622 |
|box rotation| |
4623 |
||
4624 |
box := EnterBox new. |
|
4625 |
box title:(resources string:'Rotate by (degrees, clockwise):'). |
|
4626 |
box okText:(resources string:'OK'). |
|
4627 |
box abortText:(resources string:'Cancel'). |
|
4628 |
box initialText: '0'. |
|
4629 |
box showAtPointer. |
|
4630 |
(box accepted and: [(rotation := Object readFromString: box contents onError:nil) notNil]) |
|
4631 |
ifTrue:[ |
|
4632 |
imageEditView rotateImageBy:rotation. |
|
1558 | 4633 |
self updateInfoLabel. |
1353 | 4634 |
]. |
400 | 4635 |
! |
4636 |
||
1557 | 4637 |
doShiftManual |
4638 |
"let user specify amount and shift" |
|
4639 |
||
1713 | 4640 |
|bindings amount img firstChange shiftAction acceptChannel wrapHolder| |
1557 | 4641 |
|
4642 |
acceptChannel := TriggerValue new. |
|
1713 | 4643 |
wrapHolder := false asValue. |
1557 | 4644 |
|
4645 |
firstChange := true. |
|
4646 |
||
4647 |
shiftAction := |
|
4648 |
[:shiftH :shiftV | |
|
4649 |
acceptChannel value:true. |
|
4650 |
||
4651 |
img := imageEditView image. |
|
4652 |
firstChange ifTrue:[ |
|
4653 |
imageEditView makeUndo. |
|
4654 |
firstChange := false. |
|
4655 |
]. |
|
1713 | 4656 |
imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). |
1557 | 4657 |
self updateInfoLabel |
4658 |
]. |
|
4659 |
||
4660 |
bindings := IdentityDictionary new. |
|
4661 |
bindings at:#shiftAmount put:(amount := 1 asValue). |
|
1713 | 4662 |
bindings at:#wrap put:wrapHolder. |
1557 | 4663 |
bindings at:#acceptChannel put:acceptChannel. |
4664 |
||
4665 |
bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ]. |
|
4666 |
bindings at:#shiftRightNow put:[ shiftAction value:amount value value:0 ]. |
|
4667 |
bindings at:#shiftUpNow put:[ shiftAction value:0 value:(-1*amount value) ]. |
|
4668 |
bindings at:#shiftDownNow put:[ shiftAction value:0 value:amount value ]. |
|
4669 |
||
4670 |
(self openDialogInterface:#shiftDialogSpec withBindings:bindings) |
|
4671 |
ifFalse:[ |
|
4672 |
firstChange ~~ true ifTrue:[ |
|
4673 |
imageEditView undo |
|
4674 |
] |
|
4675 |
]. |
|
4676 |
||
4677 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4678 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
4679 |
! |
|
4680 |
||
1480 | 4681 |
doUnCropManual |
4682 |
"let user specify borders and add them" |
|
4683 |
||
4684 |
|bindings left top right bottom img| |
|
4685 |
||
4686 |
bindings := IdentityDictionary new. |
|
1704 | 4687 |
bindings at:#left put:(left := 1 asValue). |
4688 |
bindings at:#right put:(right := 1 asValue). |
|
4689 |
bindings at:#top put:(top := 1 asValue). |
|
4690 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4691 |
(self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
1480 | 4692 |
ifTrue:[ |
4693 |
left := left value. |
|
4694 |
right := right value. |
|
4695 |
top := top value. |
|
4696 |
bottom := bottom value. |
|
4697 |
img := imageEditView image. |
|
4698 |
||
4699 |
imageEditView |
|
4700 |
makeBorderedImageX:left y:top |
|
4701 |
width:(img width + left + right) |
|
4702 |
height:(img height + top + bottom). |
|
4703 |
self updateInfoLabel |
|
4704 |
]. |
|
4705 |
||
4706 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4707 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
4708 |
! |
|
4709 |
||
767 | 4710 |
doUndo |
4711 |
"reverses last edit action" |
|
400 | 4712 |
|
1436 | 4713 |
imageEditView undo. |
400 | 4714 |
! ! |
4715 |
||
1715 | 4716 |
!ImageEditor methodsFor:'user actions-loading'! |
400 | 4717 |
|
767 | 4718 |
doLoadFromClass |
4719 |
"opens a dialog for loading an image from class and a (resource-) selector" |
|
400 | 4720 |
|
1122 | 4721 |
|img| |
4722 |
||
1054 | 4723 |
(imageEditView loadFromClass) notNil ifTrue:[ |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4724 |
imageSeqNr := nil. |
1122 | 4725 |
(img := self image) notNil ifTrue: [ |
1900 | 4726 |
self updateColorsFromImage:img. |
574 | 4727 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4728 |
self updateLabelsAndHistory. |
1054 | 4729 |
] ifFalse: [ |
4730 |
self updateForNoImage |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4731 |
]. |
449 | 4732 |
] |
400 | 4733 |
! |
4734 |
||
767 | 4735 |
doLoadFromFile |
4736 |
"opens a dialog for loading an image from a file" |
|
400 | 4737 |
|
1353 | 4738 |
|img file dir filters| |
4739 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4740 |
imageSeqNr := nil. |
1353 | 4741 |
img := self image. |
4742 |
img notNil ifTrue: [ |
|
4743 |
file := img fileName |
|
4744 |
] ifFalse:[ |
|
4745 |
dir := LastDirectory |
|
4746 |
]. |
|
4747 |
||
4748 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
4749 |
||
4750 |
file notNil ifTrue:[ |
|
4751 |
file := FileSelectionBrowser |
|
4752 |
request:'Load Image From' |
|
4753 |
fileName:file |
|
4754 |
withFileFilters:filters. |
|
4755 |
] ifFalse:[ |
|
4756 |
file := FileSelectionBrowser |
|
4757 |
request:'Load Image From' |
|
4758 |
inDirectory:dir |
|
4759 |
withFileFilters:filters. |
|
4760 |
]. |
|
4761 |
file notNil ifTrue:[ |
|
4762 |
LastDirectory := file asFilename directoryName. |
|
4763 |
self loadFromFile:file |
|
4764 |
] |
|
400 | 4765 |
! |
4766 |
||
767 | 4767 |
doNewImage |
4768 |
"opens a dialog with choices of size and color map for creating a new image" |
|
400 | 4769 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4770 |
|aspects width height cMapString cMapMode cMap imageClass image szString defaultSize| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4771 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4772 |
defaultSize := (self class listOfDefaultSizes includes:'32x32') |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4773 |
ifTrue:['32x32'] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4774 |
ifFalse:[self class listOfDefaultSizes first]. |
767 | 4775 |
|
400 | 4776 |
aspects := IdentityDictionary new |
767 | 4777 |
at:#listOfSizes put: self class listOfDefaultSizes asValue; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4778 |
at:#listOfColorMaps put: self class namesOfColorMaps values asSortedCollection asValue; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4779 |
at:#selectionOfSize put: (LastSizeString ? defaultSize) asValue; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4780 |
at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue; |
400 | 4781 |
yourself. |
4782 |
||
767 | 4783 |
(self openDialogInterface:#dialogSpecForNewImage withBindings:aspects) |
1383 | 4784 |
ifTrue:[ |
4785 |
szString := (aspects at:#selectionOfSize) value. |
|
4786 |
width := 128 min: (Integer readFromString: (szString upTo: $x) onError:[24]). |
|
4787 |
height := 128 min: (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[24]). |
|
400 | 4788 |
|
1637 | 4789 |
cMapString := (aspects at:#selectionOfColorMap) value. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4790 |
cMapMode := self class namesOfColorMaps keyAtEqualValue:cMapString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4791 |
cMap := self class listOfColorMaps at:cMapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4792 |
imageClass := Image implementorForDepth:(cMap size highBit-1). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4793 |
image := imageClass width: width height: height. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4794 |
image bits:(ByteArray new:(image bytesPerRow*height)). |
400 | 4795 |
|
1637 | 4796 |
LastSizeString := szString. |
4797 |
LastColormapMode := cMapString. |
|
4798 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4799 |
(cMapMode startsWith: 'mask') ifTrue:[ |
767 | 4800 |
image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels |
400 | 4801 |
]. |
4802 |
image colorMap: cMap. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4803 |
(imageEditView image: image) notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4804 |
self updateListOfColorsAndColormapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4805 |
self updateLabelsAndHistory. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4806 |
]. |
400 | 4807 |
image fillRectangleX:0 y:0 width:width height:height with:Color white. |
767 | 4808 |
] |
929 | 4809 |
! |
4810 |
||
1682 | 4811 |
doNewImageFromClipboard |
4812 |
|image| |
|
4813 |
||
4814 |
image := imageEditView clipBoard. |
|
4815 |
||
4816 |
(imageEditView image:image) notNil |
|
4817 |
ifTrue:[ |
|
1900 | 4818 |
self updateColorsFromImage:image. |
1682 | 4819 |
self findColorMapMode. |
4820 |
self updateLabelsAndHistory. |
|
4821 |
] |
|
4822 |
! |
|
4823 |
||
929 | 4824 |
grabScreenImage |
4825 |
"let user choose an area and grab that are for editing" |
|
4826 |
||
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4827 |
Processor |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4828 |
addTimedBlock:[ |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4829 |
|image d8image img| |
929 | 4830 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4831 |
imageSeqNr := nil. |
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4832 |
image := Image fromUser. |
1121 | 4833 |
image isNil ifFalse:[ |
4834 |
image depth > 8 ifTrue:[ |
|
1687
f4543a556b89
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1682
diff
changeset
|
4835 |
Error handle:[:ex | |sig| |
1537
e86a686eeba2
class based exceptions - no longer need to send #haltSÃgnal
Claus Gittinger <cg@exept.de>
parents:
1507
diff
changeset
|
4836 |
(sig := ex signal) == HaltInterrupt ifTrue:[ex reject]. |
1122 | 4837 |
sig == Signal noHandlerSignal ifTrue:[ex reject]. |
1121 | 4838 |
|
4839 |
self warn:'Could not convert to depth8 image (too many colors)'. |
|
4840 |
d8image := nil. |
|
4841 |
] do:[ |
|
4842 |
d8image := Depth8Image new. |
|
4843 |
d8image fromImage:image. |
|
4844 |
]. |
|
4845 |
d8image notNil ifTrue:[ |
|
4846 |
image := d8image |
|
4847 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4848 |
]. |
1121 | 4849 |
(imageEditView image:image) notNil ifTrue:[ |
4850 |
self listOfColors contents:(image colorMap). |
|
4851 |
self findColorMapMode. |
|
4852 |
self updateLabelsAndHistory. |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4853 |
] |
1121 | 4854 |
] |
4855 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
4856 |
afterSeconds:1 |
929 | 4857 |
|
4858 |
"Created: / 29.7.1998 / 21:24:42 / cg" |
|
1537
e86a686eeba2
class based exceptions - no longer need to send #haltSÃgnal
Claus Gittinger <cg@exept.de>
parents:
1507
diff
changeset
|
4859 |
"Modified: / 16.11.2001 / 16:21:19 / cg" |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4860 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4861 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4862 |
nextImageInSequence |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4863 |
"display the next image in the image sequence" |
1383 | 4864 |
|img seq frame listOfColors| |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4865 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4866 |
imageEditView releaseUndos. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4867 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4868 |
seq := self image imageSequence. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4869 |
imageSeqNr isNil ifTrue:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4870 |
imageSeqNr := 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4871 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4872 |
imageSeqNr := imageSeqNr + 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4873 |
imageSeqNr > seq size ifTrue:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4874 |
self information:'Back to first image in sequence'. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4875 |
imageSeqNr := 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4876 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4877 |
frame := seq at:imageSeqNr. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4878 |
imageEditView image:(frame image). |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4879 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4880 |
(img := self image) notNil ifTrue:[ |
1383 | 4881 |
listOfColors := self listOfColors. |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4882 |
img colorMap notNil ifTrue:[ |
1383 | 4883 |
listOfColors contents:(img usedColors asSet asOrderedCollection). |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4884 |
] ifFalse:[ |
1383 | 4885 |
listOfColors removeAll. |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4886 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4887 |
self findColorMapMode. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4888 |
self updateLabelsAndHistory. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4889 |
img := img onDevice:device. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4890 |
imageEditView image:img. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4891 |
] ifFalse:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4892 |
self updateForNoImage |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4893 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4894 |
|
400 | 4895 |
! ! |
4896 |
||
1715 | 4897 |
!ImageEditor methodsFor:'user actions-saving'! |
400 | 4898 |
|
767 | 4899 |
doPrint |
4900 |
"prints current image on the current printer" |
|
400 | 4901 |
|
1734 | 4902 |
self withWaitCursorDo:[ |
4903 |
imageEditView print |
|
4904 |
] |
|
400 | 4905 |
! |
4906 |
||
1613 | 4907 |
doSaveButtonImageToFileAs |
4908 |
"opens a dialog for saving current image to a file" |
|
4909 |
||
4910 |
imageEditView saveButtonImageToFileAs. |
|
4911 |
self updateLabelsAndHistory. |
|
4912 |
! |
|
4913 |
||
767 | 4914 |
doSaveImageFile |
4915 |
"saves current image to current file" |
|
400 | 4916 |
|
1481 | 4917 |
imageEditView save. |
400 | 4918 |
! |
4919 |
||
767 | 4920 |
doSaveImageFileAs |
4921 |
"opens a dialog for saving current image to a file" |
|
400 | 4922 |
|
911 | 4923 |
imageEditView saveImageFileAs. |
1481 | 4924 |
self updateLabelsAndHistory. |
400 | 4925 |
! |
4926 |
||
767 | 4927 |
doSaveImageMaskFileAs |
4928 |
"opens a dialog for saving mask of current image to a file" |
|
400 | 4929 |
|
1481 | 4930 |
imageEditView saveImageMaskFileAs. |
400 | 4931 |
! |
4932 |
||
767 | 4933 |
doSaveMethod |
4934 |
"saves current image on current class and selector" |
|
400 | 4935 |
|
911 | 4936 |
imageEditView saveMethod notNil |
400 | 4937 |
ifTrue: |
4938 |
[ |
|
694 | 4939 |
self updateLabelsAndHistory |
400 | 4940 |
] |
4941 |
! |
|
4942 |
||
767 | 4943 |
doSaveMethodAs |
4944 |
"opens a dialog for saving current image on a class and a selector" |
|
400 | 4945 |
|
911 | 4946 |
imageEditView saveMethodAs notNil |
400 | 4947 |
ifTrue: |
4948 |
[ |
|
694 | 4949 |
self updateLabelsAndHistory |
400 | 4950 |
] |
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4951 |
! |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4952 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4953 |
doShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4954 |
"opens a dialog showing the storeString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4955 |
(sometimes useful to embed an image into source code)" |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4956 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4957 |
|img| |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4958 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4959 |
img := imageEditView image. |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4960 |
TextBox openOn:img storeString |
400 | 4961 |
! ! |
4962 |
||
1715 | 4963 |
!ImageEditor methodsFor:'user actions-settings'! |
1353 | 4964 |
|
4965 |
doChangeGridMagnification |
|
4966 |
"change grid magnification" |
|
4967 |
||
4968 |
|box oldGridLimit newGridLimit| |
|
4969 |
||
4970 |
oldGridLimit := imageEditView class gridMagnificationLimit asPoint. |
|
4971 |
||
4972 |
box := EnterBox new. |
|
4973 |
box title:(resources string:'Grid Magnification Limit:'). |
|
4974 |
box okText:(resources string:'OK'). |
|
4975 |
box abortText:(resources string:'Cancel'). |
|
4976 |
box initialText:(oldGridLimit x printString). |
|
4977 |
box showAtPointer. |
|
4978 |
||
4979 |
(box accepted |
|
4980 |
and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil] |
|
4981 |
) ifTrue:[ |
|
4982 |
newGridLimit := (99 min: (2 max:newGridLimit)) asPoint. |
|
4983 |
imageEditView class gridMagnificationLimit:newGridLimit. |
|
4984 |
imageEditView invalidate |
|
4985 |
] |
|
4986 |
||
4987 |
! ! |
|
4988 |
||
400 | 4989 |
!ImageEditor class methodsFor:'documentation'! |
4990 |
||
4991 |
version |
|
4992 |
^ '$Header$' |
|
4993 |
! ! |