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