author | Claus Gittinger <cg@exept.de> |
Sun, 22 Jan 2012 11:08:08 +0100 | |
changeset 2874 | cd62528801d5 |
parent 2871 | 23c3bb9d51be |
child 2876 | 3c7d06dab802 |
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 |
2767 | 17 |
lastShiftUsedWrap lastGrabbedScreenArea |
18 |
allowedToChangeImageDimensionAndDepth' |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
19 |
classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode |
2796 | 20 |
DefaultRelativeSizes LastURL' |
929 | 21 |
poolDictionaries:'' |
22 |
category:'Interface-UIPainter' |
|
400 | 23 |
! |
24 |
||
25 |
!ImageEditor class methodsFor:'documentation'! |
|
26 |
||
27 |
copyright |
|
28 |
" |
|
767 | 29 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 30 |
All Rights Reserved |
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
405 | 34 |
inclusion of the above copyright notice. This software may not |
400 | 35 |
be provided or otherwise made available to, or used by, any |
405 | 36 |
other person. No title to or ownership of the software is |
400 | 37 |
hereby transferred. |
38 |
" |
|
39 |
! |
|
40 |
||
41 |
documentation |
|
42 |
" |
|
737 | 43 |
Image Editor allows you to create, design, modify or just inspect images. |
400 | 44 |
|
45 |
[start with:] |
|
46 |
ImageEditor open |
|
941 | 47 |
ImageEditor openOnClass:Icon andSelector:#startIcon |
400 | 48 |
|
49 |
[see also:] |
|
50 |
ImageEditView Image |
|
51 |
||
52 |
[author:] |
|
544 | 53 |
Thomas Zwick, eXept Software AG |
1806 | 54 |
Claus Gittinger, eXept Software AG |
400 | 55 |
" |
56 |
! ! |
|
57 |
||
58 |
!ImageEditor class methodsFor:'instance creation'! |
|
59 |
||
1975 | 60 |
openLoadingImageWith:aBlock |
61 |
"opens an Image Editor on anImage" |
|
62 |
||
63 |
|editor| |
|
64 |
||
65 |
editor := self new. |
|
66 |
editor allButOpen. |
|
67 |
aBlock value:editor. |
|
2764 | 68 |
editor openWindow. |
69 |
^ editor |
|
1975 | 70 |
! |
71 |
||
400 | 72 |
openModalOnClass: aClass andSelector: aSelector |
1975 | 73 |
"opens a modal Image Editor on aClass and aSelector. |
74 |
Returns the real name of the edited resource method (in case, user changed it)." |
|
75 |
||
76 |
|imageEditor imageEditView className resourceClass resourceSelector| |
|
767 | 77 |
|
400 | 78 |
imageEditor := self new. |
767 | 79 |
|
900 | 80 |
aClass isClass ifTrue: [className := aClass name]. |
81 |
aClass isString ifTrue: [className := aClass]. |
|
903 | 82 |
aClass isNil ifTrue: [className := '']. |
400 | 83 |
|
2764 | 84 |
imageEditor postOpenAction: [ |
85 |
imageEditView := imageEditor imageEditView. |
|
86 |
imageEditor loadFromOrPrepareForClass: aClass andSelector: aSelector |
|
87 |
]. |
|
400 | 88 |
imageEditor openModal. |
89 |
||
1975 | 90 |
resourceClass := imageEditView resourceClass. |
91 |
resourceSelector := imageEditView resourceSelector. |
|
92 |
||
93 |
(resourceClass isNil or:[resourceSelector isNil]) ifTrue:[^ nil]. |
|
94 |
^ Array with:resourceClass with:resourceSelector |
|
1966 | 95 |
|
96 |
" |
|
97 |
self openModalOnClass: self andSelector: #leftMouseKeyIcon |
|
98 |
" |
|
400 | 99 |
! |
100 |
||
2764 | 101 |
openModalOnImage:anImage |
102 |
"opens a modal Image Editor on an image. |
|
103 |
Returns the modified image or nil if unsaved/unchanged" |
|
104 |
||
105 |
|imageEditor imageEditView newImage| |
|
106 |
||
107 |
imageEditor := self new. |
|
2767 | 108 |
imageEditor allowedToChangeImageDimensionAndDepth:false. |
2764 | 109 |
imageEditor postOpenAction: [ |
110 |
imageEditView := imageEditor imageEditView. |
|
111 |
imageEditor loadFromImage: anImage |
|
112 |
]. |
|
113 |
imageEditor openModal. |
|
114 |
||
2766 | 115 |
newImage := imageEditor savedImage. |
2764 | 116 |
^ newImage |
117 |
! |
|
118 |
||
1966 | 119 |
openOnClass:aClass andSelector:aSelector |
120 |
"opens an Image Editor on aClass and aSelector" |
|
400 | 121 |
|
2764 | 122 |
self openLoadingImageWith:[:editor | |
123 |
editor loadFromClass:aClass theNonMetaclass andSelector:aSelector. |
|
124 |
] |
|
1057 | 125 |
|
1966 | 126 |
" |
127 |
self openOnClass:self andSelector:#leftMouseKeyIcon |
|
128 |
self openOnClass:self andSelector:nil |
|
129 |
" |
|
130 |
||
1057 | 131 |
"Modified: / 16.3.1999 / 21:33:49 / cg" |
400 | 132 |
! |
133 |
||
1966 | 134 |
openOnFile:aFileName |
135 |
"opens an Image Editor on aFileName" |
|
400 | 136 |
|
2764 | 137 |
self openLoadingImageWith:[:editor | |
138 |
editor loadFromFile:aFileName. |
|
139 |
] |
|
1057 | 140 |
|
1966 | 141 |
" |
1975 | 142 |
self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' |
1966 | 143 |
" |
144 |
||
1057 | 145 |
"Modified: / 16.3.1999 / 21:33:25 / cg" |
400 | 146 |
! |
147 |
||
1966 | 148 |
openOnImage:anImage |
149 |
"opens an Image Editor on anImage" |
|
400 | 150 |
|
2764 | 151 |
self openLoadingImageWith:[:editor | |
152 |
editor loadFromImage: anImage. |
|
153 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
154 |
|
1966 | 155 |
" |
156 |
self openOnImage: Icon startIcon |
|
157 |
" |
|
158 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
159 |
"Modified: / 11.3.1999 / 16:18:33 / cg" |
400 | 160 |
! ! |
161 |
||
162 |
!ImageEditor class methodsFor:'accessing'! |
|
163 |
||
164 |
listOfColorMaps |
|
767 | 165 |
"returns the list of default color maps for a new image" |
400 | 166 |
|
167 |
|colorMap| |
|
898 | 168 |
|
400 | 169 |
(colorMap := OrderedCollection new) |
170 |
add: Color black; |
|
171 |
add: Color white; |
|
172 |
add: Color red; |
|
173 |
add: Color green; |
|
174 |
add: Color blue; |
|
175 |
add: Color cyan; |
|
176 |
add: Color yellow; |
|
177 |
add: Color magenta; |
|
898 | 178 |
add: (Color redByte: 127 greenByte: 0 blueByte: 0); |
179 |
add: (Color redByte: 0 greenByte: 127 blueByte: 0); |
|
180 |
add: (Color redByte: 0 greenByte: 0 blueByte: 127); |
|
181 |
add: (Color redByte: 0 greenByte: 127 blueByte: 127); |
|
182 |
add: (Color redByte: 127 greenByte: 127 blueByte: 0); |
|
183 |
add: (Color redByte: 127 greenByte: 0 blueByte: 127); |
|
184 |
add: (Color redByte: 127 greenByte: 127 blueByte: 127); |
|
185 |
add: (Color redByte: 170 greenByte: 170 blueByte: 170). |
|
186 |
||
400 | 187 |
0 to: 5 do: |
188 |
[:r| |
|
189 |
0 to: 5 do: |
|
190 |
[:g| |
|
191 |
0 to: 5 do: |
|
192 |
[:b| |
|
898 | 193 |
colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling) |
400 | 194 |
] |
195 |
] |
|
196 |
]. |
|
197 |
||
198 |
1 to: 25 do: |
|
199 |
[:g| |
|
898 | 200 |
colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling) |
400 | 201 |
]. |
202 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
203 |
^ Dictionary new |
2571 | 204 |
at: #depth32 put:(FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF); |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
205 |
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
|
206 |
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
|
207 |
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
|
208 |
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
|
209 |
at: #depth8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
210 |
at: #masked8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
211 |
at: #depth4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
212 |
at: #masked4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
213 |
at: #depth2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
214 |
at: #masked2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
215 |
at: #depth1 put: (colorMap copyFrom: 1 to: 2); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
216 |
at: #masked1 put: (colorMap copyFrom: 1 to: 2); |
400 | 217 |
yourself |
218 |
! |
|
219 |
||
220 |
listOfDefaultSizes |
|
767 | 221 |
"returns the list of default sizes for a new image" |
400 | 222 |
|
1960 | 223 |
^ #('8x8' '16x16' '22x22' '32x32' '48x48' '64x64') |
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
224 |
|
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
225 |
"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
|
226 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
227 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
228 |
namesOfColorMaps |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
229 |
^ Dictionary new |
2571 | 230 |
at: #depth32 put: '32-plane (rgba)'; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
231 |
at: #depth24 put: '24-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
232 |
at: #masked24 put: '24-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
233 |
at: #depth16 put: '16-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
234 |
at: #masked16 put: '16-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
235 |
at: #depth8 put: ' 8-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
236 |
at: #masked8 put: ' 8-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
237 |
at: #depth4 put: ' 4-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
238 |
at: #masked4 put: ' 4-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
239 |
at: #depth2 put: ' 2-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
240 |
at: #masked2 put: ' 2-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
241 |
at: #depth1 put: ' 1-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
242 |
at: #masked1 put: ' 1-plane + mask' ; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
243 |
yourself |
400 | 244 |
! ! |
245 |
||
460 | 246 |
!ImageEditor class methodsFor:'help specs'! |
247 |
||
1545 | 248 |
flyByHelpSpec |
249 |
<resource: #help> |
|
250 |
||
2871 | 251 |
^super flyByHelpSpec addPairsFrom:(self localHelpTexts) |
252 |
||
253 |
"Modified: / 19-01-2012 / 13:29:48 / cg" |
|
1545 | 254 |
! |
255 |
||
460 | 256 |
helpSpec |
737 | 257 |
"This resource specification was automatically generated |
258 |
by the UIHelpTool of ST/X." |
|
259 |
||
260 |
"Do not manually edit this!! If it is corrupted, |
|
261 |
the UIHelpTool may not be able to read the specification." |
|
460 | 262 |
|
263 |
" |
|
737 | 264 |
UIHelpTool openOnClass:ImageEditor |
460 | 265 |
" |
266 |
||
737 | 267 |
<resource: #help> |
268 |
||
2871 | 269 |
^ super helpSpec addPairsFrom:(self localHelpTexts) |
270 |
||
271 |
"Modified: / 19-01-2012 / 13:29:42 / cg" |
|
272 |
! |
|
273 |
||
274 |
localHelpTexts |
|
275 |
"This resource specification was automatically generated |
|
276 |
by the UIHelpTool of ST/X." |
|
277 |
||
278 |
"Do not manually edit this!! If it is corrupted, |
|
279 |
the UIHelpTool may not be able to read the specification." |
|
280 |
||
281 |
" |
|
282 |
UIHelpTool openOnClass:ImageEditor |
|
283 |
" |
|
284 |
||
285 |
<resource: #help> |
|
286 |
||
287 |
^ #( |
|
288 |
||
289 |
#xdrawModeBox |
|
290 |
'Rectangle' |
|
291 |
||
292 |
#xdrawModeCopy |
|
293 |
'Copy' |
|
294 |
||
295 |
#xdrawModeFill |
|
296 |
'Flood-fill' |
|
297 |
||
298 |
#xdrawModeFilledBox |
|
299 |
'Filled rectangle' |
|
300 |
||
301 |
#xdrawModePaste |
|
302 |
'Paste' |
|
303 |
||
304 |
#xdrawModePasteUnder |
|
305 |
'Paste under' |
|
306 |
||
307 |
#xdrawModePasteWithMask |
|
308 |
'Paste with Mask' |
|
309 |
||
310 |
#xdrawModePoint |
|
311 |
'Point' |
|
312 |
||
313 |
#xfileGrabImage |
|
314 |
'Pick from screen' |
|
315 |
||
316 |
#xfileLoadFromClass |
|
317 |
'Load from method...' |
|
318 |
||
319 |
#xfileLoadFromFile |
|
320 |
'Load from file...' |
|
321 |
||
322 |
#xfileNewImage |
|
323 |
'New image' |
|
324 |
||
325 |
#filePrint |
|
326 |
'Print' |
|
327 |
||
328 |
#xfileSaveAs |
|
329 |
'Save to file...' |
|
330 |
||
331 |
#xfileSaveMaskAs |
|
332 |
'Save mask to file...' |
|
333 |
||
334 |
#xfileSaveMethod |
|
335 |
'Save as method' |
|
336 |
||
337 |
#xfileSaveMethodAs |
|
338 |
'Save as Method...' |
|
339 |
||
340 |
#nextImageInSequence |
|
341 |
'Go to the next image in the animated gif image sequence.' |
|
342 |
||
343 |
#previousImageInSequence |
|
344 |
'Go to the previous image in the animated gif image sequence.' |
|
460 | 345 |
|
346 |
#colorMap |
|
2765 | 347 |
'ColorMap functions' |
929 | 348 |
|
349 |
#colorMap1 |
|
2765 | 350 |
'Convert to depth-1 image' |
929 | 351 |
|
986 | 352 |
#colorMap1M |
2765 | 353 |
'Convert to depth-1 image plus mask' |
986 | 354 |
|
929 | 355 |
#colorMap2 |
2765 | 356 |
'Convert to depth-2 image' |
357 |
||
358 |
#colorMap24 |
|
359 |
'Convert to depth-24 image (rgb)' |
|
929 | 360 |
|
986 | 361 |
#colorMap2M |
2765 | 362 |
'Convert to depth-2 image plus mask' |
363 |
||
364 |
#colorMap32 |
|
365 |
'Convert to depth-32 image (rgba)' |
|
986 | 366 |
|
929 | 367 |
#colorMap4 |
2765 | 368 |
'Convert to depth-4 image' |
929 | 369 |
|
986 | 370 |
#colorMap4M |
2765 | 371 |
'Convert to depth-4 image plus mask' |
986 | 372 |
|
929 | 373 |
#colorMap8 |
2765 | 374 |
'Convert to depth-8 image' |
929 | 375 |
|
376 |
#colorMap8M |
|
2765 | 377 |
'Convert to depth-8 image plus mask' |
2571 | 378 |
|
986 | 379 |
#colorMapTable |
2765 | 380 |
'Shows a list of used colors of the image' |
986 | 381 |
|
929 | 382 |
#compressColormap |
2765 | 383 |
'Remove unneeded entries from the colorMap' |
460 | 384 |
|
1045 | 385 |
#cropAll |
2765 | 386 |
'Find and remove all borders' |
986 | 387 |
|
1045 | 388 |
#cropBottom |
2765 | 389 |
'Find and remove bottom border' |
986 | 390 |
|
1045 | 391 |
#cropLeft |
2765 | 392 |
'Find and remove left border' |
986 | 393 |
|
1045 | 394 |
#cropManual |
986 | 395 |
'Specify border(s) to remove.' |
396 |
||
1045 | 397 |
#cropRight |
2765 | 398 |
'Find and remove right border' |
986 | 399 |
|
1045 | 400 |
#cropTop |
2765 | 401 |
'Find and remove top border' |
487 | 402 |
|
460 | 403 |
#drawModeBox |
2765 | 404 |
'Rectangle Drawing Mode' |
460 | 405 |
|
2375 | 406 |
#drawModeCircle |
2765 | 407 |
'Circle Drawing Mode' |
2375 | 408 |
|
460 | 409 |
#drawModeCopy |
2765 | 410 |
'Area Copy Mode' |
460 | 411 |
|
412 |
#drawModeFill |
|
2765 | 413 |
'Flood Fill Mode' |
460 | 414 |
|
415 |
#drawModeFilledBox |
|
2765 | 416 |
'Filled Rectangle Drawing Mode' |
460 | 417 |
|
418 |
#drawModePaste |
|
2765 | 419 |
'Paste Mode' |
914 | 420 |
|
421 |
#drawModePasteUnder |
|
2765 | 422 |
'Paste-Under Mode' |
1637 | 423 |
|
424 |
#drawModePasteWithMask |
|
2765 | 425 |
'Paste-with-Mask Mode' |
460 | 426 |
|
427 |
#drawModePoint |
|
2765 | 428 |
'Point Drawing Mode' |
2375 | 429 |
|
1639 | 430 |
#drawModeSpecial |
2871 | 431 |
'Special operations (select rectangle, then choose operation)' |
1639 | 432 |
|
2765 | 433 |
#drawModeSpray |
434 |
'Spray Drawing Mode' |
|
435 |
||
460 | 436 |
#editFlipHorizontal |
2765 | 437 |
'Flip the image horizontally' |
460 | 438 |
|
439 |
#editFlipVertical |
|
2765 | 440 |
'Flip the image vertically' |
460 | 441 |
|
442 |
#editMagnifyImage |
|
2765 | 443 |
'Magnify the image' |
460 | 444 |
|
445 |
#editNegate |
|
2765 | 446 |
'Invert the images colors' |
460 | 447 |
|
448 |
#editResize |
|
2765 | 449 |
'Resize the image (preserving the old image)' |
460 | 450 |
|
451 |
#editRotate |
|
2765 | 452 |
'Rotate the image' |
460 | 453 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
454 |
#fileGrabImageFromScreen |
2765 | 455 |
'Pick an image from the screen (specify area)' |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
456 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
457 |
#fileGrabImageFromWindow |
2765 | 458 |
'Pick an image from a window on the screen (click on window)' |
929 | 459 |
|
460 | 460 |
#fileLoadFromClass |
2765 | 461 |
'Select and load an image from a resource method' |
460 | 462 |
|
463 |
#fileLoadFromFile |
|
2765 | 464 |
'Select and load an image from a file' |
460 | 465 |
|
2796 | 466 |
#fileLoadFromURL |
467 |
'Load an image from the net, given its URL' |
|
468 |
||
460 | 469 |
#fileNewImage |
914 | 470 |
'Create a new image' |
460 | 471 |
|
472 |
#filePrint |
|
2765 | 473 |
'Print the image on a postscript printer' |
474 |
||
475 |
#fileSave |
|
476 |
'Save the image' |
|
460 | 477 |
|
478 |
#fileSaveAs |
|
2765 | 479 |
'Save the image to a file' |
480 |
||
481 |
#fileSaveButtonImageAs |
|
482 |
'Save an image of a button with the image to a file (for html use)' |
|
460 | 483 |
|
484 |
#fileSaveMaskAs |
|
2765 | 485 |
'Save the mask of the image to a file' |
1613 | 486 |
|
460 | 487 |
#fileSaveMethod |
2765 | 488 |
'Save the image as resource method in the current class and selector' |
460 | 489 |
|
490 |
#fileSaveMethodAs |
|
2765 | 491 |
'Save the image as resource method in a class' |
460 | 492 |
|
487 | 493 |
#magnificationNumber |
2765 | 494 |
'Shows the current magnification' |
487 | 495 |
|
496 |
#magnifyImageDown |
|
2765 | 497 |
'Decrease magnification' |
487 | 498 |
|
499 |
#magnifyImageUp |
|
2765 | 500 |
'Increase magnification' |
487 | 501 |
|
502 |
#mouseKeyColorMode |
|
2765 | 503 |
'Toggle between left and right mouse button color' |
487 | 504 |
|
505 |
#previewView |
|
2765 | 506 |
'Shows a preview of the image' |
487 | 507 |
|
905 | 508 |
#settingsGridMagnification |
2765 | 509 |
'Change the grid magnification of the edit view' |
905 | 510 |
|
460 | 511 |
) |
2871 | 512 |
|
513 |
"Created: / 19-01-2012 / 13:29:31 / cg" |
|
460 | 514 |
! ! |
515 |
||
737 | 516 |
!ImageEditor class methodsFor:'image specs'! |
517 |
||
2272 | 518 |
circleIcon |
519 |
"This resource specification was automatically generated |
|
520 |
by the ImageEditor of ST/X." |
|
521 |
||
522 |
"Do not manually edit this!! If it is corrupted, |
|
523 |
the ImageEditor may not be able to read the specification." |
|
524 |
||
525 |
" |
|
526 |
self circleIcon inspect |
|
527 |
ImageEditor openOnClass:self andSelector:#circleIcon |
|
528 |
Icon flushCachedIcons |
|
529 |
" |
|
530 |
||
531 |
<resource: #image> |
|
532 |
||
533 |
^Icon |
|
534 |
constantNamed:'ImageEditor class circleIcon' |
|
535 |
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:'@@@@@@N@CF@PDA@PH@ BB@HDA@PD@1 @8@@@@@a') ; yourself); yourself] |
|
536 |
! |
|
537 |
||
1637 | 538 |
copyIcon |
539 |
"This resource specification was automatically generated |
|
540 |
by the ImageEditor of ST/X." |
|
541 |
||
542 |
"Do not manually edit this!! If it is corrupted, |
|
543 |
the ImageEditor may not be able to read the specification." |
|
544 |
||
545 |
" |
|
546 |
self copyIcon inspect |
|
547 |
ImageEditor openOnClass:self andSelector:#copyIcon |
|
548 |
Icon flushCachedIcons |
|
549 |
" |
|
550 |
||
551 |
<resource: #image> |
|
552 |
||
553 |
^Icon |
|
2272 | 554 |
constantNamed:'ImageEditor class copyIcon' |
1975 | 555 |
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 | 556 |
! |
557 |
||
2155 | 558 |
defaultIcon |
559 |
<resource: #programImage> |
|
560 |
||
561 |
^ ToolbarIconLibrary startImageEditorIcon |
|
562 |
! |
|
563 |
||
2871 | 564 |
fillGradientRectIcon |
565 |
"This resource specification was automatically generated |
|
566 |
by the ImageEditor of ST/X." |
|
567 |
||
568 |
"Do not manually edit this!! If it is corrupted, |
|
569 |
the ImageEditor may not be able to read the specification." |
|
570 |
||
571 |
" |
|
572 |
self fillGradientRectIcon inspect |
|
573 |
ImageEditor openOnClass:self andSelector:#fillGradientRectIcon |
|
574 |
Icon flushCachedIcons |
|
575 |
" |
|
576 |
||
577 |
<resource: #image> |
|
578 |
||
579 |
^Icon |
|
580 |
constantNamed:'ImageEditor class fillGradientRectIcon' |
|
581 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ADQDQDQ@@@QDQDQDP@@BH"H"H"@@@"H"H"H @@L3L3L3L@@CL3L3L3@@@QDQDQDP@@DQDQDQD@@@@@@@@@ |
|
582 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 127 0 0 191 0 0 63 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] |
|
583 |
! |
|
584 |
||
585 |
fillHorizontalGradientRectIcon |
|
586 |
"This resource specification was automatically generated |
|
587 |
by the ImageEditor of ST/X." |
|
588 |
||
589 |
"Do not manually edit this!! If it is corrupted, |
|
590 |
the ImageEditor may not be able to read the specification." |
|
591 |
||
592 |
" |
|
593 |
self fillHorizontalGradientRectIcon inspect |
|
594 |
ImageEditor openOnClass:self andSelector:#fillHorizontalGradientRectIcon |
|
595 |
Icon flushCachedIcons |
|
596 |
" |
|
597 |
||
598 |
<resource: #image> |
|
599 |
||
600 |
^Icon |
|
601 |
constantNamed:'ImageEditor class fillHorizontalGradientRectIcon' |
|
602 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@@@@@@@ |
|
603 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 127 0 0 191 0 0 63 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] |
|
604 |
! |
|
605 |
||
1637 | 606 |
fillIcon |
607 |
"This resource specification was automatically generated |
|
608 |
by the ImageEditor of ST/X." |
|
609 |
||
610 |
"Do not manually edit this!! If it is corrupted, |
|
611 |
the ImageEditor may not be able to read the specification." |
|
612 |
||
613 |
" |
|
614 |
self fillIcon inspect |
|
615 |
ImageEditor openOnClass:self andSelector:#fillIcon |
|
616 |
Icon flushCachedIcons |
|
617 |
" |
|
618 |
||
619 |
<resource: #image> |
|
620 |
||
621 |
^Icon |
|
2272 | 622 |
constantNamed:'ImageEditor class fillIcon' |
1975 | 623 |
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 | 624 |
! |
625 |
||
626 |
fillRectIcon |
|
627 |
"This resource specification was automatically generated |
|
628 |
by the ImageEditor of ST/X." |
|
629 |
||
630 |
"Do not manually edit this!! If it is corrupted, |
|
631 |
the ImageEditor may not be able to read the specification." |
|
632 |
||
633 |
" |
|
634 |
self fillRectIcon inspect |
|
635 |
ImageEditor openOnClass:self andSelector:#fillRectIcon |
|
636 |
Icon flushCachedIcons |
|
637 |
" |
|
638 |
||
639 |
<resource: #image> |
|
640 |
||
641 |
^Icon |
|
2272 | 642 |
constantNamed:'ImageEditor class fillRectIcon' |
643 |
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] |
|
1637 | 644 |
! |
645 |
||
2871 | 646 |
fillVerticalGradientRectIcon |
647 |
"This resource specification was automatically generated |
|
648 |
by the ImageEditor of ST/X." |
|
649 |
||
650 |
"Do not manually edit this!! If it is corrupted, |
|
651 |
the ImageEditor may not be able to read the specification." |
|
652 |
||
653 |
" |
|
654 |
self fillGradientRectIcon inspect |
|
655 |
ImageEditor openOnClass:self andSelector:#fillGradientRectIcon |
|
656 |
Icon flushCachedIcons |
|
657 |
" |
|
658 |
||
659 |
<resource: #image> |
|
660 |
||
661 |
^Icon |
|
662 |
constantNamed:'ImageEditor class fillGradientRectIcon' |
|
663 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ADQDQDQ@@@QDQDQDP@@BH"H"H"@@@"H"H"H @@L3L3L3L@@CL3L3L3@@@QDQDQDP@@DQDQDQD@@@@@@@@@ |
|
664 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 127 0 0 191 0 0 63 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] |
|
665 |
||
666 |
"Created: / 19-01-2012 / 13:44:51 / cg" |
|
667 |
! |
|
668 |
||
2837 | 669 |
flipHorizontalIcon |
670 |
"This resource specification was automatically generated |
|
671 |
by the ImageEditor of ST/X." |
|
672 |
||
673 |
"Do not manually edit this!! If it is corrupted, |
|
674 |
the ImageEditor may not be able to read the specification." |
|
675 |
||
676 |
" |
|
677 |
self flipHorizontalIcon inspect |
|
678 |
ImageEditor openOnClass:self andSelector:#flipHorizontalIcon |
|
679 |
Icon flushCachedIcons |
|
680 |
" |
|
681 |
||
682 |
<resource: #image> |
|
683 |
||
684 |
^Icon |
|
685 |
constantNamed:'ImageEditor class flipHorizontalIcon' |
|
686 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@A@C?8HP )JC$8_?1??C$8JR !!BC?8@P@@@@@a') ; yourself); yourself] |
|
687 |
! |
|
688 |
||
689 |
flipVerticalIcon |
|
690 |
"This resource specification was automatically generated |
|
691 |
by the ImageEditor of ST/X." |
|
692 |
||
693 |
"Do not manually edit this!! If it is corrupted, |
|
694 |
the ImageEditor may not be able to read the specification." |
|
695 |
||
696 |
" |
|
697 |
self flipVerticalIcon inspect |
|
698 |
ImageEditor openOnClass:self andSelector:#flipVerticalIcon |
|
699 |
Icon flushCachedIcons |
|
700 |
" |
|
701 |
||
702 |
<resource: #image> |
|
703 |
||
704 |
^Icon |
|
705 |
constantNamed:'ImageEditor class flipVerticalIcon' |
|
706 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@C@C?0I9@/4BLPH1A?>BLPH1@/4B^PO?@C@@@a') ; yourself); yourself] |
|
707 |
! |
|
708 |
||
737 | 709 |
leftMouseKeyIcon |
710 |
"This resource specification was automatically generated |
|
711 |
by the ImageEditor of ST/X." |
|
712 |
||
713 |
"Do not manually edit this!! If it is corrupted, |
|
714 |
the ImageEditor may not be able to read the specification." |
|
715 |
||
716 |
" |
|
1405 | 717 |
self leftMouseKeyIcon inspect |
737 | 718 |
ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon |
2272 | 719 |
Icon flushCachedIcons |
737 | 720 |
" |
721 |
||
722 |
<resource: #image> |
|
723 |
||
724 |
^Icon |
|
2272 | 725 |
constantNamed:'ImageEditor class leftMouseKeyIcon' |
726 |
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] |
|
1433 | 727 |
! |
737 | 728 |
|
1637 | 729 |
pasteIcon |
730 |
"This resource specification was automatically generated |
|
731 |
by the ImageEditor of ST/X." |
|
732 |
||
733 |
"Do not manually edit this!! If it is corrupted, |
|
734 |
the ImageEditor may not be able to read the specification." |
|
735 |
||
736 |
" |
|
737 |
self pasteIcon inspect |
|
738 |
ImageEditor openOnClass:self andSelector:#pasteIcon |
|
739 |
Icon flushCachedIcons |
|
740 |
" |
|
741 |
||
742 |
<resource: #image> |
|
743 |
||
744 |
^Icon |
|
2272 | 745 |
constantNamed:'ImageEditor class pasteIcon' |
1975 | 746 |
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& |
747 |
@@@@@@@@@@@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 | 748 |
! |
749 |
||
750 |
pasteUnderIcon |
|
751 |
"This resource specification was automatically generated |
|
752 |
by the ImageEditor of ST/X." |
|
753 |
||
754 |
"Do not manually edit this!! If it is corrupted, |
|
755 |
the ImageEditor may not be able to read the specification." |
|
756 |
||
757 |
" |
|
758 |
self pasteUnderIcon inspect |
|
759 |
ImageEditor openOnClass:self andSelector:#pasteUnderIcon |
|
760 |
Icon flushCachedIcons |
|
761 |
" |
|
762 |
||
763 |
<resource: #image> |
|
764 |
||
765 |
^Icon |
|
2272 | 766 |
constantNamed:'ImageEditor class pasteUnderIcon' |
1975 | 767 |
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& |
768 |
@@@@@@@@@@@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 | 769 |
! |
770 |
||
771 |
pasteWithMaskIcon |
|
772 |
"This resource specification was automatically generated |
|
773 |
by the ImageEditor of ST/X." |
|
774 |
||
775 |
"Do not manually edit this!! If it is corrupted, |
|
776 |
the ImageEditor may not be able to read the specification." |
|
777 |
||
778 |
" |
|
779 |
self pasteWithMaskIcon inspect |
|
780 |
ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon |
|
781 |
Icon flushCachedIcons |
|
782 |
" |
|
783 |
||
784 |
<resource: #image> |
|
785 |
||
786 |
^Icon |
|
2272 | 787 |
constantNamed:'ImageEditor class pasteWithMaskIcon' |
788 |
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& |
|
789 |
@@@@@@@@@@@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 | 790 |
! |
791 |
||
792 |
pointIcon |
|
793 |
"This resource specification was automatically generated |
|
794 |
by the ImageEditor of ST/X." |
|
795 |
||
796 |
"Do not manually edit this!! If it is corrupted, |
|
797 |
the ImageEditor may not be able to read the specification." |
|
798 |
||
799 |
" |
|
800 |
self pointIcon inspect |
|
801 |
ImageEditor openOnClass:self andSelector:#pointIcon |
|
802 |
Icon flushCachedIcons |
|
803 |
" |
|
804 |
||
805 |
<resource: #image> |
|
806 |
||
807 |
^Icon |
|
2272 | 808 |
constantNamed:'ImageEditor class pointIcon' |
1975 | 809 |
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 | 810 |
! |
811 |
||
812 |
rectIcon |
|
813 |
"This resource specification was automatically generated |
|
814 |
by the ImageEditor of ST/X." |
|
815 |
||
816 |
"Do not manually edit this!! If it is corrupted, |
|
817 |
the ImageEditor may not be able to read the specification." |
|
818 |
||
819 |
" |
|
820 |
self rectIcon inspect |
|
821 |
ImageEditor openOnClass:self andSelector:#rectIcon |
|
822 |
Icon flushCachedIcons |
|
823 |
" |
|
824 |
||
825 |
<resource: #image> |
|
826 |
||
827 |
^Icon |
|
2272 | 828 |
constantNamed:'ImageEditor class rectIcon' |
829 |
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] |
|
1637 | 830 |
! |
831 |
||
737 | 832 |
rightMouseKeyIcon |
833 |
"This resource specification was automatically generated |
|
834 |
by the ImageEditor of ST/X." |
|
835 |
||
836 |
"Do not manually edit this!! If it is corrupted, |
|
837 |
the ImageEditor may not be able to read the specification." |
|
838 |
||
839 |
" |
|
1405 | 840 |
self rightMouseKeyIcon inspect |
737 | 841 |
ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon |
2272 | 842 |
Icon flushCachedIcons |
737 | 843 |
" |
844 |
||
845 |
<resource: #image> |
|
846 |
||
847 |
^Icon |
|
2272 | 848 |
constantNamed:'ImageEditor class rightMouseKeyIcon' |
849 |
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 | 850 |
! |
851 |
||
852 |
specialIcon |
|
853 |
"This resource specification was automatically generated |
|
854 |
by the ImageEditor of ST/X." |
|
855 |
||
856 |
"Do not manually edit this!! If it is corrupted, |
|
857 |
the ImageEditor may not be able to read the specification." |
|
858 |
||
859 |
" |
|
860 |
self specialIcon inspect |
|
861 |
ImageEditor openOnClass:self andSelector:#specialIcon |
|
862 |
Icon flushCachedIcons |
|
863 |
" |
|
864 |
||
865 |
<resource: #image> |
|
866 |
||
867 |
^Icon |
|
2272 | 868 |
constantNamed:'ImageEditor class specialIcon' |
869 |
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] |
|
2375 | 870 |
! |
871 |
||
872 |
sprayIcon |
|
873 |
"This resource specification was automatically generated |
|
874 |
by the ImageEditor of ST/X." |
|
875 |
||
876 |
"Do not manually edit this!! If it is corrupted, |
|
877 |
the ImageEditor may not be able to read the specification." |
|
878 |
||
879 |
" |
|
880 |
self sprayIcon inspect |
|
881 |
ImageEditor openOnClass:self andSelector:#sprayIcon |
|
882 |
Icon flushCachedIcons |
|
883 |
" |
|
884 |
||
885 |
<resource: #image> |
|
886 |
||
887 |
^Icon |
|
888 |
constantNamed:'ImageEditor class sprayIcon' |
|
889 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#[4]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@D@@@@@@@DA@@@@@@D@D@@@@@@A@PD@@@@@@A@P@@@@@@@A@P@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
890 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 84 84 84 170 170 170 255 255 255 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@B@@(A)@F*@IPA2 H$@"@BH@H @"@BH@O @@a') ; yourself); yourself] |
|
1433 | 891 |
! ! |
737 | 892 |
|
400 | 893 |
!ImageEditor class methodsFor:'interface specs'! |
894 |
||
1650 | 895 |
changeHLSDialogSpec |
896 |
"This resource specification was automatically generated |
|
897 |
by the UIPainter of ST/X." |
|
898 |
||
899 |
"Do not manually edit this!! If it is corrupted, |
|
900 |
the UIPainter may not be able to read the specification." |
|
901 |
||
902 |
" |
|
903 |
UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec |
|
904 |
ImageEditor new openInterface:#changeHLSDialogSpec |
|
905 |
" |
|
906 |
||
907 |
<resource: #canvas> |
|
908 |
||
909 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
910 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
911 |
name: changeHLSDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
912 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
913 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
914 |
label: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
915 |
name: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
916 |
min: (Point 10 10) |
2438 | 917 |
bounds: (Rectangle 0 0 312 258) |
1650 | 918 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
919 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
920 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
921 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
922 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
923 |
label: 'Hue-Shift:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
924 |
name: 'HueLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
925 |
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
|
926 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
927 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
928 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
929 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
930 |
name: 'HueShiftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
931 |
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
|
932 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
933 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
934 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
935 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
936 |
maxValue: 360 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
937 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
938 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
939 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
940 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
941 |
name: 'HueWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
942 |
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
|
943 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
944 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
945 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
946 |
endlessRotation: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
947 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
948 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
949 |
label: 'Light Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
950 |
name: 'LightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
951 |
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
|
952 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
953 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
954 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
955 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
956 |
name: 'LightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
957 |
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
|
958 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
959 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
960 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
961 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
962 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
963 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
964 |
acceptOnPointerLeave: false |
1650 | 965 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
966 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
967 |
name: 'LightWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
968 |
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
|
969 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
970 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
971 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
972 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
973 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
974 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
975 |
label: 'Saturation Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
976 |
name: 'SaturationLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
977 |
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
|
978 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
979 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
980 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
981 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
982 |
name: 'SaturationEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
983 |
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
|
984 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
985 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
986 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
987 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
988 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
989 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
990 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
991 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
992 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
993 |
name: 'SaturationWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
994 |
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
|
995 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
996 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
997 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
998 |
step: 1 |
1650 | 999 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1000 |
(LabelSpec |
2438 | 1001 |
label: 'Color Shift' |
1002 |
name: 'Label2' |
|
1003 |
layout: (LayoutFrame 5 0 110 0 -15 0.5 132 0) |
|
1004 |
translateLabel: true |
|
1005 |
) |
|
1006 |
(LabelSpec |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1007 |
name: 'HueColorLabel' |
2438 | 1008 |
layout: (LayoutFrame 18 0.0 133 0 -41 0.5 217 0) |
1009 |
level: -1 |
|
1975 | 1010 |
backgroundChannel: hlsColor |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1011 |
translateLabel: true |
1650 | 1012 |
) |
2438 | 1013 |
(LabelSpec |
1014 |
label: 'Preview' |
|
1015 |
name: 'Label3' |
|
1016 |
layout: (LayoutFrame 5 0.5 110 0 -5 1 132 0) |
|
1017 |
translateLabel: true |
|
1018 |
) |
|
1019 |
(LabelSpec |
|
1020 |
name: 'PreviewLabel' |
|
1021 |
layout: (LayoutFrame 36 0.5 133 0 -23 1.0 217 0) |
|
1022 |
level: -1 |
|
1023 |
translateLabel: true |
|
1024 |
labelChannel: previewImageHolder |
|
1025 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1026 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1027 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1028 |
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
|
1029 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1030 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1031 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1032 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1033 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1034 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1035 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1036 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1037 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1038 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1039 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1040 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1041 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1042 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1043 |
extent: (Point 151 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1044 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1045 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1046 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1047 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1048 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1049 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1050 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1051 |
extent: (Point 152 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1052 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1053 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1054 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1055 |
) |
1650 | 1056 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1057 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1058 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1059 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1060 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1061 |
! |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1062 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1063 |
cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1064 |
"This resource specification was automatically generated |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1065 |
by the UIPainter of ST/X." |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1066 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1067 |
"Do not manually edit this!! If it is corrupted, |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1068 |
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
|
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 |
UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1072 |
ImageEditor new openInterface:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1073 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1074 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1075 |
<resource: #canvas> |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1076 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1077 |
^ |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1078 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1079 |
name: cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1080 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1081 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1082 |
label: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1083 |
name: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1084 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1085 |
bounds: (Rectangle 14 46 259 229) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1086 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1087 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1088 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1089 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1090 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1091 |
label: 'Left:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1092 |
name: 'GropLeftLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1093 |
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
|
1094 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1095 |
adjust: right |
1650 | 1096 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1097 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1098 |
name: 'GropLeftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1099 |
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
|
1100 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1101 |
model: left |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1102 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1103 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1104 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1105 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1106 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1107 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1108 |
name: 'GropLeftNowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1109 |
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
|
1110 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1111 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1112 |
model: gropLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1113 |
autoRepeat: true |
1650 | 1114 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1115 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1116 |
label: 'Right:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1117 |
name: 'GropRightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1118 |
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
|
1119 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1120 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1121 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1122 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1123 |
name: 'GropRightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1124 |
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
|
1125 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1126 |
model: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1127 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1128 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1129 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1130 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1131 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1132 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1133 |
name: 'GropRightButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1134 |
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
|
1135 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1136 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1137 |
model: gropRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1138 |
autoRepeat: true |
1650 | 1139 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1140 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1141 |
label: 'Top:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1142 |
name: 'GropTopLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1143 |
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
|
1144 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1145 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1146 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1147 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1148 |
name: 'GropTopEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1149 |
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
|
1150 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1151 |
model: top |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1152 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1153 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1154 |
acceptOnPointerLeave: false |
1650 | 1155 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1156 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1157 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1158 |
name: 'GropTopButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1159 |
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
|
1160 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1161 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1162 |
model: gropTopNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1163 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1164 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1165 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1166 |
label: 'Bottom:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1167 |
name: 'GropBottomLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1168 |
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
|
1169 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1170 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1171 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1172 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1173 |
name: 'GropBottomEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1174 |
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
|
1175 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1176 |
model: bottom |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1177 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1178 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1179 |
acceptOnPointerLeave: false |
1650 | 1180 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1181 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1182 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1183 |
name: 'GropBottomButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1184 |
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
|
1185 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1186 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1187 |
model: gropBottomNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1188 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1189 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1190 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1191 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1192 |
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
|
1193 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1194 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1195 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1196 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1197 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1198 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1199 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1200 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1201 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1202 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1203 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1204 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1205 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1206 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1207 |
extent: (Point 77 22) |
1650 | 1208 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1209 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1210 |
label: 'Apply' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1211 |
name: 'Button3' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1212 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1213 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1214 |
model: applyAction |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1215 |
extent: (Point 78 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1216 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1217 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1218 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1219 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1220 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1221 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1222 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1223 |
extent: (Point 78 22) |
1650 | 1224 |
) |
1225 |
) |
|
1226 |
||
1227 |
) |
|
1228 |
) |
|
1229 |
) |
|
1230 |
||
1231 |
) |
|
1232 |
) |
|
1233 |
! |
|
1234 |
||
767 | 1235 |
dialogSpecForNewImage |
737 | 1236 |
"This resource specification was automatically generated |
1237 |
by the UIPainter of ST/X." |
|
519 | 1238 |
|
737 | 1239 |
"Do not manually edit this!! If it is corrupted, |
1240 |
the UIPainter may not be able to read the specification." |
|
519 | 1241 |
|
1242 |
" |
|
767 | 1243 |
UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage |
1244 |
ImageEditor new openInterface:#dialogSpecForNewImage |
|
519 | 1245 |
" |
1246 |
||
1247 |
<resource: #canvas> |
|
1248 |
||
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1249 |
^ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1250 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1251 |
name: dialogSpecForNewImage |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1252 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1253 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1254 |
label: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1255 |
name: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1256 |
min: (Point 10 10) |
1806 | 1257 |
bounds: (Rectangle 0 0 301 119) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1258 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1259 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1260 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1261 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1262 |
(ViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1263 |
name: 'View' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1264 |
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
|
1265 |
level: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1266 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1267 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1268 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1269 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1270 |
label: 'Size' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1271 |
name: 'framedBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1272 |
layout: (LayoutFrame 1 0.0 7 0.0 0 0.4 76 0) |
1806 | 1273 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1274 |
labelPosition: topLeft |
1806 | 1275 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1276 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1277 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1278 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1279 |
(ComboBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1280 |
name: 'defaultSizesComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1281 |
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
|
1282 |
model: selectionOfSize |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1283 |
type: string |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1284 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1285 |
comboList: listOfDefaultSizes |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1286 |
isFilenameBox: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1287 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1288 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1289 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1290 |
) |
1490 | 1291 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1292 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1293 |
label: 'Color Map' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1294 |
name: 'framedBox2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1295 |
layout: (LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0) |
1806 | 1296 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1297 |
labelPosition: topLeft |
1806 | 1298 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1299 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1300 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1301 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1302 |
(ComboListSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1303 |
name: 'colorMapComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1304 |
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
|
1305 |
model: selectionOfColorMap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1306 |
comboList: listOfColorMaps |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1307 |
useIndex: false |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1308 |
hidePullDownMenuButton: false |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1309 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1310 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1311 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1312 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1313 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1314 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1315 |
|
986 | 1316 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1317 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1318 |
(UISubSpecification |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1319 |
name: 'windowSpecForCommitWithoutChannels' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1320 |
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
|
1321 |
minorKey: windowSpecForCommitWithoutChannels |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1322 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1323 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1324 |
|
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1325 |
) |
986 | 1326 |
) |
1327 |
! |
|
1328 |
||
1557 | 1329 |
shiftDialogSpec |
1330 |
"This resource specification was automatically generated |
|
1331 |
by the UIPainter of ST/X." |
|
1332 |
||
1333 |
"Do not manually edit this!! If it is corrupted, |
|
1334 |
the UIPainter may not be able to read the specification." |
|
1335 |
||
1336 |
" |
|
1337 |
UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec |
|
1338 |
ImageEditor new openInterface:#shiftDialogSpec |
|
1339 |
" |
|
1340 |
||
1341 |
<resource: #canvas> |
|
1342 |
||
1343 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1344 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1345 |
name: shiftDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1346 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1347 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1348 |
label: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1349 |
name: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1350 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1351 |
bounds: (Rectangle 14 46 259 229) |
1557 | 1352 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1353 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1354 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1355 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1356 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1357 |
label: 'Amount:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1358 |
name: 'AmountLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1359 |
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
|
1360 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1361 |
adjust: right |
1557 | 1362 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1363 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1364 |
name: 'AmountEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1365 |
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
|
1366 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1367 |
model: shiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1368 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1369 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1370 |
acceptOnPointerLeave: false |
1557 | 1371 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1372 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1373 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1374 |
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
|
1375 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1376 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1377 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1378 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1379 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1380 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1381 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1382 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1383 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1384 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1385 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1386 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1387 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1388 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1389 |
extent: (Point 118 22) |
1557 | 1390 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1391 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1392 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1393 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1394 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1395 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1396 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1397 |
extent: (Point 118 22) |
1557 | 1398 |
) |
1399 |
) |
|
1400 |
||
1401 |
) |
|
1402 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1403 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1404 |
name: 'upArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1405 |
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
|
1406 |
model: shiftUpNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1407 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1408 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1409 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1410 |
direction: up |
1557 | 1411 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1412 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1413 |
name: 'leftArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1414 |
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
|
1415 |
model: shiftLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1416 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1417 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1418 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1419 |
direction: left |
1557 | 1420 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1421 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1422 |
name: 'rightArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1423 |
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
|
1424 |
model: shiftRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1425 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1426 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1427 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1428 |
direction: right |
1557 | 1429 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1430 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1431 |
name: 'downArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1432 |
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
|
1433 |
model: shiftDownNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1434 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1435 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1436 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1437 |
direction: down |
1557 | 1438 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1439 |
(CheckBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1440 |
label: 'Wrap' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1441 |
name: 'CheckBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1442 |
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
|
1443 |
model: wrap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1444 |
translateLabel: true |
1713 | 1445 |
) |
1557 | 1446 |
) |
1447 |
||
1448 |
) |
|
1449 |
) |
|
1450 |
! |
|
1451 |
||
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1452 |
uncropDialogSpec |
1480 | 1453 |
"This resource specification was automatically generated |
1454 |
by the UIPainter of ST/X." |
|
1796 | 1455 |
|
1480 | 1456 |
"Do not manually edit this!! If it is corrupted, |
1457 |
the UIPainter may not be able to read the specification." |
|
1796 | 1458 |
|
1480 | 1459 |
" |
1796 | 1460 |
UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec |
1461 |
ImageEditor new openInterface:#uncropDialogSpec |
|
1480 | 1462 |
" |
1796 | 1463 |
|
1464 |
<resource: #canvas> |
|
1465 |
||
1466 |
^ |
|
1467 |
#(FullSpec |
|
1468 |
name: uncropDialogSpec |
|
1469 |
window: |
|
1470 |
(WindowSpec |
|
1471 |
label: 'Add Border(s)' |
|
1472 |
name: 'Add Border(s)' |
|
1473 |
min: (Point 10 10) |
|
1474 |
max: (Point 800 478) |
|
1475 |
bounds: (Rectangle 0 0 261 228) |
|
1476 |
) |
|
1477 |
component: |
|
1478 |
(SpecCollection |
|
1479 |
collection: ( |
|
1480 |
(LabelSpec |
|
1481 |
label: 'Left:' |
|
1482 |
name: 'Label1' |
|
1483 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
|
1484 |
translateLabel: true |
|
1485 |
adjust: right |
|
1486 |
) |
|
1487 |
(InputFieldSpec |
|
1488 |
name: 'EntryField1' |
|
1489 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
|
1490 |
model: left |
|
1491 |
type: number |
|
1492 |
acceptOnPointerLeave: false |
|
1493 |
) |
|
1494 |
(LabelSpec |
|
1495 |
label: 'Right:' |
|
1496 |
name: 'Label2' |
|
1497 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
|
1498 |
translateLabel: true |
|
1499 |
adjust: right |
|
1500 |
) |
|
1501 |
(InputFieldSpec |
|
1502 |
name: 'EntryField2' |
|
1503 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
|
1504 |
model: right |
|
1505 |
type: number |
|
1506 |
acceptOnPointerLeave: false |
|
1507 |
) |
|
1508 |
(LabelSpec |
|
1509 |
label: 'Top:' |
|
1510 |
name: 'Label3' |
|
1511 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
|
1512 |
translateLabel: true |
|
1513 |
adjust: right |
|
1514 |
) |
|
1515 |
(InputFieldSpec |
|
1516 |
name: 'EntryField3' |
|
1517 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
|
1518 |
model: top |
|
1519 |
type: number |
|
1520 |
acceptOnPointerLeave: false |
|
1521 |
) |
|
1522 |
(LabelSpec |
|
1523 |
label: 'Bottom:' |
|
1524 |
name: 'Label4' |
|
1525 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
|
1526 |
translateLabel: true |
|
1527 |
adjust: right |
|
1528 |
) |
|
1529 |
(InputFieldSpec |
|
1530 |
name: 'EntryField4' |
|
1531 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
|
1532 |
model: bottom |
|
1533 |
type: number |
|
1534 |
acceptOnPointerLeave: false |
|
1535 |
) |
|
1536 |
(HorizontalPanelViewSpec |
|
1537 |
name: 'HorizontalPanel1' |
|
1538 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
|
1539 |
horizontalLayout: fitSpace |
|
1540 |
verticalLayout: center |
|
1541 |
horizontalSpace: 3 |
|
1542 |
verticalSpace: 3 |
|
1543 |
reverseOrderIfOKAtLeft: true |
|
1544 |
component: |
|
1545 |
(SpecCollection |
|
1546 |
collection: ( |
|
1547 |
(ActionButtonSpec |
|
1548 |
label: 'Cancel' |
|
1549 |
name: 'Button1' |
|
1550 |
translateLabel: true |
|
1551 |
model: cancel |
|
1552 |
extent: (Point 118 22) |
|
1553 |
) |
|
1554 |
(ActionButtonSpec |
|
1555 |
label: 'OK' |
|
1556 |
name: 'Button2' |
|
1557 |
translateLabel: true |
|
1558 |
model: accept |
|
1559 |
extent: (Point 118 22) |
|
1560 |
) |
|
1561 |
) |
|
1562 |
||
1563 |
) |
|
1564 |
) |
|
1565 |
) |
|
1566 |
||
1567 |
) |
|
1568 |
) |
|
1480 | 1569 |
! |
1570 |
||
767 | 1571 |
windowSpec |
1572 |
"This resource specification was automatically generated |
|
1573 |
by the UIPainter of ST/X." |
|
1574 |
||
1575 |
"Do not manually edit this!! If it is corrupted, |
|
1576 |
the UIPainter may not be able to read the specification." |
|
1577 |
||
1578 |
" |
|
1579 |
UIPainter new openOnClass:ImageEditor andSelector:#windowSpec |
|
1580 |
ImageEditor new openInterface:#windowSpec |
|
1581 |
ImageEditor open |
|
1582 |
" |
|
1583 |
||
1584 |
<resource: #canvas> |
|
1585 |
||
1558 | 1586 |
^ |
1820 | 1587 |
#(FullSpec |
1588 |
name: windowSpec |
|
1589 |
window: |
|
1590 |
(WindowSpec |
|
1591 |
label: 'Image Editor' |
|
1592 |
name: 'Image Editor' |
|
1593 |
min: (Point 400 320) |
|
1594 |
bounds: (Rectangle 0 0 450 350) |
|
1595 |
menu: menu |
|
2155 | 1596 |
icon: defaultIcon |
1558 | 1597 |
) |
1820 | 1598 |
component: |
1599 |
(SpecCollection |
|
1600 |
collection: ( |
|
1601 |
(MenuPanelSpec |
|
1602 |
name: 'menuToolbarView' |
|
1603 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1604 |
style: (FontDescription helvetica medium roman 10) |
|
1605 |
menu: menuToolbar |
|
1606 |
showSeparatingLines: true |
|
1558 | 1607 |
) |
1820 | 1608 |
(VariableHorizontalPanelSpec |
1998 | 1609 |
name: 'mainPanel' |
1820 | 1610 |
layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
1611 |
snapMode: both |
|
1843 | 1612 |
barLevel: 0 |
1820 | 1613 |
component: |
1614 |
(SpecCollection |
|
1615 |
collection: ( |
|
1616 |
(ViewSpec |
|
1617 |
name: 'leftView' |
|
1618 |
level: 1 |
|
1619 |
component: |
|
1620 |
(SpecCollection |
|
1621 |
collection: ( |
|
1622 |
(VariableVerticalPanelSpec |
|
1623 |
name: 'verticalPanel' |
|
1624 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1625 |
level: 0 |
|
1626 |
snapMode: both |
|
1627 |
component: |
|
1628 |
(SpecCollection |
|
1629 |
collection: ( |
|
1630 |
(ViewSpec |
|
1631 |
name: 'View1' |
|
1632 |
component: |
|
1633 |
(SpecCollection |
|
1634 |
collection: ( |
|
1635 |
(MenuPanelSpec |
|
1636 |
name: 'MouseButtonColorToolBar' |
|
1637 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
1638 |
level: 0 |
|
1639 |
menu: menuMouseButtonColors |
|
1558 | 1640 |
) |
1820 | 1641 |
(DataSetSpec |
1642 |
name: 'colorDataSetView' |
|
1643 |
layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
1644 |
activeHelpKey: colorMapTable |
|
1645 |
style: (FontDescription helvetica medium roman 10) |
|
1646 |
model: selectionOfColor |
|
1647 |
menu: colorMapMenu |
|
1648 |
hasHorizontalScrollBar: true |
|
1649 |
hasVerticalScrollBar: true |
|
1650 |
miniScrollerHorizontal: true |
|
1651 |
miniScrollerVertical: true |
|
1652 |
dataList: listOfColors |
|
1653 |
has3Dseparators: true |
|
2174 | 1654 |
doubleClickSelector: doubleClickOnColor: |
1900 | 1655 |
columnHolder: colorTableColumns |
1820 | 1656 |
verticalSpacing: 1 |
1657 |
columnAdaptor: colorColumnAdaptor |
|
767 | 1658 |
) |
1558 | 1659 |
) |
1660 |
||
1661 |
) |
|
1662 |
) |
|
1820 | 1663 |
(ArbitraryComponentSpec |
1664 |
name: 'imagePreView' |
|
1665 |
activeHelpKey: previewView |
|
1666 |
menu: previewMenu |
|
1667 |
hasHorizontalScrollBar: true |
|
1668 |
hasVerticalScrollBar: true |
|
2728 | 1669 |
miniScrollerHorizontal: false |
1670 |
miniScrollerVertical: false |
|
1820 | 1671 |
hasBorder: false |
1672 |
component: ImageView |
|
767 | 1673 |
) |
1558 | 1674 |
) |
1675 |
||
767 | 1676 |
) |
1820 | 1677 |
handles: (Any 0.5 1.0) |
767 | 1678 |
) |
1558 | 1679 |
) |
1680 |
||
767 | 1681 |
) |
1558 | 1682 |
) |
1820 | 1683 |
(ViewSpec |
1684 |
name: 'rightView' |
|
1685 |
component: |
|
1686 |
(SpecCollection |
|
1687 |
collection: ( |
|
1688 |
(MenuPanelSpec |
|
1689 |
name: 'ToolBar1' |
|
1690 |
layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0) |
|
1691 |
level: 1 |
|
1692 |
menu: toolsMenuToolbar |
|
1693 |
verticalLayout: true |
|
1694 |
centerItems: true |
|
1695 |
textDefault: true |
|
1558 | 1696 |
) |
1820 | 1697 |
(ViewSpec |
1698 |
name: 'editingView' |
|
1699 |
layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0) |
|
1700 |
level: 1 |
|
1701 |
component: |
|
1702 |
(SpecCollection |
|
1703 |
collection: ( |
|
1704 |
(ArbitraryComponentSpec |
|
1705 |
name: 'imageEditView' |
|
1706 |
layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0) |
|
1707 |
hasHorizontalScrollBar: true |
|
1708 |
hasVerticalScrollBar: true |
|
1709 |
hasBorder: false |
|
1710 |
component: ImageEditView |
|
1637 | 1711 |
) |
1820 | 1712 |
(LabelSpec |
1713 |
name: 'coordLabel' |
|
1714 |
layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0) |
|
1715 |
level: -1 |
|
1716 |
labelChannel: imageInfoHolder |
|
1717 |
resizeForLabel: false |
|
1718 |
adjust: left |
|
1637 | 1719 |
) |
1820 | 1720 |
(ArrowButtonSpec |
1721 |
name: 'magnifyDownButton' |
|
1722 |
layout: (LayoutFrame -80 1 -22 1 -58 1 0 1) |
|
1723 |
activeHelpKey: magnifyImageDown |
|
1724 |
model: doMagnifyDown |
|
2792 | 1725 |
enableChannel: imageIsLoadedHolder |
1820 | 1726 |
isTriggerOnDown: true |
1727 |
direction: left |
|
1637 | 1728 |
) |
1820 | 1729 |
(ArrowButtonSpec |
1730 |
name: 'magnifyUpButton' |
|
1731 |
layout: (LayoutFrame -24 1 -22 1 -2 1 0 1) |
|
1732 |
activeHelpKey: magnifyImageUp |
|
1733 |
model: doMagnifyUp |
|
2792 | 1734 |
enableChannel: imageIsLoadedHolder |
1820 | 1735 |
isTriggerOnDown: true |
1736 |
direction: right |
|
1637 | 1737 |
) |
1820 | 1738 |
(InputFieldSpec |
1739 |
name: 'magnificationInputField' |
|
1740 |
layout: (LayoutFrame -57 1 -22 1 -26 1 0 1) |
|
1741 |
activeHelpKey: magnificationNumber |
|
2792 | 1742 |
enableChannel: imageIsLoadedHolder |
1987 | 1743 |
model: magnificationHolder |
1820 | 1744 |
type: numberInRange |
1975 | 1745 |
acceptOnReturn: true |
1746 |
acceptOnTab: true |
|
1820 | 1747 |
numChars: 2 |
1748 |
minValue: 1 |
|
1749 |
maxValue: 99 |
|
1975 | 1750 |
acceptOnPointerLeave: true |
1637 | 1751 |
) |
1752 |
) |
|
1753 |
||
1754 |
) |
|
1558 | 1755 |
) |
1756 |
) |
|
1757 |
||
1758 |
) |
|
1759 |
) |
|
1760 |
) |
|
1761 |
||
767 | 1762 |
) |
1843 | 1763 |
handles: (Any 0.288889 1.0) |
1558 | 1764 |
) |
1820 | 1765 |
(UISubSpecification |
1766 |
name: 'infoBarSubSpec' |
|
1767 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
1768 |
majorKey: ToolApplicationModel |
|
1769 |
minorKey: windowSpecForInfoBar |
|
1558 | 1770 |
) |
1771 |
) |
|
1772 |
||
1773 |
) |
|
767 | 1774 |
) |
2792 | 1775 |
|
1776 |
"Modified: / 04-07-2010 / 10:18:33 / cg" |
|
519 | 1777 |
! ! |
1778 |
||
1779 |
!ImageEditor class methodsFor:'menu specs'! |
|
1780 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1781 |
colorMapMenu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1782 |
"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
|
1783 |
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
|
1784 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1785 |
"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
|
1786 |
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
|
1787 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1788 |
" |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1789 |
MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1790 |
(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
|
1791 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1792 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1793 |
<resource: #menu> |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1794 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1795 |
^ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1796 |
#(Menu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1797 |
( |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1798 |
(MenuItem |
2792 | 1799 |
enabled: hasColormapHolder |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1800 |
label: 'Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1801 |
itemValue: addColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1802 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1803 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1804 |
(MenuItem |
2792 | 1805 |
enabled: hasColormapHolder |
2539 | 1806 |
label: 'Pick and Add Color...' |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1807 |
itemValue: pickAndAddColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1808 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1809 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1810 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1811 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1812 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1813 |
(MenuItem |
2651 | 1814 |
enabled: hasColormapAndColorSelected |
1852 | 1815 |
label: 'Cut Color' |
1816 |
itemValue: cutColorFromColormap |
|
1817 |
translateLabel: true |
|
1818 |
isVisible: false |
|
1819 |
) |
|
1820 |
(MenuItem |
|
2792 | 1821 |
enabled: hasColorSelectedHolder |
1852 | 1822 |
label: 'Copy Color' |
1823 |
itemValue: copyColorFromColormap |
|
1824 |
translateLabel: true |
|
2841 | 1825 |
shortcutKey: Copy |
1852 | 1826 |
) |
1827 |
(MenuItem |
|
2651 | 1828 |
enabled: hasColormapAndColorSelected |
2539 | 1829 |
label: 'Pick and Paste Color...' |
1933 | 1830 |
itemValue: pickAndPasteColor |
1852 | 1831 |
translateLabel: true |
1832 |
) |
|
1833 |
(MenuItem |
|
1834 |
label: 'Paste Color' |
|
1835 |
itemValue: pasteColorIntoColormap |
|
1836 |
translateLabel: true |
|
2841 | 1837 |
shortcutKey: Paste |
1852 | 1838 |
) |
1839 |
(MenuItem |
|
1840 |
label: '-' |
|
1841 |
) |
|
1842 |
(MenuItem |
|
2651 | 1843 |
enabled: hasColormapAndColorSelected |
2539 | 1844 |
label: 'Edit Color...' |
1931 | 1845 |
itemValue: editSelectedColor |
1846 |
translateLabel: true |
|
1847 |
) |
|
1848 |
(MenuItem |
|
2651 | 1849 |
enabled: hasColormapAndColorSelected |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1850 |
label: 'Brighter' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1851 |
itemValue: makeSelectedColorBrighter |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1852 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1853 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1854 |
(MenuItem |
2651 | 1855 |
enabled: hasColormapAndColorSelected |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1856 |
label: 'Darker' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1857 |
itemValue: makeSelectedColorDarker |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1858 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1859 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1860 |
(MenuItem |
2651 | 1861 |
enabled: hasColormapAndColorSelected |
1884 | 1862 |
label: 'Make Gray' |
1863 |
itemValue: makeSelectedColorGray |
|
1864 |
translateLabel: true |
|
1865 |
) |
|
1866 |
(MenuItem |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1867 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1868 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1869 |
(MenuItem |
2841 | 1870 |
enabled: hasColorSelectedHolder |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1871 |
label: 'Inspect Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1872 |
itemValue: inspectColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1873 |
translateLabel: true |
2651 | 1874 |
) |
1875 |
(MenuItem |
|
2792 | 1876 |
enabled: hasColormapHolder |
2651 | 1877 |
label: 'Inspect Colormap' |
1878 |
itemValue: inspectColormap |
|
1879 |
translateLabel: true |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1880 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1881 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1882 |
nil |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1883 |
nil |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1884 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1885 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1886 |
|
400 | 1887 |
menu |
737 | 1888 |
"This resource specification was automatically generated |
1889 |
by the MenuEditor of ST/X." |
|
400 | 1890 |
|
737 | 1891 |
"Do not manually edit this!! If it is corrupted, |
1892 |
the MenuEditor may not be able to read the specification." |
|
400 | 1893 |
|
1894 |
" |
|
1895 |
MenuEditor new openOnClass:ImageEditor andSelector:#menu |
|
1896 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp |
|
1897 |
" |
|
1898 |
||
1899 |
<resource: #menu> |
|
1900 |
||
1124 | 1901 |
^ |
1882 | 1902 |
#(Menu |
1903 |
( |
|
1904 |
(MenuItem |
|
1905 |
label: '&File' |
|
1906 |
translateLabel: true |
|
2196 | 1907 |
submenuChannel: menuFile |
2585 | 1908 |
"/ keepLinkedMenu: true |
1124 | 1909 |
) |
1882 | 1910 |
(MenuItem |
1911 |
label: 'Edit' |
|
1912 |
translateLabel: true |
|
2196 | 1913 |
submenuChannel: menuEdit |
2585 | 1914 |
"/ keepLinkedMenu: true |
1124 | 1915 |
) |
1882 | 1916 |
(MenuItem |
1917 |
label: 'Mode' |
|
1918 |
translateLabel: true |
|
1919 |
submenuChannel: modeMenu |
|
1637 | 1920 |
) |
1882 | 1921 |
(MenuItem |
1924 | 1922 |
label: 'Colors' |
1882 | 1923 |
translateLabel: true |
2585 | 1924 |
submenuChannel: menuColors |
1124 | 1925 |
) |
1882 | 1926 |
(MenuItem |
1927 |
label: 'Settings' |
|
1928 |
translateLabel: true |
|
2585 | 1929 |
submenuChannel: menuSettings |
1124 | 1930 |
) |
1882 | 1931 |
(MenuItem |
1932 |
label: 'History' |
|
1933 |
translateLabel: true |
|
1975 | 1934 |
isVisible: isStandAlone |
1882 | 1935 |
submenuChannel: menuHistory |
1124 | 1936 |
) |
1882 | 1937 |
(MenuItem |
2136
bb10485fa455
support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents:
2125
diff
changeset
|
1938 |
label: 'MENU_Help' |
1882 | 1939 |
translateLabel: true |
2125 | 1940 |
startGroup: conditionalRight |
1882 | 1941 |
submenuChannel: menuHelp |
1124 | 1942 |
) |
1943 |
) |
|
1944 |
nil |
|
1945 |
nil |
|
400 | 1946 |
) |
1947 |
! |
|
1948 |
||
2585 | 1949 |
menuColors |
1950 |
"This resource specification was automatically generated |
|
1951 |
by the MenuEditor of ST/X." |
|
1952 |
||
1953 |
"Do not manually edit this!! If it is corrupted, |
|
1954 |
the MenuEditor may not be able to read the specification." |
|
1955 |
||
1956 |
" |
|
1957 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuColors |
|
1958 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuColors)) startUp |
|
1959 |
" |
|
1960 |
||
1961 |
<resource: #menu> |
|
1962 |
||
1963 |
^ |
|
1964 |
#(Menu |
|
1965 |
( |
|
1966 |
(MenuItem |
|
2767 | 1967 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2585 | 1968 |
label: 'Depth' |
1969 |
translateLabel: true |
|
1970 |
submenu: |
|
1971 |
(Menu |
|
1972 |
( |
|
1973 |
(MenuItem |
|
1974 |
activeHelpKey: colorMap1 |
|
1975 |
label: '1-Plane' |
|
1976 |
itemValue: colorMapMode: |
|
1977 |
translateLabel: true |
|
1978 |
argument: depth1 |
|
1979 |
choice: colorMapMode |
|
1980 |
choiceValue: depth1 |
|
1981 |
) |
|
1982 |
(MenuItem |
|
1983 |
activeHelpKey: colorMap1M |
|
1984 |
label: '1-Plane + Mask' |
|
1985 |
itemValue: colorMapMode: |
|
1986 |
translateLabel: true |
|
1987 |
argument: masked1 |
|
1988 |
choice: colorMapMode |
|
1989 |
choiceValue: masked1 |
|
1990 |
) |
|
1991 |
(MenuItem |
|
1992 |
label: '-' |
|
1993 |
) |
|
1994 |
(MenuItem |
|
1995 |
activeHelpKey: colorMap2 |
|
1996 |
label: '2-Plane' |
|
1997 |
itemValue: colorMapMode: |
|
1998 |
translateLabel: true |
|
1999 |
argument: depth2 |
|
2000 |
choice: colorMapMode |
|
2001 |
choiceValue: depth2 |
|
2002 |
) |
|
2003 |
(MenuItem |
|
2004 |
activeHelpKey: colorMap2M |
|
2005 |
label: '2-Plane + Mask' |
|
2006 |
itemValue: colorMapMode: |
|
2007 |
translateLabel: true |
|
2008 |
argument: masked2 |
|
2009 |
choice: colorMapMode |
|
2010 |
choiceValue: masked2 |
|
2011 |
) |
|
2012 |
(MenuItem |
|
2013 |
label: '-' |
|
2014 |
) |
|
2015 |
(MenuItem |
|
2016 |
activeHelpKey: colorMap4 |
|
2017 |
label: '4-Plane' |
|
2018 |
itemValue: colorMapMode: |
|
2019 |
translateLabel: true |
|
2020 |
argument: depth4 |
|
2021 |
choice: colorMapMode |
|
2022 |
choiceValue: depth4 |
|
2023 |
) |
|
2024 |
(MenuItem |
|
2025 |
activeHelpKey: colorMap4M |
|
2026 |
label: '4-Plane + Mask' |
|
2027 |
itemValue: colorMapMode: |
|
2028 |
translateLabel: true |
|
2029 |
argument: masked4 |
|
2030 |
choice: colorMapMode |
|
2031 |
choiceValue: masked4 |
|
2032 |
) |
|
2033 |
(MenuItem |
|
2034 |
label: '-' |
|
2035 |
) |
|
2036 |
(MenuItem |
|
2037 |
activeHelpKey: colorMap8 |
|
2038 |
label: '8-Plane' |
|
2039 |
itemValue: colorMapMode: |
|
2040 |
translateLabel: true |
|
2041 |
argument: depth8 |
|
2042 |
choice: colorMapMode |
|
2043 |
choiceValue: depth8 |
|
2044 |
) |
|
2045 |
(MenuItem |
|
2046 |
activeHelpKey: colorMap8M |
|
2047 |
label: '8-Plane + Mask' |
|
2048 |
itemValue: colorMapMode: |
|
2049 |
translateLabel: true |
|
2050 |
argument: masked8 |
|
2051 |
choice: colorMapMode |
|
2052 |
choiceValue: masked8 |
|
2053 |
) |
|
2054 |
(MenuItem |
|
2055 |
label: '-' |
|
2056 |
) |
|
2057 |
(MenuItem |
|
2058 |
activeHelpKey: colorMap16 |
|
2059 |
label: '16-Plane' |
|
2060 |
itemValue: colorMapMode: |
|
2061 |
translateLabel: true |
|
2062 |
argument: depth16 |
|
2063 |
choice: colorMapMode |
|
2064 |
choiceValue: depth16 |
|
2065 |
) |
|
2066 |
(MenuItem |
|
2067 |
activeHelpKey: colorMap16M |
|
2068 |
label: '16-Plane + Mask' |
|
2069 |
itemValue: colorMapMode: |
|
2070 |
translateLabel: true |
|
2071 |
argument: masked16 |
|
2072 |
choice: colorMapMode |
|
2073 |
choiceValue: masked16 |
|
2074 |
) |
|
2075 |
(MenuItem |
|
2076 |
label: '-' |
|
2077 |
) |
|
2078 |
(MenuItem |
|
2079 |
activeHelpKey: colorMap24 |
|
2080 |
label: '24-Plane' |
|
2081 |
itemValue: colorMapMode: |
|
2082 |
translateLabel: true |
|
2083 |
argument: depth24 |
|
2084 |
choice: colorMapMode |
|
2085 |
choiceValue: depth24 |
|
2086 |
) |
|
2087 |
(MenuItem |
|
2088 |
activeHelpKey: colorMap24M |
|
2089 |
label: '24-Plane + Mask' |
|
2090 |
itemValue: colorMapMode: |
|
2091 |
translateLabel: true |
|
2092 |
argument: masked24 |
|
2093 |
choice: colorMapMode |
|
2094 |
choiceValue: masked24 |
|
2095 |
) |
|
2096 |
(MenuItem |
|
2097 |
label: '-' |
|
2098 |
) |
|
2099 |
(MenuItem |
|
2100 |
activeHelpKey: colorMap32 |
|
2101 |
label: '32-Plane (rgba)' |
|
2102 |
itemValue: colorMapMode: |
|
2103 |
translateLabel: true |
|
2104 |
argument: depth32 |
|
2105 |
choice: colorMapMode |
|
2106 |
choiceValue: depth32 |
|
2107 |
) |
|
2108 |
) |
|
2109 |
nil |
|
2110 |
nil |
|
2111 |
) |
|
2112 |
) |
|
2113 |
(MenuItem |
|
2792 | 2114 |
enabled: imageIsLoadedHolder |
2585 | 2115 |
label: 'ColorMap' |
2116 |
translateLabel: true |
|
2117 |
submenu: |
|
2118 |
(Menu |
|
2119 |
( |
|
2120 |
(MenuItem |
|
2121 |
activeHelpKey: compressColormap |
|
2792 | 2122 |
enabled: hasColormapHolder |
2585 | 2123 |
label: 'Compress Colormap' |
2826 | 2124 |
itemValue: #'menu_compressColorMap' |
2585 | 2125 |
translateLabel: true |
2126 |
) |
|
2127 |
(MenuItem |
|
2792 | 2128 |
enabled: hasColormapHolder |
2585 | 2129 |
label: 'Sort Colormap' |
2826 | 2130 |
itemValue: #'menu_sortColorMap' |
2585 | 2131 |
translateLabel: true |
2132 |
) |
|
2133 |
(MenuItem |
|
2134 |
label: 'Reduce Number of Colors by Rounding...' |
|
2135 |
itemValue: reduceNumberOfColors2 |
|
2136 |
translateLabel: true |
|
2137 |
) |
|
2138 |
(MenuItem |
|
2139 |
label: 'Reduce Number of Colors by Masking Bits...' |
|
2140 |
itemValue: reduceNumberOfColors |
|
2141 |
translateLabel: true |
|
2142 |
) |
|
2143 |
(MenuItem |
|
2144 |
label: 'Dither to Depth...' |
|
2145 |
itemValue: ditherToDepth |
|
2146 |
translateLabel: true |
|
2147 |
) |
|
2148 |
(MenuItem |
|
2149 |
label: '-' |
|
2150 |
) |
|
2151 |
(MenuItem |
|
2792 | 2152 |
enabled: imageIsLoadedHolder |
2585 | 2153 |
label: 'Brighten' |
2154 |
itemValue: doBrightenImage |
|
2155 |
translateLabel: true |
|
2156 |
) |
|
2157 |
(MenuItem |
|
2792 | 2158 |
enabled: imageIsLoadedHolder |
2585 | 2159 |
label: 'Darken' |
2160 |
itemValue: doDarkenImage |
|
2161 |
translateLabel: true |
|
2162 |
) |
|
2652 | 2163 |
(MenuItem |
2792 | 2164 |
enabled: imageIsLoadedHolder |
2652 | 2165 |
label: 'Invert' |
2166 |
itemValue: doNegativeImage |
|
2167 |
translateLabel: true |
|
2168 |
) |
|
2585 | 2169 |
) |
2170 |
nil |
|
2171 |
nil |
|
2172 |
) |
|
2173 |
) |
|
2174 |
(MenuItem |
|
2792 | 2175 |
enabled: imageIsLoadedHolder |
2585 | 2176 |
label: 'Process' |
2177 |
translateLabel: true |
|
2178 |
submenu: |
|
2179 |
(Menu |
|
2180 |
( |
|
2181 |
(MenuItem |
|
2182 |
label: 'Make GrayScale' |
|
2183 |
itemValue: makeGrayScaleImage |
|
2184 |
translateLabel: true |
|
2185 |
) |
|
2186 |
(MenuItem |
|
2826 | 2187 |
enabled: allowedToChangeImageDimensionAndDepth |
2585 | 2188 |
label: 'Make dithered 8Bit Palette' |
2189 |
itemValue: makeDitheredPaletteImage |
|
2190 |
translateLabel: true |
|
2191 |
isVisible: false |
|
2192 |
) |
|
2193 |
(MenuItem |
|
2826 | 2194 |
label: 'Make Inverse' |
2195 |
itemValue: makeInverse |
|
2196 |
translateLabel: true |
|
2197 |
) |
|
2198 |
(MenuItem |
|
2199 |
label: '-' |
|
2200 |
) |
|
2201 |
(MenuItem |
|
2202 |
label: 'Make Slightly Brighter' |
|
2203 |
itemValue: makeSlightlyBrighter |
|
2204 |
translateLabel: true |
|
2205 |
) |
|
2206 |
(MenuItem |
|
2207 |
label: 'Make Slightly Darker' |
|
2208 |
itemValue: makeSlightlyDarker |
|
2209 |
translateLabel: true |
|
2210 |
) |
|
2211 |
(MenuItem |
|
2212 |
label: '-' |
|
2213 |
) |
|
2214 |
(MenuItem |
|
2585 | 2215 |
label: 'Make Brighter' |
2216 |
itemValue: makeBrighter |
|
2217 |
translateLabel: true |
|
2218 |
) |
|
2219 |
(MenuItem |
|
2220 |
label: 'Make Darker' |
|
2221 |
itemValue: makeDarker |
|
2222 |
translateLabel: true |
|
2223 |
) |
|
2224 |
(MenuItem |
|
2225 |
label: '-' |
|
2226 |
) |
|
2227 |
(MenuItem |
|
2228 |
label: 'Change HLS...' |
|
2229 |
itemValue: changeHLS |
|
2230 |
translateLabel: true |
|
2231 |
) |
|
2232 |
(MenuItem |
|
2233 |
label: 'Colorize...' |
|
2234 |
itemValue: colorize |
|
2235 |
translateLabel: true |
|
2236 |
) |
|
2237 |
) |
|
2238 |
nil |
|
2239 |
nil |
|
2240 |
) |
|
2241 |
) |
|
2242 |
(MenuItem |
|
2792 | 2243 |
enabled: imageIsLoadedHolder |
2585 | 2244 |
label: 'Mask' |
2245 |
translateLabel: true |
|
2246 |
submenu: |
|
2247 |
(Menu |
|
2248 |
( |
|
2249 |
(MenuItem |
|
2250 |
activeHelpKey: copyMask |
|
2251 |
enabled: hasMask |
|
2252 |
label: 'Copy Mask' |
|
2826 | 2253 |
itemValue: #'menu_copyMask' |
2585 | 2254 |
translateLabel: true |
2255 |
) |
|
2256 |
(MenuItem |
|
2257 |
activeHelpKey: pasteMask |
|
2258 |
enabled: hasMask |
|
2259 |
label: 'Paste Mask' |
|
2826 | 2260 |
itemValue: #'menu_pasteMask' |
2585 | 2261 |
translateLabel: true |
2262 |
) |
|
2263 |
(MenuItem |
|
2264 |
enabled: hasMask |
|
2265 |
label: 'Clear Masked Pixels' |
|
2826 | 2266 |
itemValue: #'menu_clearMaskedPixels' |
2652 | 2267 |
translateLabel: true |
2268 |
) |
|
2269 |
(MenuItem |
|
2270 |
enabled: hasMask |
|
2653 | 2271 |
label: 'Clear Colormap Entry for Masked Pixels' |
2826 | 2272 |
itemValue: #'menu_clearColormapEntry0AndMaskedPixels' |
2585 | 2273 |
translateLabel: true |
2274 |
) |
|
2275 |
) |
|
2276 |
nil |
|
2277 |
nil |
|
2278 |
) |
|
2279 |
) |
|
2280 |
) |
|
2281 |
nil |
|
2282 |
nil |
|
2283 |
) |
|
2284 |
! |
|
2285 |
||
2196 | 2286 |
menuEdit |
2287 |
"This resource specification was automatically generated |
|
2288 |
by the MenuEditor of ST/X." |
|
2289 |
||
2290 |
"Do not manually edit this!! If it is corrupted, |
|
2291 |
the MenuEditor may not be able to read the specification." |
|
2292 |
||
2293 |
" |
|
2294 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuEdit |
|
2295 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuEdit)) startUp |
|
2296 |
" |
|
2297 |
||
2298 |
<resource: #menu> |
|
2299 |
||
2300 |
^ |
|
2301 |
#(Menu |
|
2302 |
( |
|
2303 |
(MenuItem |
|
2304 |
activeHelpKey: editUndo |
|
2305 |
enabled: canUndoHolder |
|
2306 |
label: 'Undo' |
|
2307 |
itemValue: doUndo |
|
2308 |
translateLabel: true |
|
2309 |
) |
|
2310 |
(MenuItem |
|
2311 |
label: '-' |
|
2312 |
) |
|
2313 |
(MenuItem |
|
2812 | 2314 |
enabled: imageIsLoadedHolder |
2315 |
label: 'Copy to Clipboard' |
|
2316 |
itemValue: doCopyImageToClipboard |
|
2317 |
translateLabel: true |
|
2318 |
) |
|
2319 |
(MenuItem |
|
2320 |
label: '-' |
|
2321 |
) |
|
2322 |
(MenuItem |
|
2323 |
activeHelpKey: editResize |
|
2767 | 2324 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2325 |
label: 'Resize...' |
2326 |
itemValue: doResizeImage |
|
2327 |
translateLabel: true |
|
2328 |
) |
|
2329 |
(MenuItem |
|
2812 | 2330 |
activeHelpKey: editMagnifyImage |
2767 | 2331 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2332 |
label: 'Magnify...' |
2333 |
itemValue: doMagnifyImage |
|
2334 |
translateLabel: true |
|
2335 |
) |
|
2336 |
(MenuItem |
|
2812 | 2337 |
activeHelpKey: editMagnifyImage |
2767 | 2338 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2339 |
label: 'Magnify By...' |
2340 |
itemValue: doMagnifyImageBy |
|
2341 |
translateLabel: true |
|
2342 |
) |
|
2343 |
(MenuItem |
|
2812 | 2344 |
activeHelpKey: editRotate |
2767 | 2345 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2346 |
label: 'Rotate...' |
2347 |
itemValue: doRotateImage |
|
2348 |
translateLabel: true |
|
2349 |
) |
|
2350 |
(MenuItem |
|
2812 | 2351 |
activeHelpKey: edit3DProjection |
2767 | 2352 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2353 |
label: '3D Projection...' |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2354 |
itemValue: do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2355 |
translateLabel: true |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2356 |
) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2357 |
(MenuItem |
2792 | 2358 |
enabled: imageIsLoadedHolder |
2196 | 2359 |
label: 'Flip' |
2360 |
translateLabel: true |
|
2361 |
submenu: |
|
2362 |
(Menu |
|
2363 |
( |
|
2364 |
(MenuItem |
|
2365 |
activeHelpKey: editFlipVertical |
|
2812 | 2366 |
enabled: imageIsLoadedHolder |
2196 | 2367 |
label: 'Flip - Vertical' |
2368 |
itemValue: doFlipVertical |
|
2369 |
translateLabel: true |
|
2837 | 2370 |
labelImage: (ResourceRetriever ImageEditor flipVerticalIcon 'Flip - Vertical') |
2196 | 2371 |
) |
2372 |
(MenuItem |
|
2373 |
activeHelpKey: editFlipHorizontal |
|
2812 | 2374 |
enabled: imageIsLoadedHolder |
2196 | 2375 |
label: 'Flip - Horizontal' |
2376 |
itemValue: doFlipHorizontal |
|
2377 |
translateLabel: true |
|
2837 | 2378 |
labelImage: (ResourceRetriever ImageEditor flipHorizontalIcon 'Flip - Horizontal') |
2196 | 2379 |
) |
2380 |
) |
|
2381 |
nil |
|
2382 |
nil |
|
2383 |
) |
|
2384 |
) |
|
2385 |
(MenuItem |
|
2386 |
label: '-' |
|
2387 |
) |
|
2388 |
(MenuItem |
|
2767 | 2389 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2390 |
label: 'Crop' |
2391 |
translateLabel: true |
|
2392 |
submenu: |
|
2393 |
(Menu |
|
2394 |
( |
|
2395 |
(MenuItem |
|
2396 |
activeHelpKey: cropManual |
|
2397 |
label: 'Manual...' |
|
2398 |
itemValue: doCropManual |
|
2399 |
translateLabel: true |
|
2400 |
) |
|
2401 |
(MenuItem |
|
2402 |
label: '-' |
|
2403 |
) |
|
2404 |
(MenuItem |
|
2405 |
activeHelpKey: cropAll |
|
2406 |
label: 'All' |
|
2407 |
itemValue: doCropAll |
|
2408 |
translateLabel: true |
|
2409 |
) |
|
2410 |
(MenuItem |
|
2411 |
label: '-' |
|
2412 |
) |
|
2413 |
(MenuItem |
|
2414 |
activeHelpKey: cropLeft |
|
2415 |
label: 'Left' |
|
2416 |
itemValue: doCropLeft |
|
2417 |
translateLabel: true |
|
2418 |
) |
|
2419 |
(MenuItem |
|
2420 |
activeHelpKey: cropRight |
|
2421 |
label: 'Right' |
|
2422 |
itemValue: doCropRight |
|
2423 |
translateLabel: true |
|
2424 |
) |
|
2425 |
(MenuItem |
|
2426 |
activeHelpKey: cropTop |
|
2427 |
label: 'Top' |
|
2428 |
itemValue: doCropTop |
|
2429 |
translateLabel: true |
|
2430 |
) |
|
2431 |
(MenuItem |
|
2432 |
activeHelpKey: cropBottom |
|
2433 |
label: 'Bottom' |
|
2434 |
itemValue: doCropBottom |
|
2435 |
translateLabel: true |
|
2436 |
) |
|
2437 |
) |
|
2438 |
nil |
|
2439 |
nil |
|
2440 |
) |
|
2441 |
) |
|
2442 |
(MenuItem |
|
2812 | 2443 |
activeHelpKey: uncropManual |
2767 | 2444 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2445 |
label: 'Uncrop (Add Border)...' |
2446 |
itemValue: doUnCropManual |
|
2447 |
translateLabel: true |
|
2448 |
) |
|
2449 |
(MenuItem |
|
2812 | 2450 |
activeHelpKey: shiftManual |
2792 | 2451 |
enabled: imageIsLoadedHolder |
2196 | 2452 |
label: 'Shift...' |
2453 |
itemValue: doShiftManual |
|
2454 |
translateLabel: true |
|
2455 |
) |
|
2456 |
(MenuItem |
|
2457 |
label: '-' |
|
2458 |
) |
|
2459 |
(MenuItem |
|
2585 | 2460 |
activeHelpKey: fileEditMask |
2792 | 2461 |
enabled: imageIsLoadedHolder |
2585 | 2462 |
label: 'Edit Mask' |
2463 |
itemValue: doEditMask |
|
2464 |
translateLabel: true |
|
2465 |
) |
|
2466 |
(MenuItem |
|
2792 | 2467 |
enabled: imageIsLoadedHolder |
2196 | 2468 |
label: 'Text...' |
2469 |
itemValue: doInsertTextFromUser |
|
2470 |
translateLabel: true |
|
2471 |
) |
|
2812 | 2472 |
(MenuItem |
2473 |
label: '-' |
|
2474 |
) |
|
2475 |
(MenuItem |
|
2814 | 2476 |
label: 'Animation Sequence' |
2812 | 2477 |
translateLabel: true |
2478 |
submenu: |
|
2479 |
(Menu |
|
2480 |
( |
|
2481 |
(MenuItem |
|
2482 |
enabled: imageHasNextImageHolder |
|
2483 |
label: 'Next in Sequence' |
|
2484 |
itemValue: nextImageInSequence |
|
2485 |
translateLabel: true |
|
2486 |
) |
|
2487 |
(MenuItem |
|
2488 |
enabled: imageHasPreviousImageHolder |
|
2813 | 2489 |
label: 'Previous in Sequence' |
2812 | 2490 |
itemValue: previousImageInSequence |
2491 |
translateLabel: true |
|
2492 |
) |
|
2493 |
(MenuItem |
|
2494 |
label: '-' |
|
2495 |
) |
|
2496 |
(MenuItem |
|
2497 |
enabled: imageHasImageSequenceHolder |
|
2498 |
label: 'Edit each from Sequence' |
|
2499 |
itemValue: editEachImageFromSequence |
|
2500 |
translateLabel: true |
|
2501 |
) |
|
2502 |
) |
|
2503 |
nil |
|
2504 |
nil |
|
2505 |
) |
|
2506 |
) |
|
2196 | 2507 |
) |
2508 |
nil |
|
2509 |
nil |
|
2510 |
) |
|
2511 |
! |
|
2512 |
||
2513 |
menuFile |
|
2514 |
"This resource specification was automatically generated |
|
2515 |
by the MenuEditor of ST/X." |
|
2516 |
||
2517 |
"Do not manually edit this!! If it is corrupted, |
|
2518 |
the MenuEditor may not be able to read the specification." |
|
2519 |
||
2520 |
" |
|
2521 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuFile |
|
2522 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuFile)) startUp |
|
2523 |
" |
|
2524 |
||
2525 |
<resource: #menu> |
|
2526 |
||
2527 |
^ |
|
2528 |
#(Menu |
|
2529 |
( |
|
2530 |
(MenuItem |
|
2531 |
activeHelpKey: fileNewImageEditor |
|
2532 |
label: 'New ImageEditor' |
|
2533 |
itemValue: doNewImageEditor |
|
2534 |
translateLabel: true |
|
2535 |
) |
|
2536 |
(MenuItem |
|
2537 |
activeHelpKey: fileNewImage |
|
2538 |
label: 'New...' |
|
2539 |
itemValue: doNewImage |
|
2540 |
translateLabel: true |
|
2541 |
) |
|
2542 |
(MenuItem |
|
2543 |
activeHelpKey: fileNewImage |
|
2544 |
label: 'New from ClipBoard' |
|
2545 |
itemValue: doNewImageFromClipboard |
|
2546 |
translateLabel: true |
|
2547 |
) |
|
2548 |
(MenuItem |
|
2549 |
label: '-' |
|
2550 |
) |
|
2551 |
(MenuItem |
|
2552 |
activeHelpKey: fileLoadFromClass |
|
2553 |
label: 'Load...' |
|
2554 |
itemValue: doLoadFromClass |
|
2555 |
translateLabel: true |
|
2556 |
) |
|
2557 |
(MenuItem |
|
2558 |
activeHelpKey: fileLoadFromFile |
|
2559 |
label: 'Load from File...' |
|
2560 |
itemValue: doLoadFromFile |
|
2561 |
translateLabel: true |
|
2562 |
) |
|
2563 |
(MenuItem |
|
2796 | 2564 |
activeHelpKey: fileLoadFromURL |
2565 |
label: 'Load from URL...' |
|
2566 |
itemValue: doLoadFromURL |
|
2567 |
translateLabel: true |
|
2568 |
) |
|
2569 |
(MenuItem |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2570 |
label: 'Grab' |
2196 | 2571 |
translateLabel: true |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2572 |
submenu: |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2573 |
(Menu |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2574 |
( |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2575 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2576 |
activeHelpKey: fileGrabImageFromScreen |
2717 | 2577 |
label: 'Grab from Screen Area...' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2578 |
itemValue: grabScreenImage |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2579 |
translateLabel: true |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2580 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2581 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2582 |
activeHelpKey: fileGrabImageFromScreen |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2583 |
enabled: hasLastGrabScreenArea |
2711 | 2584 |
label: 'Grab again from same Screen Area' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2585 |
itemValue: grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2586 |
translateLabel: true |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2587 |
) |
2771 | 2588 |
(MenuItem |
2589 |
label: '-' |
|
2590 |
) |
|
2591 |
(MenuItem |
|
2592 |
activeHelpKey: fileGrabImageFromWindow |
|
2593 |
label: 'Grab from Window...' |
|
2594 |
itemValue: grabWindowImage |
|
2595 |
translateLabel: true |
|
2596 |
) |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2597 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2598 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2599 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2600 |
) |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
2601 |
) |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
2602 |
(MenuItem |
2196 | 2603 |
label: '-' |
2604 |
) |
|
2605 |
(MenuItem |
|
2606 |
activeHelpKey: fileSaveMethod |
|
2607 |
enabled: imageIsLoadedAndClassDefined |
|
2608 |
label: 'Save' |
|
2609 |
itemValue: doSaveMethod |
|
2610 |
translateLabel: true |
|
2611 |
) |
|
2612 |
(MenuItem |
|
2613 |
activeHelpKey: fileSaveMethodAs |
|
2792 | 2614 |
enabled: imageIsLoadedHolder |
2196 | 2615 |
label: 'Save As...' |
2616 |
itemValue: doSaveMethodAs |
|
2617 |
translateLabel: true |
|
2618 |
) |
|
2619 |
(MenuItem |
|
2620 |
activeHelpKey: fileSaveAs |
|
2792 | 2621 |
enabled: imageIsLoadedHolder |
2196 | 2622 |
label: 'Save to File...' |
2623 |
itemValue: doSaveImageFileAs |
|
2624 |
translateLabel: true |
|
2625 |
) |
|
2626 |
(MenuItem |
|
2627 |
activeHelpKey: fileSaveMaskAs |
|
2792 | 2628 |
enabled: imageIsLoadedHolder |
2196 | 2629 |
label: 'Save Mask to File...' |
2630 |
itemValue: doSaveImageMaskFileAs |
|
2631 |
translateLabel: true |
|
2632 |
) |
|
2633 |
(MenuItem |
|
2634 |
activeHelpKey: fileSaveButtonImageAs |
|
2792 | 2635 |
enabled: imageIsLoadedHolder |
2196 | 2636 |
label: 'Save as Button to File...' |
2637 |
itemValue: doSaveButtonImageToFileAs |
|
2638 |
translateLabel: true |
|
2639 |
) |
|
2640 |
(MenuItem |
|
2641 |
label: '-' |
|
2642 |
) |
|
2643 |
(MenuItem |
|
2644 |
activeHelpKey: filePrint |
|
2792 | 2645 |
enabled: imageIsLoadedHolder |
2196 | 2646 |
label: 'Print' |
2647 |
itemValue: doPrint |
|
2648 |
translateLabel: true |
|
2649 |
) |
|
2650 |
(MenuItem |
|
2651 |
label: '-' |
|
2652 |
isVisible: isStandAlone |
|
2653 |
) |
|
2654 |
(MenuItem |
|
2655 |
activeHelpKey: fileBrowseClass |
|
2792 | 2656 |
enabled: hasClassDefinedHolder |
2196 | 2657 |
label: 'Browse Class' |
2658 |
itemValue: doBrowseClass |
|
2659 |
translateLabel: true |
|
2660 |
isVisible: isStandAlone |
|
2661 |
) |
|
2662 |
(MenuItem |
|
2792 | 2663 |
enabled: imageIsLoadedHolder |
2196 | 2664 |
label: 'Inspect Image' |
2665 |
itemValue: doInspectImage |
|
2666 |
translateLabel: true |
|
2667 |
isVisible: isStandAlone |
|
2668 |
) |
|
2669 |
(MenuItem |
|
2585 | 2670 |
activeHelpKey: fileShowStoreString |
2792 | 2671 |
enabled: imageIsLoadedHolder |
2585 | 2672 |
label: 'Show storeString' |
2673 |
itemValue: doShowStoreString |
|
2674 |
translateLabel: true |
|
2675 |
) |
|
2676 |
(MenuItem |
|
2196 | 2677 |
label: '-' |
2678 |
isVisible: isStandAlone |
|
2679 |
) |
|
2680 |
(MenuItem |
|
2681 |
activeHelpKey: fileExit |
|
2682 |
label: 'Exit' |
|
2683 |
itemValue: closeRequest |
|
2684 |
translateLabel: true |
|
2685 |
isVisible: isStandAlone |
|
2686 |
) |
|
2687 |
) |
|
2688 |
nil |
|
2689 |
nil |
|
2690 |
) |
|
2812 | 2691 |
|
2692 |
"Modified: / 21-10-2010 / 14:30:06 / cg" |
|
2196 | 2693 |
! |
2694 |
||
679 | 2695 |
menuMouseButtonColors |
737 | 2696 |
"This resource specification was automatically generated |
2697 |
by the MenuEditor of ST/X." |
|
679 | 2698 |
|
737 | 2699 |
"Do not manually edit this!! If it is corrupted, |
2700 |
the MenuEditor may not be able to read the specification." |
|
679 | 2701 |
|
2702 |
" |
|
2703 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
2704 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
2705 |
" |
|
2706 |
||
2707 |
<resource: #menu> |
|
2708 |
||
2709 |
^ |
|
2710 |
||
2711 |
#(#Menu |
|
2712 |
||
2713 |
#( |
|
2714 |
#(#MenuItem |
|
2715 |
#label: 'Left Mouse Button' |
|
2716 |
#nameKey: #leftMouseKeyButton |
|
2717 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 2718 |
#enabled: #imageIsLoadedHolder |
679 | 2719 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 2720 |
#choice: #mouseKeyColorMode |
2721 |
#choiceValue: 1 |
|
679 | 2722 |
) |
2723 |
#(#MenuItem |
|
2724 |
#label: 'Right Mouse Button' |
|
2725 |
#nameKey: #rightMouseKeyButton |
|
2726 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 2727 |
#enabled: #imageIsLoadedHolder |
679 | 2728 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 2729 |
#choice: #mouseKeyColorMode |
2730 |
#choiceValue: 2 |
|
679 | 2731 |
) |
2732 |
) nil |
|
2733 |
nil |
|
2734 |
) |
|
2792 | 2735 |
|
2736 |
"Modified: / 04-07-2010 / 10:17:37 / cg" |
|
679 | 2737 |
! |
2738 |
||
2585 | 2739 |
menuSettings |
2740 |
"This resource specification was automatically generated |
|
2741 |
by the MenuEditor of ST/X." |
|
2742 |
||
2743 |
"Do not manually edit this!! If it is corrupted, |
|
2744 |
the MenuEditor may not be able to read the specification." |
|
2745 |
||
2746 |
" |
|
2747 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuSettings |
|
2748 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuSettings)) startUp |
|
2749 |
" |
|
2750 |
||
2751 |
<resource: #menu> |
|
2752 |
||
2753 |
^ |
|
2754 |
#(Menu |
|
2755 |
( |
|
2756 |
(MenuItem |
|
2757 |
activeHelpKey: settingsGridMagnification |
|
2758 |
label: 'Grid Magnification Limit...' |
|
2759 |
itemValue: doChangeGridMagnification |
|
2760 |
translateLabel: true |
|
2761 |
) |
|
2762 |
(MenuItem |
|
2763 |
label: 'Pen' |
|
2764 |
translateLabel: true |
|
2765 |
submenu: |
|
2766 |
(Menu |
|
2767 |
( |
|
2768 |
(MenuItem |
|
2769 |
label: '1' |
|
2770 |
itemValue: penWidth: |
|
2771 |
translateLabel: true |
|
2772 |
argument: 1 |
|
2773 |
) |
|
2774 |
(MenuItem |
|
2775 |
label: '5' |
|
2776 |
itemValue: penWidth: |
|
2777 |
translateLabel: true |
|
2778 |
argument: 5 |
|
2779 |
) |
|
2780 |
(MenuItem |
|
2781 |
label: '10' |
|
2782 |
itemValue: penWidth: |
|
2783 |
translateLabel: true |
|
2784 |
argument: 10 |
|
2785 |
) |
|
2786 |
) |
|
2787 |
nil |
|
2788 |
nil |
|
2789 |
) |
|
2790 |
) |
|
2791 |
(MenuItem |
|
2792 |
label: 'Spray' |
|
2793 |
translateLabel: true |
|
2794 |
submenu: |
|
2795 |
(Menu |
|
2796 |
( |
|
2797 |
(MenuItem |
|
2798 |
label: '4' |
|
2799 |
itemValue: spraySpot: |
|
2800 |
translateLabel: true |
|
2801 |
argument: 4 |
|
2802 |
) |
|
2803 |
(MenuItem |
|
2804 |
label: '8' |
|
2805 |
itemValue: spraySpot: |
|
2806 |
translateLabel: true |
|
2807 |
argument: 8 |
|
2808 |
) |
|
2809 |
(MenuItem |
|
2810 |
label: '16' |
|
2811 |
itemValue: spraySpot: |
|
2812 |
translateLabel: true |
|
2813 |
argument: 16 |
|
2814 |
) |
|
2815 |
(MenuItem |
|
2816 |
label: '32' |
|
2817 |
itemValue: spraySpot: |
|
2818 |
translateLabel: true |
|
2819 |
argument: 32 |
|
2820 |
) |
|
2821 |
) |
|
2822 |
nil |
|
2823 |
nil |
|
2824 |
) |
|
2825 |
) |
|
2826 |
) |
|
2827 |
nil |
|
2828 |
nil |
|
2829 |
) |
|
2830 |
! |
|
2831 |
||
400 | 2832 |
menuToolbar |
737 | 2833 |
"This resource specification was automatically generated |
2834 |
by the MenuEditor of ST/X." |
|
400 | 2835 |
|
737 | 2836 |
"Do not manually edit this!! If it is corrupted, |
2837 |
the MenuEditor may not be able to read the specification." |
|
400 | 2838 |
|
2839 |
" |
|
2840 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
2841 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
2842 |
" |
|
2843 |
||
2844 |
<resource: #menu> |
|
2845 |
||
1196 | 2846 |
^ |
1820 | 2847 |
#(Menu |
2848 |
( |
|
2849 |
(MenuItem |
|
2850 |
activeHelpKey: fileNewImage |
|
2851 |
label: 'newImage' |
|
2852 |
itemValue: doNewImage |
|
2853 |
translateLabel: true |
|
2854 |
isButton: true |
|
1883 | 2855 |
labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon) |
1196 | 2856 |
) |
1820 | 2857 |
(MenuItem |
1949 | 2858 |
label: '-' |
2859 |
) |
|
2860 |
(MenuItem |
|
1970 | 2861 |
activeHelpKey: fileLoadFromClass |
2862 |
label: 'loadFromClass' |
|
2863 |
itemValue: doLoadFromClass |
|
2864 |
translateLabel: true |
|
2865 |
isButton: true |
|
1975 | 2866 |
isVisible: isStandAlone |
1970 | 2867 |
submenuChannel: menuHistory |
2868 |
labelImage: (ResourceRetriever XPToolbarIconLibrary loadImageFromMethodIcon) |
|
2869 |
keepLinkedMenu: true |
|
2870 |
) |
|
2871 |
(MenuItem |
|
2567 | 2872 |
activeHelpKey: fileSaveMethodAs |
2792 | 2873 |
enabled: imageIsLoadedHolder |
2567 | 2874 |
label: 'fileSaveMethodAs' |
1970 | 2875 |
itemValue: doSaveMethodAs |
2876 |
translateLabel: true |
|
2877 |
isButton: true |
|
1975 | 2878 |
isVisible: isStandAlone |
1970 | 2879 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon) |
2880 |
) |
|
2881 |
(MenuItem |
|
2882 |
activeHelpKey: fileSaveMethod |
|
2792 | 2883 |
enabled: imageIsLoadedHolder |
1970 | 2884 |
label: 'saveAsMethod' |
2885 |
itemValue: doSaveMethod |
|
2886 |
translateLabel: true |
|
2887 |
isButton: true |
|
1975 | 2888 |
isVisible: isNotStandAlone |
2590 | 2889 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodIcon) |
1970 | 2890 |
) |
2891 |
(MenuItem |
|
2892 |
label: '-' |
|
2893 |
) |
|
2894 |
(MenuItem |
|
1820 | 2895 |
activeHelpKey: fileLoadFromFile |
2896 |
label: 'loadFromFile' |
|
2897 |
itemValue: doLoadFromFile |
|
2898 |
translateLabel: true |
|
2899 |
isButton: true |
|
1884 | 2900 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon) |
1820 | 2901 |
) |
2902 |
(MenuItem |
|
2903 |
activeHelpKey: fileSaveAs |
|
2792 | 2904 |
enabled: imageIsLoadedHolder |
1820 | 2905 |
label: 'saveAsFile' |
2906 |
itemValue: doSaveImageFileAs |
|
2907 |
translateLabel: true |
|
2908 |
isButton: true |
|
1885 | 2909 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon) |
1820 | 2910 |
) |
2911 |
(MenuItem |
|
1949 | 2912 |
label: '-' |
1196 | 2913 |
) |
1820 | 2914 |
(MenuItem |
2915 |
activeHelpKey: editUndo |
|
1987 | 2916 |
enabled: canUndoHolder |
1820 | 2917 |
label: 'Undo' |
2918 |
itemValue: doUndo |
|
2919 |
translateLabel: true |
|
2920 |
isButton: true |
|
1883 | 2921 |
labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
1196 | 2922 |
) |
2812 | 2923 |
(MenuItem |
2924 |
label: '-' |
|
2925 |
isVisible: imageHasImageSequenceHolder |
|
2926 |
) |
|
2927 |
(MenuItem |
|
2928 |
activeHelpKey: previousImageInSequence |
|
2929 |
enabled: imageHasPreviousImageHolder |
|
2930 |
label: 'Previous Image' |
|
2931 |
itemValue: previousImageInSequence |
|
2932 |
translateLabel: true |
|
2933 |
isVisible: imageHasImageSequenceHolder |
|
2934 |
labelImage: (ResourceRetriever ToolbarIconLibrary leftArrow24x24Icon) |
|
2935 |
) |
|
2936 |
(MenuItem |
|
2937 |
activeHelpKey: nextImageInSequence |
|
2938 |
enabled: imageHasNextImageHolder |
|
2939 |
label: 'Next Image' |
|
2940 |
itemValue: nextImageInSequence |
|
2941 |
translateLabel: true |
|
2942 |
isVisible: imageHasImageSequenceHolder |
|
2943 |
labelImage: (ResourceRetriever ToolbarIconLibrary rightArrow24x24Icon) |
|
2944 |
) |
|
1637 | 2945 |
) |
2946 |
nil |
|
2947 |
nil |
|
2948 |
) |
|
2792 | 2949 |
|
2812 | 2950 |
"Modified: / 21-10-2010 / 14:57:32 / cg" |
1637 | 2951 |
! |
2952 |
||
2953 |
modeMenu |
|
2954 |
"This resource specification was automatically generated |
|
2955 |
by the MenuEditor of ST/X." |
|
2956 |
||
2957 |
"Do not manually edit this!! If it is corrupted, |
|
2958 |
the MenuEditor may not be able to read the specification." |
|
2959 |
||
2960 |
" |
|
2961 |
MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu |
|
2962 |
(Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp |
|
2963 |
" |
|
2964 |
||
2965 |
<resource: #menu> |
|
2966 |
||
2967 |
^ |
|
2592 | 2968 |
#(Menu |
2969 |
( |
|
2970 |
(MenuItem |
|
2971 |
activeHelpKey: drawModePoint |
|
2792 | 2972 |
enabled: imageIsLoadedHolder |
2592 | 2973 |
label: 'Point' |
2974 |
translateLabel: true |
|
2975 |
labelImage: (ResourceRetriever ImageEditor pointIcon 'Point') |
|
2976 |
choice: editMode |
|
2977 |
choiceValue: point |
|
2978 |
) |
|
2979 |
(MenuItem |
|
2980 |
activeHelpKey: drawModePoint |
|
2792 | 2981 |
enabled: imageIsLoadedHolder |
2592 | 2982 |
label: 'Spray' |
2983 |
translateLabel: true |
|
2984 |
labelImage: (ResourceRetriever ImageEditor sprayIcon 'Spray') |
|
2985 |
choice: editMode |
|
2986 |
choiceValue: spray |
|
1196 | 2987 |
) |
2592 | 2988 |
(MenuItem |
2989 |
activeHelpKey: drawModeBox |
|
2792 | 2990 |
enabled: imageIsLoadedHolder |
2592 | 2991 |
label: 'Rect' |
2992 |
translateLabel: true |
|
2993 |
labelImage: (ResourceRetriever ImageEditor rectIcon 'Rect') |
|
2994 |
choice: editMode |
|
2995 |
choiceValue: box |
|
1196 | 2996 |
) |
2592 | 2997 |
(MenuItem |
2998 |
activeHelpKey: drawModeFilledBox |
|
2792 | 2999 |
enabled: imageIsLoadedHolder |
2592 | 3000 |
label: 'Filled Rectangle' |
3001 |
translateLabel: true |
|
3002 |
labelImage: (ResourceRetriever ImageEditor fillRectIcon 'Filled Rectangle') |
|
3003 |
choice: editMode |
|
3004 |
choiceValue: filledBox |
|
1196 | 3005 |
) |
2592 | 3006 |
(MenuItem |
3007 |
activeHelpKey: drawModeBox |
|
2792 | 3008 |
enabled: imageIsLoadedHolder |
2592 | 3009 |
label: 'Circle' |
3010 |
translateLabel: true |
|
3011 |
labelImage: (ResourceRetriever ImageEditor circleIcon 'Circle') |
|
3012 |
choice: editMode |
|
3013 |
choiceValue: circle |
|
1196 | 3014 |
) |
2592 | 3015 |
(MenuItem |
3016 |
activeHelpKey: drawModeFill |
|
2792 | 3017 |
enabled: imageIsLoadedHolder |
2592 | 3018 |
label: 'Fill' |
3019 |
translateLabel: true |
|
3020 |
labelImage: (ResourceRetriever ImageEditor fillIcon 'Fill') |
|
3021 |
choice: editMode |
|
3022 |
choiceValue: fill |
|
1196 | 3023 |
) |
2592 | 3024 |
(MenuItem |
3025 |
activeHelpKey: drawModeCopy |
|
2792 | 3026 |
enabled: imageIsLoadedHolder |
2592 | 3027 |
label: 'Copy' |
3028 |
translateLabel: true |
|
3029 |
labelImage: (ResourceRetriever ImageEditor copyIcon 'Copy') |
|
3030 |
choice: editMode |
|
3031 |
choiceValue: copy |
|
3032 |
) |
|
3033 |
(MenuItem |
|
3034 |
activeHelpKey: drawModePaste |
|
2792 | 3035 |
enabled: imageIsLoadedHolder |
2592 | 3036 |
label: 'Paste' |
3037 |
translateLabel: true |
|
3038 |
labelImage: (ResourceRetriever ImageEditor pasteIcon 'Paste') |
|
3039 |
choice: editMode |
|
3040 |
choiceValue: paste |
|
1196 | 3041 |
) |
2592 | 3042 |
(MenuItem |
3043 |
activeHelpKey: drawModePasteUnder |
|
2792 | 3044 |
enabled: imageIsLoadedHolder |
2592 | 3045 |
label: 'Paste Under' |
3046 |
translateLabel: true |
|
3047 |
labelImage: (ResourceRetriever ImageEditor pasteUnderIcon 'Paste Under') |
|
3048 |
choice: editMode |
|
3049 |
choiceValue: pasteUnder |
|
1196 | 3050 |
) |
2592 | 3051 |
(MenuItem |
3052 |
activeHelpKey: drawModePasteWithMask |
|
2792 | 3053 |
enabled: imageIsLoadedHolder |
2592 | 3054 |
label: 'Paste with Mask' |
3055 |
translateLabel: true |
|
3056 |
labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon 'Paste with Mask') |
|
3057 |
choice: editMode |
|
3058 |
choiceValue: pasteWithMask |
|
1579 | 3059 |
) |
2592 | 3060 |
(MenuItem |
3061 |
activeHelpKey: drawModeSpecial |
|
2792 | 3062 |
enabled: imageIsLoadedHolder |
2592 | 3063 |
label: 'Special' |
3064 |
translateLabel: true |
|
3065 |
labelImage: (ResourceRetriever ImageEditor specialIcon 'Special') |
|
3066 |
choice: editMode |
|
3067 |
choiceValue: specialOperation |
|
1411 | 3068 |
) |
1196 | 3069 |
) |
3070 |
nil |
|
3071 |
nil |
|
400 | 3072 |
) |
2792 | 3073 |
|
3074 |
"Modified: / 04-07-2010 / 10:18:08 / cg" |
|
1558 | 3075 |
! |
3076 |
||
3077 |
previewMenu |
|
3078 |
"This resource specification was automatically generated |
|
3079 |
by the MenuEditor of ST/X." |
|
3080 |
||
3081 |
"Do not manually edit this!! If it is corrupted, |
|
3082 |
the MenuEditor may not be able to read the specification." |
|
3083 |
||
3084 |
" |
|
3085 |
MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu |
|
3086 |
(Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp |
|
3087 |
" |
|
3088 |
||
3089 |
<resource: #menu> |
|
3090 |
||
3091 |
^ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3092 |
#(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3093 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3094 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3095 |
label: 'TileMode' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3096 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3097 |
indication: tileModeHolder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3098 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3099 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3100 |
label: '-' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3101 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3102 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3103 |
label: 'Background Color' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3104 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3105 |
submenu: |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3106 |
(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3107 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3108 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3109 |
label: 'Gray' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3110 |
translateLabel: true |
2792 | 3111 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3112 |
choiceValue: nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3113 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3114 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3115 |
label: 'Black' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3116 |
translateLabel: true |
2792 | 3117 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3118 |
choiceValue: black |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3119 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3120 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3121 |
label: 'White' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3122 |
translateLabel: true |
2792 | 3123 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3124 |
choiceValue: white |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3125 |
) |
1774 | 3126 |
(MenuItem |
3127 |
label: '-' |
|
3128 |
) |
|
3129 |
(MenuItem |
|
3130 |
label: 'Red' |
|
3131 |
translateLabel: true |
|
2792 | 3132 |
choice: previewBackgroundColorHolder |
1774 | 3133 |
choiceValue: red |
3134 |
) |
|
3135 |
(MenuItem |
|
3136 |
label: 'Green' |
|
3137 |
translateLabel: true |
|
2792 | 3138 |
choice: previewBackgroundColorHolder |
1774 | 3139 |
choiceValue: green |
3140 |
) |
|
3141 |
(MenuItem |
|
3142 |
label: 'Blue' |
|
3143 |
translateLabel: true |
|
2792 | 3144 |
choice: previewBackgroundColorHolder |
1774 | 3145 |
choiceValue: blue |
3146 |
) |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3147 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3148 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3149 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3150 |
) |
1558 | 3151 |
) |
3152 |
) |
|
3153 |
nil |
|
3154 |
nil |
|
3155 |
) |
|
2792 | 3156 |
|
3157 |
"Modified: / 04-07-2010 / 10:20:09 / cg" |
|
1637 | 3158 |
! |
3159 |
||
3160 |
toolsMenuToolbar |
|
3161 |
"This resource specification was automatically generated |
|
3162 |
by the MenuEditor of ST/X." |
|
3163 |
||
3164 |
"Do not manually edit this!! If it is corrupted, |
|
3165 |
the MenuEditor may not be able to read the specification." |
|
3166 |
||
3167 |
" |
|
3168 |
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar |
|
3169 |
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp |
|
3170 |
" |
|
3171 |
||
3172 |
<resource: #menu> |
|
3173 |
||
3174 |
^ |
|
3175 |
#(#Menu |
|
3176 |
#( |
|
3177 |
#(#MenuItem |
|
3178 |
#activeHelpKey: #drawModePoint |
|
2792 | 3179 |
#enabled: #imageIsLoadedHolder |
1637 | 3180 |
#label: 'Point' |
3181 |
#translateLabel: true |
|
3182 |
#isButton: true |
|
3183 |
#labelImage: #(#ResourceRetriever #ImageEditor #pointIcon) |
|
3184 |
#choice: #editMode |
|
3185 |
#choiceValue: #point |
|
3186 |
) |
|
3187 |
#(#MenuItem |
|
2375 | 3188 |
#activeHelpKey: #drawModeSpray |
2792 | 3189 |
#enabled: #imageIsLoadedHolder |
2375 | 3190 |
#label: 'Spray' |
3191 |
#translateLabel: true |
|
3192 |
#isButton: true |
|
3193 |
#labelImage: #(#ResourceRetriever #ImageEditor #sprayIcon) |
|
3194 |
#choice: #editMode |
|
3195 |
#choiceValue: #spray |
|
3196 |
) |
|
3197 |
#(#MenuItem |
|
1637 | 3198 |
#activeHelpKey: #drawModeBox |
2792 | 3199 |
#enabled: #imageIsLoadedHolder |
1637 | 3200 |
#label: 'Rect' |
3201 |
#translateLabel: true |
|
3202 |
#isButton: true |
|
3203 |
#labelImage: #(#ResourceRetriever #ImageEditor #rectIcon) |
|
3204 |
#choice: #editMode |
|
3205 |
#choiceValue: #box |
|
3206 |
) |
|
3207 |
#(#MenuItem |
|
3208 |
#activeHelpKey: #drawModeFilledBox |
|
2792 | 3209 |
#enabled: #imageIsLoadedHolder |
1637 | 3210 |
#label: 'FillRect' |
3211 |
#translateLabel: true |
|
3212 |
#isButton: true |
|
3213 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillRectIcon) |
|
3214 |
#choice: #editMode |
|
3215 |
#choiceValue: #filledBox |
|
3216 |
) |
|
3217 |
#(#MenuItem |
|
2375 | 3218 |
#activeHelpKey: #drawModeCircle |
2792 | 3219 |
#enabled: #imageIsLoadedHolder |
2375 | 3220 |
#label: 'Circle' |
3221 |
#translateLabel: true |
|
3222 |
#isButton: true |
|
3223 |
#labelImage: #(#ResourceRetriever #ImageEditor #circleIcon) |
|
3224 |
#choice: #editMode |
|
3225 |
#choiceValue: #circle |
|
3226 |
) |
|
3227 |
#(#MenuItem |
|
1637 | 3228 |
#activeHelpKey: #drawModeFill |
2792 | 3229 |
#enabled: #imageIsLoadedHolder |
1637 | 3230 |
#label: 'Fill' |
3231 |
#translateLabel: true |
|
3232 |
#isButton: true |
|
3233 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillIcon) |
|
3234 |
#choice: #editMode |
|
3235 |
#choiceValue: #fill |
|
3236 |
) |
|
3237 |
#(#MenuItem |
|
3238 |
#activeHelpKey: #drawModeCopy |
|
2792 | 3239 |
#enabled: #imageIsLoadedHolder |
1637 | 3240 |
#label: 'Copy' |
3241 |
#translateLabel: true |
|
3242 |
#isButton: true |
|
3243 |
#labelImage: #(#ResourceRetriever #ImageEditor #copyIcon) |
|
3244 |
#choice: #editMode |
|
3245 |
#choiceValue: #copy |
|
3246 |
) |
|
3247 |
#(#MenuItem |
|
3248 |
#activeHelpKey: #drawModePaste |
|
2792 | 3249 |
#enabled: #imageIsLoadedHolder |
1637 | 3250 |
#label: 'Paste' |
3251 |
#translateLabel: true |
|
3252 |
#isButton: true |
|
3253 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteIcon) |
|
3254 |
#choice: #editMode |
|
3255 |
#choiceValue: #paste |
|
3256 |
) |
|
3257 |
#(#MenuItem |
|
3258 |
#activeHelpKey: #drawModePasteUnder |
|
2792 | 3259 |
#enabled: #imageIsLoadedHolder |
1637 | 3260 |
#label: 'Paste Under' |
3261 |
#translateLabel: true |
|
3262 |
#isButton: true |
|
3263 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteUnderIcon) |
|
3264 |
#choice: #editMode |
|
3265 |
#choiceValue: #pasteUnder |
|
3266 |
) |
|
3267 |
#(#MenuItem |
|
3268 |
#activeHelpKey: #drawModePasteWithMask |
|
2792 | 3269 |
#enabled: #imageIsLoadedHolder |
1637 | 3270 |
#label: 'Paste With Mask' |
3271 |
#translateLabel: true |
|
3272 |
#isButton: true |
|
3273 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteWithMaskIcon) |
|
3274 |
#choice: #editMode |
|
3275 |
#choiceValue: #pasteWithMask |
|
3276 |
) |
|
3277 |
#(#MenuItem |
|
3278 |
#activeHelpKey: #drawModeSpecial |
|
2792 | 3279 |
#enabled: #imageIsLoadedHolder |
1637 | 3280 |
#label: 'Special' |
3281 |
#translateLabel: true |
|
3282 |
#isButton: true |
|
3283 |
#labelImage: #(#ResourceRetriever #ImageEditor #specialIcon) |
|
3284 |
#choice: #editMode |
|
3285 |
#choiceValue: #specialOperation |
|
3286 |
) |
|
3287 |
) |
|
3288 |
nil |
|
3289 |
nil |
|
3290 |
) |
|
2792 | 3291 |
|
3292 |
"Modified: / 04-07-2010 / 10:18:24 / cg" |
|
400 | 3293 |
! ! |
3294 |
||
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3295 |
!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
|
3296 |
|
1900 | 3297 |
colorTableColumns |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3298 |
"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
|
3299 |
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
|
3300 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3301 |
"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
|
3302 |
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
|
3303 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3304 |
" |
1975 | 3305 |
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
|
3306 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3307 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3308 |
<resource: #tableColumns> |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3309 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3310 |
^#( |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3311 |
(DataSetColumnSpec |
2174 | 3312 |
activeHelpKey: '' |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3313 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3314 |
rendererType: rowSelector |
2712 | 3315 |
backgroundSelector: theColorItself: |
3316 |
selectedBackgroundSelector: theColorItself: |
|
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3317 |
isResizeable: false |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3318 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3319 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3320 |
label: 'R' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3321 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3322 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3323 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3324 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3325 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3326 |
model: redFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3327 |
writeSelector: redAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3328 |
selectSelector: canSelectRedInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3329 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3330 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3331 |
label: 'G' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3332 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3333 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3334 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3335 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3336 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3337 |
model: greenFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3338 |
writeSelector: greenAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3339 |
selectSelector: canSelectGreenInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3340 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3341 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3342 |
label: 'B' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3343 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3344 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3345 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3346 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3347 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3348 |
model: blueFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3349 |
writeSelector: blueAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3350 |
selectSelector: canSelectBlueInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3351 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3352 |
) |
2174 | 3353 |
|
3354 |
"Modified: / 22-07-2007 / 13:21:57 / cg" |
|
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3355 |
! ! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3356 |
|
400 | 3357 |
!ImageEditor methodsFor:'accessing'! |
3358 |
||
3359 |
image |
|
767 | 3360 |
"returns the current editing image" |
400 | 3361 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3362 |
^ imageEditView image |
400 | 3363 |
! |
3364 |
||
3365 |
postOpenAction: anAction |
|
767 | 3366 |
"sets an action which is evaluated after opening" |
400 | 3367 |
|
3368 |
postOpenAction := anAction |
|
1381 | 3369 |
! |
3370 |
||
3371 |
resourceClass:aClass |
|
3372 |
imageEditView resourceClass:aClass |
|
400 | 3373 |
! ! |
3374 |
||
2767 | 3375 |
!ImageEditor methodsFor:'accessing-behavior'! |
3376 |
||
3377 |
allowedToChangeImageDimensionAndDepth |
|
3378 |
"used to edit an existing image's contents only (Expecco)" |
|
3379 |
||
3380 |
^ allowedToChangeImageDimensionAndDepth ? true |
|
3381 |
! |
|
3382 |
||
3383 |
allowedToChangeImageDimensionAndDepth:aBoolean |
|
3384 |
"used to edit an existing image's contents only (Expecco)" |
|
3385 |
||
3386 |
allowedToChangeImageDimensionAndDepth := aBoolean |
|
3387 |
! ! |
|
3388 |
||
1398 | 3389 |
!ImageEditor methodsFor:'accessing-views'! |
400 | 3390 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3391 |
colorDataSetView |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3392 |
"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
|
3393 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3394 |
^(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
|
3395 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3396 |
"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
|
3397 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3398 |
|
487 | 3399 |
coordLabel |
767 | 3400 |
"returns the view the coord label" |
487 | 3401 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3402 |
^self componentAt: #coordLabel |
487 | 3403 |
! |
3404 |
||
400 | 3405 |
imageEditView |
911 | 3406 |
"returns the view of the image" |
400 | 3407 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3408 |
imageEditView isNil ifTrue:[ |
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3409 |
imageEditView := (self componentAt: #imageEditView) scrolledView. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3410 |
imageEditView addDependent:self. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3411 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3412 |
^ imageEditView |
1345 | 3413 |
|
3414 |
"Modified: / 10.2.2000 / 23:19:20 / cg" |
|
400 | 3415 |
! |
3416 |
||
3417 |
imagePreView |
|
767 | 3418 |
"returns the preview of the image" |
400 | 3419 |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3420 |
|imagePreViewSubViews| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3421 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3422 |
imagePreViewSubViews := (self componentAt: #imagePreView) subViews. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3423 |
|
2043 | 3424 |
"subViews is an empty array at closing image Editor" |
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3425 |
imagePreViewSubViews isEmptyOrNil ifTrue:[ |
2043 | 3426 |
^ nil |
3427 |
]. |
|
3428 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3429 |
^ imagePreViewSubViews first |
475 | 3430 |
! ! |
3431 |
||
400 | 3432 |
!ImageEditor methodsFor:'aspects'! |
3433 |
||
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3434 |
activityInfoHolder |
1987 | 3435 |
^ self infoLabelHolder |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3436 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3437 |
"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
|
3438 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3439 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3440 |
colorColumnAdaptor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3441 |
^ self |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3442 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3443 |
"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
|
3444 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3445 |
|
2792 | 3446 |
hasClassAndSelectorDefinedHolder |
1054 | 3447 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3448 |
|cls| |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3449 |
|
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3450 |
(cls := imageEditView resourceClass) notNil |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3451 |
and:[imageEditView resourceSelector notNil] |
1054 | 3452 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3453 |
|
2792 | 3454 |
"Created: / 04-07-2010 / 10:11:10 / cg" |
3455 |
! |
|
3456 |
||
3457 |
hasClassDefinedHolder |
|
1054 | 3458 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3459 |
imageEditView resourceClass notNil |
1054 | 3460 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3461 |
|
2792 | 3462 |
"Created: / 04-07-2010 / 10:11:47 / cg" |
3463 |
! |
|
3464 |
||
3465 |
hasColorSelectedHolder |
|
3466 |
^ [ self selectedColorIndexOrNil notNil ] |
|
3467 |
||
3468 |
"Created: / 04-07-2010 / 10:12:22 / cg" |
|
2651 | 3469 |
! |
3470 |
||
1008 | 3471 |
hasColormap |
2792 | 3472 |
^ self image notNil and:[self image colorMap notNil] |
3473 |
||
3474 |
"Created: / 30-09-1998 / 23:53:55 / cg" |
|
3475 |
"Modified: / 04-07-2010 / 10:13:26 / cg" |
|
1008 | 3476 |
! |
3477 |
||
2651 | 3478 |
hasColormapAndColorSelected |
2792 | 3479 |
^ [ self hasColormapHolder value and:[self hasColorSelectedHolder value]] |
3480 |
||
3481 |
"Modified: / 04-07-2010 / 10:13:13 / cg" |
|
3482 |
! |
|
3483 |
||
3484 |
hasColormapHolder |
|
3485 |
^ [self hasColormap] |
|
3486 |
||
3487 |
"Created: / 04-07-2010 / 10:13:05 / cg" |
|
3488 |
! |
|
3489 |
||
2812 | 3490 |
imageHasImageSequence |
3491 |
^ self image notNil and:[self image imageSequence notNil] |
|
3492 |
||
3493 |
"Created: / 21-10-2010 / 14:35:45 / cg" |
|
3494 |
! |
|
3495 |
||
3496 |
imageHasImageSequenceHolder |
|
3497 |
|holder| |
|
3498 |
||
3499 |
(holder := builder bindingAt:#imageHasImageSequenceHolder) isNil ifTrue:[ |
|
3500 |
builder aspectAt:#imageHasImageSequenceHolder put:(holder := false asValue). |
|
3501 |
holder value:(self imageHasImageSequence). |
|
3502 |
]. |
|
3503 |
^ holder |
|
3504 |
||
3505 |
"Modified: / 21-10-2010 / 14:36:57 / cg" |
|
3506 |
! |
|
3507 |
||
3508 |
imageHasNextImage |
|
3509 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) < self image imageSequence size ] |
|
3510 |
||
3511 |
"Created: / 21-10-2010 / 14:37:10 / cg" |
|
3512 |
! |
|
3513 |
||
2792 | 3514 |
imageHasNextImageHolder |
2812 | 3515 |
|holder| |
3516 |
||
3517 |
(holder := builder bindingAt:#imageHasNextImageHolder) isNil ifTrue:[ |
|
3518 |
builder aspectAt:#imageHasNextImageHolder put:(holder := false asValue). |
|
3519 |
holder value:(self imageHasNextImage). |
|
3520 |
]. |
|
3521 |
^ holder |
|
3522 |
||
3523 |
"Modified: / 21-10-2010 / 14:37:40 / cg" |
|
3524 |
! |
|
3525 |
||
3526 |
imageHasPreviousImage |
|
3527 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) > 1 ] |
|
3528 |
||
3529 |
"Created: / 21-10-2010 / 14:37:21 / cg" |
|
3530 |
! |
|
3531 |
||
3532 |
imageHasPreviousImageHolder |
|
3533 |
|holder| |
|
3534 |
||
3535 |
(holder := builder bindingAt:#imageHasPreviousImageHolder) isNil ifTrue:[ |
|
3536 |
builder aspectAt:#imageHasPreviousImageHolder put:(holder := false asValue). |
|
3537 |
holder value:(self imageHasPreviousImage). |
|
3538 |
]. |
|
3539 |
^ holder |
|
3540 |
||
3541 |
"Modified: / 21-10-2010 / 14:37:48 / cg" |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
3542 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
3543 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3544 |
imageInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3545 |
|holder| |
2792 | 3546 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3547 |
(holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3548 |
builder aspectAt:#imageInfoHolder put:(holder := '' asValue). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3549 |
]. |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3550 |
^ holder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3551 |
|
2792 | 3552 |
"Modified: / 04-07-2010 / 10:15:14 / cg" |
400 | 3553 |
! |
3554 |
||
2767 | 3555 |
imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
3556 |
"returns whether an image is loaded as value holder" |
|
3557 |
||
3558 |
^ [ |
|
2792 | 3559 |
self imageIsLoadedHolder value |
2767 | 3560 |
and:[ self allowedToChangeImageDimensionAndDepth ] |
3561 |
] |
|
2792 | 3562 |
|
3563 |
"Modified: / 04-07-2010 / 10:15:43 / cg" |
|
2767 | 3564 |
! |
3565 |
||
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3566 |
imageIsLoadedAndClassDefined |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3567 |
"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
|
3568 |
|
2792 | 3569 |
^ [self hasClassAndSelectorDefinedHolder value |
3570 |
and:[self imageIsLoadedHolder value]] |
|
3571 |
||
3572 |
"Created: / 31-07-1998 / 02:04:18 / cg" |
|
3573 |
"Modified: / 04-07-2010 / 10:15:48 / cg" |
|
3574 |
! |
|
3575 |
||
3576 |
imageIsLoadedHolder |
|
3577 |
"returns whether an image is loaded as value holder" |
|
3578 |
||
3579 |
|holder| |
|
3580 |
||
3581 |
(holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
3582 |
builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
3583 |
]. |
|
3584 |
^ holder |
|
3585 |
||
3586 |
"Created: / 04-07-2010 / 10:15:38 / cg" |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3587 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3588 |
|
400 | 3589 |
listOfColors |
1896 | 3590 |
"returns the list of colors" |
3591 |
||
3592 |
|list| |
|
3593 |
||
3594 |
(list := builder bindingAt:#listOfColors) isNil ifTrue:[ |
|
3595 |
builder aspectAt:#listOfColors put:(list := List new). |
|
3596 |
list addDependent:self. |
|
400 | 3597 |
]. |
1896 | 3598 |
^ list |
400 | 3599 |
! |
3600 |
||
1987 | 3601 |
magnificationHolder |
3602 |
"returns current magnification of the image as an AspectAdaptor" |
|
3603 |
||
3604 |
|holder| |
|
3605 |
(holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[ |
|
3606 |
builder aspectAt:#valueOfMagnification put:( |
|
3607 |
holder := AspectAdaptor new subject:self; forAspect:#magnification) |
|
3608 |
]. |
|
3609 |
^ holder |
|
3610 |
! |
|
3611 |
||
2792 | 3612 |
previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3613 |
|holder| |
2792 | 3614 |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3615 |
(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
|
3616 |
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
|
3617 |
holder addDependent:self. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3618 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3619 |
^ holder |
2792 | 3620 |
|
3621 |
"Created: / 04-07-2010 / 10:19:34 / cg" |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3622 |
! |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3623 |
|
400 | 3624 |
selectionOfColor |
1682 | 3625 |
"returns a valueHolder for the current selection of the edit color. |
3626 |
Here, an AspectAdaptor which accesses selectedColorIndex is returned." |
|
400 | 3627 |
|
3628 |
|holder| |
|
1682 | 3629 |
|
400 | 3630 |
(holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[ |
3631 |
builder aspectAt:#selectionOfColor put:( |
|
1682 | 3632 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ). |
400 | 3633 |
]. |
3634 |
^ holder |
|
3635 |
! |
|
3636 |
||
1558 | 3637 |
tileModeHolder |
3638 |
|holder| |
|
2812 | 3639 |
|
1558 | 3640 |
(holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[ |
3641 |
builder aspectAt:#tileModeHolder put:(holder := false asValue). |
|
3642 |
holder addDependent:self. |
|
3643 |
]. |
|
3644 |
^ holder |
|
2812 | 3645 |
|
3646 |
"Modified: / 21-10-2010 / 14:35:24 / cg" |
|
1558 | 3647 |
! |
3648 |
||
400 | 3649 |
valueOfMagnification |
2308 | 3650 |
<resource: #obsolete> |
767 | 3651 |
"returns current magnification of the image as an AspectAdaptor" |
400 | 3652 |
|
1987 | 3653 |
self obsoleteMethodWarning:'stupid method name - use #magnificationHolder'. |
3654 |
^ self magnificationHolder |
|
400 | 3655 |
! ! |
3656 |
||
767 | 3657 |
!ImageEditor methodsFor:'change & update'! |
3658 |
||
3659 |
findColorMapMode |
|
899 | 3660 |
"finds the colorMapMode for a new image" |
767 | 3661 |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3662 |
|image newListOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors| |
1054 | 3663 |
|
3664 |
image := self image. |
|
1975 | 3665 |
image isNil ifTrue:[^ self ]. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3666 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3667 |
image mask notNil ifTrue: [ |
1896 | 3668 |
colorMapModeKey := 'masked'. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3669 |
] ifFalse:[ |
1896 | 3670 |
colorMapModeKey := 'depth'. |
1054 | 3671 |
]. |
1896 | 3672 |
colorMapModeKey := colorMapModeKey , image depth printString. |
1967 | 3673 |
self colorMapMode setValue:colorMapModeKey. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3674 |
|
1928 | 3675 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3676 |
image depth > 12 ifTrue:[ |
2447 | 3677 |
newListOfColors := OrderedCollection new. |
2870 | 3678 |
(image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[ |
1927 | 3679 |
someOrAllUsedColors := image usedColorsMax:10000. |
2054 | 3680 |
someOrAllUsedColors notNil ifTrue:[ |
3681 |
someOrAllUsedColors := someOrAllUsedColors asArray. |
|
3682 |
someOrAllUsedColors sort:self sortBlockForColors. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3683 |
newListOfColors addAll:someOrAllUsedColors. |
2054 | 3684 |
"/ listOfColors add:Color black; add:Color white. |
3685 |
] |
|
1904 | 3686 |
] ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3687 |
newListOfColors addAll:(image colorMap). |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3688 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3689 |
] ifFalse:[ |
2447 | 3690 |
newListOfColors := OrderedCollection withAll:(self listOfColors). |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3691 |
newListOfColors isEmpty ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3692 |
self colorMapMode: colorMapMode value. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3693 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3694 |
]. |
2054 | 3695 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3696 |
newListOfColors notEmptyOrNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3697 |
drawColor1 := newListOfColors at:1. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3698 |
drawColor2 := newListOfColors at:2 ifAbsent:drawColor1. |
2054 | 3699 |
|
3700 |
self hasMask ifTrue: [ |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3701 |
(newListOfColors contains: [:clr| clr = (Color colorId:0)]) |
2054 | 3702 |
ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3703 |
newListOfColors addFirst:(Color colorId:0). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3704 |
drawColor1 := newListOfColors at:2. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3705 |
drawColor2 := newListOfColors at:3 ifAbsent:drawColor1. |
2054 | 3706 |
] |
3707 |
]. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3708 |
"/ imageEditView drawingColors:(Array with: drawColor1 with: drawColor2). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3709 |
"/ self selectionOfColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3710 |
"/ setValue: 0; |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3711 |
"/ value: (listOfColors indexOf: imageEditView selectedColor). |
767 | 3712 |
]. |
2447 | 3713 |
self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[ |
3714 |
self listOfColors contents:newListOfColors. |
|
3715 |
]. |
|
2870 | 3716 |
|
3717 |
"Modified: / 18-01-2012 / 13:58:38 / cg" |
|
767 | 3718 |
! |
3719 |
||
942 | 3720 |
update:something with:aParameter from:changedObject |
2042 | 3721 |
|clrIndex img imagePreView clr changedColor| |
1436 | 3722 |
|
3723 |
img := self image. |
|
2042 | 3724 |
imagePreView := self imagePreView. |
1558 | 3725 |
|
3726 |
changedObject == self tileModeHolder ifTrue:[ |
|
2042 | 3727 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3728 |
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
|
3729 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3730 |
invalidate. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3731 |
^ self |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3732 |
]. |
2792 | 3733 |
changedObject == self previewBackgroundColorHolder ifTrue:[ |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3734 |
clr := changedObject value isNil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3735 |
ifTrue:[imageEditView viewBackground] |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3736 |
ifFalse:[Color perform:changedObject value]. |
2042 | 3737 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3738 |
viewBackground:clr; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3739 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3740 |
invalidate. |
1558 | 3741 |
^ self |
3742 |
]. |
|
3743 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3744 |
changedObject == self listOfColors ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3745 |
something == #at: ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3746 |
"/ colormap entry changed at aParameter |
960 | 3747 |
|
3748 |
clrIndex := aParameter. |
|
3749 |
(self hasMask) ifTrue:[ |
|
3750 |
clrIndex := clrIndex - 1. |
|
3751 |
]. |
|
1928 | 3752 |
changedColor := changedObject at:aParameter. |
3753 |
img colorMap notNil ifTrue:[ |
|
3754 |
img colorMap at:clrIndex put:changedColor. |
|
3755 |
self colorMapChanged. |
|
3756 |
] ifFalse:[ |
|
3757 |
drawingColormap notNil ifTrue:[ |
|
3758 |
drawingColormap at:clrIndex put:changedColor. |
|
3759 |
]. |
|
3760 |
]. |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3761 |
^ self |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3762 |
]. |
1896 | 3763 |
^ self |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3764 |
]. |
1124 | 3765 |
|
3766 |
changedObject == imageEditView undoImages ifTrue:[ |
|
1987 | 3767 |
self canUndoHolder value:(changedObject notEmpty). |
1124 | 3768 |
^ self. |
3769 |
]. |
|
3770 |
||
1345 | 3771 |
changedObject == imageEditView ifTrue:[ |
3772 |
something == #imageColors ifTrue:[ |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3773 |
self updateListOfColorsAndColormapMode. |
1345 | 3774 |
^ self. |
3775 |
]. |
|
3776 |
something == #image ifTrue:[ |
|
2812 | 3777 |
self updateAfterImageChange. |
2728 | 3778 |
imagePreView image:img scroll:false. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3779 |
self updateListOfColorsAndColormapMode. |
1558 | 3780 |
self tileModeHolder value ifTrue:[ |
2042 | 3781 |
imagePreView tileMode:true tileOffset:(img extent). |
1558 | 3782 |
]. |
1345 | 3783 |
^ self. |
3784 |
]. |
|
3785 |
something == #subImageIn ifTrue:[ |
|
2042 | 3786 |
imagePreView image ~~ img ifTrue:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
3787 |
self error:'internal error' mayProceed:true. |
1406 | 3788 |
]. |
1558 | 3789 |
self tileModeHolder value ifTrue:[ |
2042 | 3790 |
imagePreView invalidate. |
1558 | 3791 |
] ifFalse:[ |
2042 | 3792 |
imagePreView invalidate:aParameter. |
1558 | 3793 |
]. |
1345 | 3794 |
^ self. |
3795 |
]. |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3796 |
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
|
3797 |
(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
|
3798 |
"/ no color/mask */ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3799 |
"/ self halt. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3800 |
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
|
3801 |
] ifFalse:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3802 |
clrIndex := self listOfColors indexOf:aParameter. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3803 |
]. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3804 |
self selectionOfColor value:clrIndex. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3805 |
^ self. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3806 |
]. |
1345 | 3807 |
^ self. |
3808 |
]. |
|
3809 |
||
1880 | 3810 |
changedObject == imageEditView modifiedHolder ifTrue:[ |
3811 |
"/ self halt:'to be implemented'. |
|
3812 |
^ self |
|
3813 |
]. |
|
3814 |
||
1345 | 3815 |
changedObject == imageEditView image ifTrue:[ |
2042 | 3816 |
"/ self halt:'to be implemented'. |
2812 | 3817 |
self updateAfterImageChange. |
1345 | 3818 |
^ self. |
3819 |
]. |
|
3820 |
||
942 | 3821 |
super update:something with:aParameter from:changedObject |
3822 |
||
2812 | 3823 |
"Modified: / 21-10-2010 / 14:34:31 / cg" |
3824 |
! |
|
3825 |
||
3826 |
updateAfterImageChange |
|
3827 |
|img| |
|
3828 |
||
3829 |
(img := self image) notNil ifTrue:[ |
|
3830 |
img := img onDevice:device. |
|
3831 |
self updateColorsFromImage:img. |
|
3832 |
self findColorMapMode. |
|
3833 |
self updateLabelsAndHistory. |
|
3834 |
||
3835 |
imageSeqNr isNil ifTrue:[ |
|
3836 |
imageSeqNr := 1 |
|
3837 |
]. |
|
3838 |
self imageHasImageSequenceHolder value:(self imageHasImageSequence). |
|
3839 |
self imageHasNextImageHolder value:(self imageHasNextImage). |
|
3840 |
self imageHasPreviousImageHolder value:(self imageHasPreviousImage). |
|
3841 |
] ifFalse:[ |
|
3842 |
self updateForNoImage |
|
3843 |
] |
|
3844 |
||
3845 |
"Modified: / 21-10-2010 / 14:40:45 / cg" |
|
942 | 3846 |
! |
3847 |
||
1900 | 3848 |
updateColorsFromImage:image |
3849 |
|colors| |
|
3850 |
||
2870 | 3851 |
image depth > 16 ifTrue:[ |
3852 |
self listOfColors contents:#(). |
|
3853 |
^ self. |
|
3854 |
]. |
|
3855 |
||
1904 | 3856 |
colors := image colorMap. |
3857 |
colors isNil ifTrue:[ |
|
1906 | 3858 |
Error handle:[:ex | |
3859 |
colors := OrderedCollection new. |
|
3860 |
] do:[ |
|
3861 |
colors := image usedColors asSet. |
|
2870 | 3862 |
]. |
1900 | 3863 |
]. |
1904 | 3864 |
self listOfColors contents:(colors asOrderedCollection). |
2870 | 3865 |
|
3866 |
"Modified: / 18-01-2012 / 13:57:43 / cg" |
|
1900 | 3867 |
! |
3868 |
||
1054 | 3869 |
updateForNoImage |
767 | 3870 |
"updates channels and view, if image is loaded" |
3871 |
||
2792 | 3872 |
self imageIsLoadedHolder value: false. |
767 | 3873 |
self listOfColors removeAll. |
2812 | 3874 |
self imagePreView image: nil. |
3875 |
self imageHasImageSequenceHolder value:false. |
|
3876 |
||
3877 |
"Modified: / 21-10-2010 / 14:39:13 / cg" |
|
767 | 3878 |
! |
3879 |
||
3880 |
updateLabelsAndHistory |
|
3881 |
"updates labels and history, if something has changed" |
|
3882 |
||
1910 | 3883 |
|image| |
3884 |
||
3885 |
image := self image. |
|
3886 |
||
2792 | 3887 |
self imageIsLoadedHolder value: image notNil. |
1910 | 3888 |
image isNil ifTrue: [^nil]. |
767 | 3889 |
|
3890 |
self updateInfoLabel. |
|
3891 |
||
1975 | 3892 |
imageEditView resourceClass notNil ifTrue:[ |
3893 |
imageEditView resourceSelector notNil ifTrue:[ |
|
3894 |
self addHistoryEntryForClass:imageEditView resourceClass selector:imageEditView resourceSelector. |
|
3895 |
] |
|
3896 |
]. |
|
3897 |
||
3898 |
image fileName notNil ifTrue: [ |
|
3899 |
self addHistoryEntryForFile:image fileName. |
|
3900 |
]. |
|
2792 | 3901 |
|
3902 |
"Modified: / 04-07-2010 / 10:16:02 / cg" |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3903 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3904 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3905 |
updateListOfColorsAndColormapMode |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3906 |
|selectedColor colorMap image| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3907 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3908 |
selectedColor := self selectedColorOrNil. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3909 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3910 |
image := self image. |
1975 | 3911 |
image isNil ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3912 |
self listOfColors removeAll. |
1975 | 3913 |
] ifFalse:[ |
3914 |
colorMap := image colorMap. |
|
2447 | 3915 |
colorMap notNil ifTrue:[ |
3916 |
(colorMap size <= 4096) ifTrue:[ |
|
3917 |
image mask notNil ifTrue:[ |
|
3918 |
colorMap := (Array with:(Color noColor)),colorMap. |
|
3919 |
]. |
|
3920 |
self listOfColors contents:colorMap. |
|
3921 |
] ifFalse:[ |
|
3922 |
self listOfColors removeAll. |
|
3923 |
colorMap isFixedPalette ifTrue:[ |
|
3924 |
image colorMap:nil. |
|
3925 |
image photometric:#rgb. |
|
3926 |
image samplesPerPixel:3. |
|
3927 |
||
3928 |
image bitsPerSample:(Array |
|
3929 |
with:(colorMap bitsRed) |
|
3930 |
with:(colorMap bitsGreen) |
|
3931 |
with:(colorMap bitsBlue)). |
|
3932 |
]. |
|
3933 |
] |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3934 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3935 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3936 |
self findColorMapMode. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3937 |
selectedColor notNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3938 |
self selectColor:selectedColor. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3939 |
]. |
767 | 3940 |
! ! |
3941 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3942 |
!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
|
3943 |
|
1951 | 3944 |
atColor:anOldColor put:newColor |
1952 | 3945 |
"a color changed to a new color" |
3946 |
||
1930 | 3947 |
|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
|
3948 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3949 |
list := self listOfColors. |
1951 | 3950 |
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
|
3951 |
|
1930 | 3952 |
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
|
3953 |
index ~~ 0 ifTrue:[ |
1928 | 3954 |
oldColor := list at:index. |
3955 |
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
|
3956 |
] ifFalse:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
3957 |
self error:'internal error' mayProceed:true. |
1928 | 3958 |
list add:newColor |
3959 |
]. |
|
3960 |
||
3961 |
image := self image. |
|
3962 |
(image colorMap isNil |
|
3963 |
and:[drawingColormap isNil]) ifTrue:[ |
|
3964 |
oldColor notNil ifTrue:[ |
|
3965 |
imageEditView makeUndo. |
|
3966 |
newImage := image copy. |
|
3967 |
newImage |
|
3968 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
3969 |
do:[:x :y :clr | |
|
3970 |
|newClr| |
|
3971 |
||
1951 | 3972 |
newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr]. |
1928 | 3973 |
newImage colorAtX:x y:y put:newClr |
3974 |
]. |
|
3975 |
imageEditView image:newImage. |
|
3976 |
imageEditView setModified. |
|
3977 |
self updateImage. |
|
3978 |
self updateImagePreView. |
|
1930 | 3979 |
|
3980 |
self selectionOfColor value:oldSel. |
|
3981 |
imageEditView selectedColorIndex:oldSel. |
|
3982 |
imageEditView selectedColor:(self listOfColors at:oldSel). |
|
1928 | 3983 |
] |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3984 |
]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3985 |
! |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3986 |
|
942 | 3987 |
blueAtColor:aColor put:newBlue |
3988 |
"helper used to return a new row element, when blue is changed" |
|
3989 |
||
3990 |
|byte| |
|
3991 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3992 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3993 |
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
|
3994 |
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
|
3995 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3996 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3997 |
put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte). |
942 | 3998 |
! |
3999 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4000 |
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
|
4001 |
"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
|
4002 |
|
930 | 4003 |
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
|
4004 |
^ 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
|
4005 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4006 |
"Created: / 26.7.1998 / 12:30:35 / cg" |
930 | 4007 |
"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
|
4008 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4009 |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4010 |
canSelectBlueInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4011 |
^ aColor blueByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4012 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4013 |
"Created: / 7.8.1998 / 22:50:34 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4014 |
"Modified: / 7.8.1998 / 22:52:57 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4015 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4016 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4017 |
canSelectGreenInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4018 |
^ aColor greenByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4019 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4020 |
"Created: / 7.8.1998 / 22:50:22 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4021 |
"Modified: / 7.8.1998 / 22:52:46 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4022 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4023 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4024 |
canSelectRedInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4025 |
^ aColor redByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4026 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4027 |
"Created: / 7.8.1998 / 22:50:00 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4028 |
"Modified: / 7.8.1998 / 22:51:03 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4029 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4030 |
|
942 | 4031 |
greenAtColor:aColor put:newGreen |
4032 |
"helper used to return a new row element, when green is changed" |
|
4033 |
||
4034 |
|byte| |
|
4035 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4036 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4037 |
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
|
4038 |
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
|
4039 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4040 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4041 |
put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)). |
942 | 4042 |
! |
4043 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4044 |
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
|
4045 |
"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
|
4046 |
|
930 | 4047 |
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
|
4048 |
^ 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
|
4049 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4050 |
"Created: / 26.7.1998 / 12:30:29 / cg" |
930 | 4051 |
"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
|
4052 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4053 |
|
942 | 4054 |
redAtColor:aColor put:newRed |
4055 |
"helper used to return a new row element, when red is changed" |
|
4056 |
||
4057 |
|byte| |
|
4058 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4059 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4060 |
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
|
4061 |
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
|
4062 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4063 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4064 |
put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)). |
942 | 4065 |
! |
4066 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4067 |
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
|
4068 |
"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
|
4069 |
|
930 | 4070 |
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
|
4071 |
^ 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
|
4072 |
|
930 | 4073 |
"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
|
4074 |
! |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4075 |
|
2712 | 4076 |
theColorItself:aColor |
4077 |
"an accessor for the table-column" |
|
4078 |
||
1449
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4079 |
^ 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
|
4080 |
! ! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4081 |
|
2663 | 4082 |
!ImageEditor methodsFor:'defaults'! |
4083 |
||
4084 |
aboutIcon |
|
4085 |
^ self class defaultIcon |
|
4086 |
! ! |
|
4087 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4088 |
!ImageEditor methodsFor:'drag & drop'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4089 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4090 |
canDropObjects:aCollectionOfDropObjects in:aWidget |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4091 |
^ (aCollectionOfDropObjects size == 1) |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4092 |
and:[ aCollectionOfDropObjects |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4093 |
contains:[:dropObject | dropObject isFileObject]] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4094 |
! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4095 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4096 |
dropObjects:aCollectionOfDropObjects in:aWidget at:position |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4097 |
|dropObject| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4098 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4099 |
dropObject := aCollectionOfDropObjects first. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4100 |
dropObject isFileObject ifTrue:[ |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4101 |
self loadFromFile:dropObject asFilename. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4102 |
] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4103 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4104 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4105 |
!ImageEditor methodsFor:'event handling'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4106 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4107 |
processEvent:anEvent |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4108 |
"Return true, if I have eaten the event" |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4109 |
|
2841 | 4110 |
|view focusView p transformation| |
4111 |
||
4112 |
view := anEvent view. |
|
4113 |
view notNil ifTrue:[ |
|
4114 |
view == self imagePreView ifTrue:[ |
|
4115 |
((anEvent isButtonPressEvent and:[ anEvent button == 1 ]) |
|
4116 |
or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]]) ifTrue:[ |
|
4117 |
p := anEvent x @ anEvent y. |
|
4118 |
(transformation := view transformation) notNil ifTrue:[ |
|
4119 |
p := transformation applyInverseTo:p. |
|
4120 |
]. |
|
4121 |
self imageEditView scrollToMakeVisible:p. |
|
4122 |
^ true. |
|
2546 | 4123 |
]. |
2841 | 4124 |
]. |
4125 |
||
4126 |
anEvent isKeyPressEvent ifTrue:[ |
|
4127 |
focusView := view windowGroup focusView ? view. |
|
4128 |
(focusView isComponentOf:(builder componentAt:#colorDataSetView)) ifTrue:[ |
|
4129 |
anEvent key == #Paste ifTrue:[ |
|
4130 |
self pasteColorIntoColormap. |
|
4131 |
^ true. |
|
4132 |
]. |
|
4133 |
anEvent key == #Copy ifTrue:[ |
|
4134 |
self copyColorFromColormap. |
|
4135 |
^ true. |
|
4136 |
]. |
|
4137 |
]. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4138 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4139 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4140 |
^ false. |
2841 | 4141 |
|
4142 |
"Modified: / 04-04-2011 / 13:50:09 / cg" |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4143 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4144 |
|
672 | 4145 |
!ImageEditor methodsFor:'help'! |
4146 |
||
4147 |
defaultInfoLabel |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4148 |
"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
|
4149 |
some widget with a help text." |
672 | 4150 |
|
1966 | 4151 |
|resourceClass resourceSelector| |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4152 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4153 |
resourceClass := imageEditView resourceClass. |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
4154 |
resourceClass notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4155 |
resourceSelector := imageEditView resourceSelector. |
1966 | 4156 |
resourceSelector notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4157 |
^ resourceClass name, ' >> ', resourceSelector |
1966 | 4158 |
]. |
672 | 4159 |
]. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4160 |
^ 'No class and selector defined.' |
674 | 4161 |
! |
4162 |
||
702 | 4163 |
openDocumentation |
767 | 4164 |
"opens the documentation file of the Image Editor" |
674 | 4165 |
|
763 | 4166 |
self openHTMLDocument: 'tools/uipainter/ImageEditor.html' |
4167 |
||
672 | 4168 |
! ! |
4169 |
||
767 | 4170 |
!ImageEditor methodsFor:'loading'! |
4171 |
||
1975 | 4172 |
loadFromClass:aClass andSelector:aSelector |
4173 |
"loads an image from the method specified by class and selector" |
|
4174 |
||
4175 |
self assert:(aClass isNil or:[aClass isClass]). |
|
4176 |
||
4177 |
(aClass isNil or:[aSelector]) isNil ifTrue:[ |
|
4178 |
imageEditView resourceClass:aClass. |
|
4179 |
imageEditView resourceSelector:aSelector. |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4180 |
imageEditView image:nil. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4181 |
self clearModified. |
1966 | 4182 |
^ self. |
4183 |
]. |
|
4184 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4185 |
"/ (imageEditView resourceClass == aClass |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4186 |
"/ and:[ imageEditView resourceSelector == aSelector ]) ifTrue:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4187 |
"/ imageEditView modified ifFalse:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4188 |
"/ ^ self. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4189 |
"/ ]. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4190 |
"/ ]. |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4191 |
|
1975 | 4192 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[ |
1966 | 4193 |
self updateAfterImageChange. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4194 |
self clearModified. |
1966 | 4195 |
] |
1975 | 4196 |
|
4197 |
"Modified: / 16.3.1999 / 21:44:41 / cg" |
|
1966 | 4198 |
! |
4199 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4200 |
loadFromFile:aFileName |
767 | 4201 |
"loads an image from aFileName and sets up color map list and other info labels" |
4202 |
||
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4203 |
self withCursor:Cursor wait do:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4204 |
(imageEditView loadFromFile: aFileName) notNil ifTrue:[ |
1966 | 4205 |
self updateAfterImageChange |
767 | 4206 |
] |
4207 |
] |
|
960 | 4208 |
|
1057 | 4209 |
"Modified: / 16.3.1999 / 21:44:26 / cg" |
767 | 4210 |
! |
4211 |
||
960 | 4212 |
loadFromImage:anImage |
767 | 4213 |
"loads an image from anImage and sets up color map list and other info labels" |
4214 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4215 |
|img| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4216 |
|
1057 | 4217 |
anImage notNil ifTrue:[ |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4218 |
img := anImage onDevice:device. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4219 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4220 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4221 |
imageEditView image:img. |
1799
e605f0af928a
clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents:
1796
diff
changeset
|
4222 |
imageEditView clearModified. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4223 |
|
1966 | 4224 |
self updateAfterImageChange. |
4225 |
"/ img notNil ifTrue:[ |
|
4226 |
"/ self updateColorsFromImage:img. |
|
4227 |
"/ self findColorMapMode. |
|
4228 |
"/ self updateLabelsAndHistory. |
|
4229 |
"/ ] ifFalse:[ |
|
4230 |
"/ self updateForNoImage |
|
4231 |
"/ ] |
|
960 | 4232 |
|
1057 | 4233 |
"Modified: / 16.3.1999 / 21:43:56 / cg" |
767 | 4234 |
! |
4235 |
||
1975 | 4236 |
loadFromOrPrepareForClass: aClass andSelector: aSelector |
767 | 4237 |
"loads an image by evaluating aMessage; |
4238 |
if no image could extract from aMessage; do set the class and the selector from |
|
4239 |
the aMessage for a saving at the end of editing" |
|
4240 |
||
1975 | 4241 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue: [ |
1900 | 4242 |
self updateColorsFromImage:self image. |
767 | 4243 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4244 |
] ifFalse: [ |
1975 | 4245 |
imageEditView resourceClass: aClass. |
4246 |
imageEditView resourceSelector:aSelector. |
|
767 | 4247 |
]. |
4248 |
self updateLabelsAndHistory. |
|
1057 | 4249 |
|
4250 |
"Modified: / 16.3.1999 / 21:45:07 / cg" |
|
767 | 4251 |
! ! |
4252 |
||
400 | 4253 |
!ImageEditor methodsFor:'menu modes'! |
4254 |
||
975 | 4255 |
colorMapMode |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4256 |
"returns the colorMapMode" |
400 | 4257 |
|
975 | 4258 |
colorMapMode isNil ifTrue: [colorMapMode := '' asValue]. |
400 | 4259 |
|
975 | 4260 |
^colorMapMode |
400 | 4261 |
! |
4262 |
||
975 | 4263 |
editMode |
4264 |
"returns editMode" |
|
400 | 4265 |
|
1054 | 4266 |
editMode isNil ifTrue: [ |
975 | 4267 |
editMode := #point asValue. |
1329 | 4268 |
editMode onChangeEvaluate:[imageEditView editMode:(editMode value)] |
975 | 4269 |
]. |
4270 |
||
4271 |
^editMode |
|
400 | 4272 |
! |
4273 |
||
975 | 4274 |
mouseKeyColorMode |
4275 |
"returns mouseKeyColorMode" |
|
400 | 4276 |
|
1345 | 4277 |
mouseKeyColorMode isNil ifTrue:[ |
975 | 4278 |
mouseKeyColorMode := 1 asValue. |
1345 | 4279 |
mouseKeyColorMode onChangeEvaluate: [ |
4280 |
imageEditView mouseKeyColorMode:mouseKeyColorMode value. |
|
4281 |
self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor). |
|
4282 |
] |
|
956 | 4283 |
]. |
400 | 4284 |
|
975 | 4285 |
^mouseKeyColorMode |
1345 | 4286 |
|
4287 |
"Modified: / 10.2.2000 / 23:16:42 / cg" |
|
400 | 4288 |
! ! |
4289 |
||
1558 | 4290 |
!ImageEditor methodsFor:'private'! |
4291 |
||
1975 | 4292 |
checkModified |
4293 |
imageEditView modified value ifTrue:[ |
|
4294 |
(Dialog |
|
4295 |
confirm:(resources string:'Image was not saved. Proceed anyway ?') |
|
4296 |
yesLabel:(resources string:'Proceed') |
|
4297 |
noLabel:(resources string:'Cancel') |
|
4298 |
initialAnswer:false |
|
4299 |
) ifFalse: [^false]. |
|
4300 |
||
4301 |
imageEditView clearModified. |
|
4302 |
]. |
|
4303 |
^ true |
|
4304 |
||
4305 |
"Modified: / 29.7.1998 / 18:55:24 / cg" |
|
4306 |
! |
|
4307 |
||
1960 | 4308 |
pointFromString:aString |
4309 |
|p s x y| |
|
4310 |
||
4311 |
p := Object readFromString:aString onError:nil. |
|
1962 | 4312 |
p isPoint ifTrue:[^ p]. |
1960 | 4313 |
|
4314 |
s := aString readStream. |
|
4315 |
x := Number readFrom:s onError:nil. |
|
4316 |
x notNil ifTrue:[ |
|
4317 |
s skipSeparators. |
|
1962 | 4318 |
[s atEnd not and:[s peek isDigit not]] whileTrue:[s next]. |
1960 | 4319 |
y := Number readFrom:s onError:nil. |
1961 | 4320 |
^ x @ (y ? x) |
1960 | 4321 |
]. |
1962 | 4322 |
^ nil |
1960 | 4323 |
! |
4324 |
||
1939 | 4325 |
sortBlockForColors |
4326 |
^ [:a :b | |
|
4327 |
a redByte == b redByte ifTrue:[ |
|
4328 |
a greenByte == b greenByte ifTrue:[ |
|
4329 |
a blueByte < b blueByte |
|
4330 |
] ifFalse:[ |
|
4331 |
a greenByte < b greenByte |
|
4332 |
] |
|
4333 |
] ifFalse:[ |
|
4334 |
a redByte < b redByte |
|
4335 |
] |
|
4336 |
] |
|
4337 |
! |
|
4338 |
||
1598 | 4339 |
updateImage |
4340 |
|img| |
|
4341 |
||
4342 |
img := imageEditView image. |
|
4343 |
imageEditView image:img. |
|
4344 |
self fetchImageData. |
|
4345 |
! |
|
4346 |
||
1558 | 4347 |
updateImagePreView |
4348 |
self tileModeHolder value ifTrue:[ |
|
4349 |
self imagePreView tileMode:true tileOffset:(self image extent). |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4350 |
]. |
2546 | 4351 |
self imagePreView setImage:(self image) scroll:false invalidate:true. |
1558 | 4352 |
! ! |
4353 |
||
535 | 4354 |
!ImageEditor methodsFor:'queries'! |
4355 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4356 |
hasLastGrabScreenArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4357 |
^ [ lastGrabbedScreenArea notNil ] |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4358 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4359 |
|
960 | 4360 |
hasMask |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4361 |
^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask'] |
960 | 4362 |
|
4363 |
"Created: / 18.8.1998 / 17:17:38 / cg" |
|
4364 |
! |
|
4365 |
||
1975 | 4366 |
modified |
4367 |
^ imageEditView modified |
|
4368 |
! |
|
4369 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4370 |
modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4371 |
super modified:aBoolean. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4372 |
imageEditView modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4373 |
! |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4374 |
|
535 | 4375 |
preferredExtent |
767 | 4376 |
"returns the preferred extent" |
535 | 4377 |
|
2423
0c5ac1daf0e4
changed #preferredExtent - formating
Stefan Vogel <sv@exept.de>
parents:
2420
diff
changeset
|
4378 |
^ super preferredExtent max: (Screen current width//3)@(Screen current height//3.5) |
535 | 4379 |
! ! |
4380 |
||
400 | 4381 |
!ImageEditor methodsFor:'selection'! |
4382 |
||
4383 |
magnification |
|
767 | 4384 |
"returns the magnification of the image" |
400 | 4385 |
|
911 | 4386 |
self imageEditView isNil ifTrue: [^1]. |
4387 |
^imageEditView magnification x |
|
400 | 4388 |
! |
4389 |
||
4390 |
magnification: aValue |
|
767 | 4391 |
"sets the magnification of the image" |
400 | 4392 |
|
905 | 4393 |
|magnification| |
4394 |
magnification := (aValue ? 1) asPoint. |
|
911 | 4395 |
(magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil]. |
4396 |
imageEditView magnification: magnification |
|
400 | 4397 |
! |
4398 |
||
4399 |
selectedColorIndex |
|
767 | 4400 |
"returns the index of the selected color" |
400 | 4401 |
|
4402 |
^selectedColorIndex |
|
4403 |
! |
|
4404 |
||
4405 |
selectedColorIndex: anIndex |
|
767 | 4406 |
"sets the index of the selected color" |
400 | 4407 |
|
1054 | 4408 |
|clr pixel| |
4409 |
||
4410 |
selectedColorIndex := anIndex. |
|
2447 | 4411 |
anIndex isNil ifTrue:[^ self]. |
1054 | 4412 |
clr := self listOfColors at:anIndex ifAbsent:nil. |
4413 |
clr isNil ifTrue:[^ self]. |
|
4414 |
||
1075 | 4415 |
pixel := anIndex - 1. |
1054 | 4416 |
(self listOfColors at:1) = Color noColor ifTrue:[ |
4417 |
anIndex == 1 ifTrue:[ |
|
4418 |
pixel := nil. "/ mask |
|
4419 |
] ifFalse:[ |
|
1075 | 4420 |
pixel := pixel - 1 |
1054 | 4421 |
] |
4422 |
]. |
|
4423 |
imageEditView selectedColorIndex:pixel. |
|
4424 |
imageEditView selectedColor:clr. |
|
400 | 4425 |
! ! |
4426 |
||
1716 | 4427 |
!ImageEditor methodsFor:'startup & release'! |
400 | 4428 |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4429 |
closeDownViews |
1644 | 4430 |
builder notNil ifTrue:[ |
4431 |
DefaultRelativeSizes := |
|
4432 |
Array |
|
1998 | 4433 |
with:(builder componentAt:#mainPanel) relativeCorners |
1644 | 4434 |
with:(builder componentAt:#verticalPanel) relativeCorners. |
4435 |
]. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4436 |
super closeDownViews |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4437 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4438 |
|
400 | 4439 |
closeRequest |
2016 | 4440 |
"asks for permission before closing" |
4441 |
||
4442 |
imageEditView checkModified ifTrue:[ |
|
4443 |
super closeRequest |
|
4444 |
] |
|
400 | 4445 |
! |
4446 |
||
1980 | 4447 |
commonPostBuild |
1975 | 4448 |
imageEditView undoImages addDependent:self. |
4449 |
imageEditView imageInfoHolder:(self imageInfoHolder). |
|
4450 |
imageEditView activityInfoHolder:(self activityInfoHolder). |
|
4451 |
||
4452 |
imageEditView clickInfoCallBack:[:button :point | |
|
4453 |
|mouseButtonColorToolBar| |
|
4454 |
||
4455 |
mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar. |
|
4456 |
(mouseButtonColorToolBar itemAt:button) toggleIndication. |
|
4457 |
mouseButtonColorToolBar do: [:i| i updateIndicators]. |
|
4458 |
]. |
|
4459 |
||
4460 |
imageEditView addDependent:self. |
|
4461 |
imageEditView modifiedHolder addDependent:self. |
|
4462 |
||
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4463 |
DefaultRelativeSizes notNil ifTrue:[ |
1998 | 4464 |
(builder componentAt:#mainPanel) relativeCorners:DefaultRelativeSizes first. |
1980 | 4465 |
(builder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4466 |
]. |
1995 | 4467 |
|
1996 | 4468 |
"/ using masters infoHolder ? |
4469 |
(builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[ |
|
1998 | 4470 |
(builder componentAt:#mainPanel) layout bottomOffset:0. |
1995 | 4471 |
(builder componentAt:#infoBarSubSpec) beInvisible |
4472 |
] |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4473 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4474 |
|
1980 | 4475 |
open |
4476 |
"after opening, sets the masterApplication of the imageEditView to self" |
|
4477 |
||
4478 |
super open. |
|
4479 |
||
4480 |
imageEditView := (self componentAt: #imageEditView) subViews first. |
|
4481 |
! |
|
4482 |
||
400 | 4483 |
postOpenWith:aBuilder |
767 | 4484 |
"after opening, sets the masterApplication of the imageEditView to self; |
4485 |
evaluate the postOpenAction" |
|
400 | 4486 |
|
1921 | 4487 |
postOpenAction value. |
400 | 4488 |
|
1250 | 4489 |
super postOpenWith:aBuilder. |
4490 |
||
4491 |
aBuilder keyboardProcessor menuBar:nil. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4492 |
self windowGroup addPreEventHook:self. |
400 | 4493 |
! ! |
4494 |
||
1715 | 4495 |
!ImageEditor methodsFor:'user actions-colormap'! |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4496 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4497 |
addColorToColormap |
1682 | 4498 |
self addColorToColormap:(Color black) |
4499 |
! |
|
4500 |
||
4501 |
addColorToColormap:newColor |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4502 |
|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
|
4503 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4504 |
img := self image. |
1499
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4505 |
img isNil ifTrue:[ |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4506 |
self warn:'No Image.'. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4507 |
^ self |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4508 |
]. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4509 |
|
1054 | 4510 |
depth := img depth. |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4511 |
cMap := img colorMap. |
1054 | 4512 |
cMap isNil ifTrue:[ |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4513 |
drawingColormap isNil ifTrue:[ |
1916 | 4514 |
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
|
4515 |
drawingColormap := OrderedCollection new. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4516 |
]. |
1682 | 4517 |
drawingColormap add:newColor. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4518 |
self listOfColors contents:drawingColormap. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4519 |
self selectionOfColor value:(drawingColormap size). |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4520 |
|
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4521 |
"/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs. |
1054 | 4522 |
^ self |
4523 |
]. |
|
4524 |
||
1583 | 4525 |
("(depth == 1)" false |
1054 | 4526 |
or:[cMap size == (1 bitShift:depth)]) ifTrue:[ |
4527 |
depth >= 8 ifTrue:[ |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4528 |
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
|
4529 |
^ self |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4530 |
]. |
1916 | 4531 |
(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
|
4532 |
ifFalse:[ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4533 |
^ self |
1057 | 4534 |
]. |
4535 |
||
4536 |
imageEditView makeUndo. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4537 |
img mask notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4538 |
newMode := 'masked' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4539 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4540 |
newMode := 'depth' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4541 |
]. |
1057 | 4542 |
self colorMapMode:newMode. |
4543 |
] ifFalse:[ |
|
4544 |
imageEditView makeUndo. |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4545 |
]. |
1054 | 4546 |
|
4547 |
cMap := cMap asArray. |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4548 |
listOfColors := self listOfColors. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4549 |
oldCListSize := listOfColors size. |
1054 | 4550 |
|
1682 | 4551 |
newColorMap := cMap copyWith:newColor. |
1054 | 4552 |
|
4553 |
newImage := img species new |
|
4554 |
width:img width |
|
4555 |
height:img height |
|
4556 |
depth:depth |
|
4557 |
fromArray:img bits. |
|
4558 |
||
4559 |
newImage colorMap:newColorMap. |
|
4560 |
newImage fileName:img fileName. |
|
4561 |
newImage mask:(img mask copy). |
|
4562 |
||
4563 |
(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
|
4564 |
listOfColors contents: newImage colorMap. |
1054 | 4565 |
self findColorMapMode. |
4566 |
"/ 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
|
4567 |
listOfColors size > (oldCListSize + 1) ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4568 |
listOfColors removeLast |
1054 | 4569 |
]. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4570 |
self selectionOfColor value:(listOfColors size). |
1054 | 4571 |
self updateLabelsAndHistory. |
4572 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4573 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4574 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
1057 | 4575 |
"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
|
4576 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4577 |
|
1650 | 4578 |
changeHLS |
4579 |
"interactive Hue/Light/Saturation editing" |
|
4580 |
||
4581 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4582 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
2438 | 4583 |
originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels |
4584 |
anyChange | |
|
1652 | 4585 |
|
1741 | 4586 |
"/ compute the averageColor in the background (while asking user) |
2438 | 4587 |
avgColorHolder := nil asValue. |
4588 |
previewImageHolder := nil asValue. |
|
4589 |
||
1652 | 4590 |
readySema := Semaphore new. |
4591 |
[ |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4592 |
|image| |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4593 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4594 |
image := imageEditView image. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4595 |
originalColormap := image colorMap copy. |
2438 | 4596 |
originalPixels := image bits. |
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4597 |
avgColor := image averageColor. |
2438 | 4598 |
avgColorHolder value:avgColor. |
4599 |
||
4600 |
previewImage := self image magnifiedPreservingRatioTo:100@100. |
|
4601 |
previewImageHolder value: previewImage. |
|
4602 |
originalPreviewColormap := previewImage colorMap copy. |
|
4603 |
originalPreviewPixels := previewImage bits. |
|
4604 |
||
1652 | 4605 |
readySema signal. |
4606 |
] forkAt:7. |
|
1649 | 4607 |
|
4608 |
acceptChannel := TriggerValue new. |
|
4609 |
||
4610 |
firstChange := true. |
|
2438 | 4611 |
anyChange := false. |
1649 | 4612 |
|
1651 | 4613 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
4614 |
Color |
|
4615 |
hue:((clr hue) ? 0 + hShift) |
|
1925 | 4616 |
light:((clr light * lFactor / 100) "min:100") |
4617 |
saturation:((clr saturation * sFactor / 100) "min:100")]. |
|
1652 | 4618 |
|
1649 | 4619 |
shiftAction := |
4620 |
[ |
|
1650 | 4621 |
|hShift lFactor sFactor| |
4622 |
||
1649 | 4623 |
acceptChannel value:true. |
4624 |
||
4625 |
firstChange ifTrue:[ |
|
4626 |
imageEditView makeUndo. |
|
4627 |
firstChange := false. |
|
2438 | 4628 |
anyChange := true. |
1649 | 4629 |
]. |
1652 | 4630 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
1650 | 4631 |
|
4632 |
hShift := hueShift value. |
|
4633 |
lFactor := lightValue value. |
|
4634 |
sFactor := saturationValue value. |
|
4635 |
||
1652 | 4636 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
4637 |
||
2438 | 4638 |
previewImage |
4639 |
colorMap:originalPreviewColormap copy; |
|
4640 |
bits:originalPreviewPixels copy; |
|
4641 |
release; |
|
4642 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
4643 |
previewImageHolder value:nil; value:previewImage. |
|
4644 |
||
1652 | 4645 |
shiftProcess notNil ifTrue:[ |
4646 |
shiftProcess terminate. |
|
4647 |
shiftProcess waitUntilTerminated. |
|
4648 |
shiftProcess := nil. |
|
4649 |
]. |
|
4650 |
shiftProcess := |
|
4651 |
[ |
|
4652 |
[ |
|
1656 | 4653 |
imageEditView image |
4654 |
colorMap:originalColormap copy; |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4655 |
bits:originalPixels copy; |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4656 |
release; |
1656 | 4657 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
1652 | 4658 |
self updateImage. |
4659 |
self updateInfoLabel. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4660 |
self updateImagePreView. |
1652 | 4661 |
] ensure:[ shiftProcess := nil ]. |
4662 |
] forkAt:7. |
|
1649 | 4663 |
]. |
4664 |
||
4665 |
bindings := IdentityDictionary new. |
|
1650 | 4666 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
1656 | 4667 |
hueShift onChangeEvaluate:shiftAction. |
1650 | 4668 |
|
4669 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
1656 | 4670 |
lightValue onChangeEvaluate:shiftAction. |
1650 | 4671 |
|
4672 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
1656 | 4673 |
saturationValue onChangeEvaluate:shiftAction. |
1650 | 4674 |
|
1649 | 4675 |
bindings at:#acceptChannel put:acceptChannel. |
1652 | 4676 |
bindings at:#hlsColor put:avgColorHolder. |
2438 | 4677 |
bindings at:#previewImageHolder put:previewImageHolder. |
1650 | 4678 |
|
4679 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
1649 | 4680 |
ifFalse:[ |
2438 | 4681 |
anyChange ifTrue:[ |
1649 | 4682 |
imageEditView undo |
4683 |
] |
|
4684 |
]. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4685 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4686 |
(p := shiftProcess) notNil ifTrue:[ |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4687 |
p waitUntilTerminated. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4688 |
]. |
2438 | 4689 |
|
4690 |
anyChange ifTrue:[ |
|
4691 |
self updateImage. |
|
4692 |
self updateImagePreView. |
|
4693 |
]. |
|
1649 | 4694 |
! |
4695 |
||
2652 | 4696 |
clearColormapEntry0AndMaskedPixels |
4697 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
4698 |
0 and then clear all masked pixels (to pixelValue 0). |
|
4699 |
This is required for windows icons to be really transparent" |
|
4700 |
||
4701 |
|index colorMap| |
|
4702 |
||
4703 |
self compressColorMap. |
|
4704 |
colorMap := self image colorMap. |
|
4705 |
(colorMap includes:(Color black)) ifFalse:[ |
|
4706 |
self addColorToColormap:(Color black). |
|
4707 |
colorMap := self image colorMap. |
|
4708 |
]. |
|
4709 |
index := colorMap indexOf:(Color black). |
|
4710 |
index == 1 ifFalse:[ |
|
4711 |
self sortColorMap. |
|
4712 |
colorMap := self image colorMap. |
|
4713 |
]. |
|
4714 |
self clearMaskedPixels |
|
4715 |
! |
|
4716 |
||
1403 | 4717 |
clearMaskedPixels |
4718 |
"clear all masked pixels (to pixelValue 0)" |
|
4719 |
||
2652 | 4720 |
|newImage| |
4721 |
||
4722 |
newImage := self image clearMaskedPixels. |
|
4723 |
0 to:newImage height - 1 do:[:y | |
|
4724 |
0 to:newImage width - 1 do:[:x | |
|
4725 |
(newImage maskAtX:x y:y) == 0 ifTrue:[ |
|
4726 |
newImage pixelAtX:x y:y put:0 |
|
1460 | 4727 |
] |
1403 | 4728 |
] |
2652 | 4729 |
]. |
4730 |
||
4731 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
4732 |
self fetchImageData. |
|
1403 | 4733 |
] |
4734 |
! |
|
4735 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4736 |
colorMapChanged |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4737 |
|img| |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4738 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4739 |
img := self image. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4740 |
img release. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4741 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4742 |
self imageEditView invalidate. |
960 | 4743 |
self imagePreView invalidate. |
4744 |
||
4745 |
"/ (imageEditView image:img) notNil ifTrue:[ |
|
4746 |
"/ self updateLabelsAndHistory. |
|
4747 |
"/ self imagePreView image:img |
|
4748 |
"/ ] |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4749 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4750 |
"Created: / 7.8.1998 / 22:26:10 / cg" |
960 | 4751 |
"Modified: / 18.8.1998 / 17:08:55 / cg" |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4752 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4753 |
|
975 | 4754 |
colorMapMode:aMode |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4755 |
"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
|
4756 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4757 |
|depth numColors newColorMap newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4758 |
oldImage image newColors realColorMap oldFileName |
1008 | 4759 |
usedColors useNearest usageCounts tmpBits tmpMap quest |
4760 |
prevMode maskThreshold maskImage| |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4761 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4762 |
self withExecuteCursorDo:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4763 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4764 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4765 |
prevMode := colorMapMode value. |
1008 | 4766 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4767 |
newColorMap := self class listOfColorMaps at:aMode. |
2572 | 4768 |
aMode == #depth32 ifTrue:[ |
4769 |
depth := 32. |
|
4770 |
] ifFalse:[ |
|
4771 |
depth := (newColorMap size log:2) asInteger. |
|
4772 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4773 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4774 |
useNearest := false. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4775 |
depth == 1 ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4776 |
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
|
4777 |
] ifFalse:[ |
1008 | 4778 |
prevMode isNil ifTrue:[ |
4779 |
quest := 'Compute colormap (or use standard)' |
|
4780 |
] ifFalse:[ |
|
4781 |
quest := 'Keep colormap (or use standard)' |
|
4782 |
] |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4783 |
]. |
1008 | 4784 |
((prevMode = aMode) |
1057 | 4785 |
or:[depth > oldImage depth |
4786 |
or:[self confirm:(resources string:quest)]]) ifTrue:[ |
|
1937 | 4787 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 4788 |
|
4789 |
"/ keep the colormap |
|
4790 |
newColorMap atAllPut:Color black. |
|
4791 |
depth > oldImage depth ifTrue:[ |
|
4792 |
"/ easy - simply copy the part |
|
4793 |
numColors := 1 bitShift:oldImage depth. |
|
4794 |
0 to:numColors-1 do:[:pixel | |
|
4795 |
newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel) |
|
1008 | 4796 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4797 |
] ifFalse:[ |
1935 | 4798 |
"/ see if all used color fit the new colormap |
4799 |
usedColors := oldImage usedColorsMax:(1 bitShift:depth). |
|
4800 |
(usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[ |
|
4801 |
usedColors := oldImage realUsedColors |
|
4802 |
]. |
|
4803 |
(usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[ |
|
4804 |
"/ yea - just install them |
|
4805 |
usedColors asArray keysAndValuesDo:[:idx :clr | |
|
4806 |
newColorMap at:idx put:clr |
|
4807 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4808 |
] ifFalse:[ |
1935 | 4809 |
"/ copy over those that are most often used. |
4810 |
oldImage depth < 8 ifTrue:[ |
|
4811 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
4812 |
oldImage bits |
|
4813 |
expandPixels:(oldImage depth) |
|
4814 |
width:oldImage width |
|
4815 |
height:oldImage height |
|
4816 |
into:tmpBits |
|
4817 |
mapping:nil. |
|
986 | 4818 |
] ifFalse:[ |
1935 | 4819 |
oldImage depth == 8 ifTrue:[ |
4820 |
tmpBits := oldImage bits |
|
4821 |
] ifFalse:[ |
|
4822 |
colorMapMode value:prevMode. |
|
4823 |
self findColorMapMode. |
|
4824 |
self warn:('Too many used colors in image (', oldImage usedColors size printString , ').'). |
|
4825 |
^ self |
|
4826 |
"/ (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs)) |
|
4827 |
"/ ifFalse:[. |
|
4828 |
"/ ^ self |
|
4829 |
"/ ]. |
|
4830 |
"/ self image: (Image newForDepth:depth) fromImage:oldImage. |
|
4831 |
"/ ^ self. |
|
4832 |
] |
|
4833 |
]. |
|
4834 |
usageCounts := tmpBits usageCounts. |
|
4835 |
tmpMap := Array new:usageCounts size. |
|
4836 |
oldImage colorMap asArray keysAndValuesDo:[:i :clr | |
|
4837 |
tmpMap at:i put:clr |
|
4838 |
]. |
|
4839 |
usageCounts sort:[:a :b | a > b] with:tmpMap. |
|
4840 |
||
4841 |
1 to:(1 bitShift:depth) do:[:idx | |
|
4842 |
newColorMap at:idx put:(tmpMap at:idx) |
|
4843 |
]. |
|
4844 |
||
4845 |
useNearest := Dialog |
|
4846 |
confirmWithCancel:(resources |
|
4847 |
stringWithCRs:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?' |
|
4848 |
with:usedColors size |
|
4849 |
with:(1 bitShift:depth)) |
|
4850 |
labels:(resources array:#('Cancel' 'First' 'Nearest')). |
|
4851 |
useNearest isNil ifTrue:[ |
|
1124 | 4852 |
colorMapMode value:prevMode. |
1935 | 4853 |
^ self "/ cancel |
4854 |
]. |
|
4855 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4856 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4857 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4858 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4859 |
"/ standard colormap |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4860 |
usedColors := oldImage usedColors. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4861 |
(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
|
4862 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4863 |
confirmWithCancel:(resources |
1916 | 4864 |
stringWithCRs:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?' |
4865 |
) |
|
1542 | 4866 |
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
|
4867 |
useNearest isNil ifTrue:[ |
1542 | 4868 |
colorMapMode value:prevMode. |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4869 |
^ self "/ cancel |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4870 |
]. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4871 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4872 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4873 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4874 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4875 |
|
2260 | 4876 |
newImage := Image newForDepth:depth. |
1424
d7367ae7f85e
fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
4877 |
newImage depth:depth. |
2260 | 4878 |
newImage photometric:oldImage photometric. |
4879 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4880 |
oldFileName := oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4881 |
|
1008 | 4882 |
Image imageErrorSignal handle:[:ex| |
4883 |
Color colorErrorSignal handle:[:ex| |
|
1542 | 4884 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4885 |
imageEditView undo. |
1008 | 4886 |
^ self warn:(resources string:'Conversion failed !!') |
4887 |
] do:[ |
|
1393 | 4888 |
newImage := Image newForDepth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4889 |
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
|
4890 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4891 |
newImage photometric:#palette. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4892 |
newImage bits:(ByteArray new:(newImage bytesPerRow * newImage height)). |
2260 | 4893 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4894 |
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
|
4895 |
[:x :y :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4896 |
|newColor| |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4897 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4898 |
(newColorMap includes:clr) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4899 |
ifTrue: [newColor := clr] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4900 |
ifFalse: [ |
1008 | 4901 |
newColor := clr nearestIn:newColorMap. |
4902 |
useNearest ifFalse:[ |
|
4903 |
(newColor deltaFrom:clr) > 0.5 ifTrue:[ |
|
4904 |
newColor := oldImage colorFromValue:0 |
|
4905 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4906 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4907 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4908 |
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
|
4909 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4910 |
image := newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4911 |
]. |
1008 | 4912 |
] do:[ |
2260 | 4913 |
image := newImage fromImage:oldImage. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4914 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4915 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4916 |
(aMode asString startsWith:'mask') ifTrue:[ |
1008 | 4917 |
image mask isNil ifTrue:[ |
1949 | 4918 |
false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
1008 | 4919 |
maskThreshold := 0.1. |
4920 |
maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
|
4921 |
] ifFalse:[ |
|
4922 |
maskImage := Depth1Image extent:image extent. |
|
1770 | 4923 |
maskImage bits:(ByteArray |
1008 | 4924 |
new:(maskImage bytesPerRow * maskImage height) |
4925 |
withAll:16rFF). |
|
4926 |
||
4927 |
"/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
|
4928 |
]. |
|
4929 |
image mask:maskImage. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4930 |
]. |
1008 | 4931 |
] ifFalse:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4932 |
image mask: nil. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4933 |
]. |
1935 | 4934 |
|
1937 | 4935 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 4936 |
realColorMap := OrderedCollection new. |
4937 |
image realColorMap do:[:clr| |
|
4938 |
(realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
|
4939 |
]. |
|
4940 |
newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
|
4941 |
newColorMap do:[:clr| |
|
4942 |
((newColors size < newColorMap size) and: [(newColors includes: clr) not]) |
|
4943 |
ifTrue:[ |
|
4944 |
newColors add: clr |
|
4945 |
] |
|
4946 |
]. |
|
4947 |
image colorMap: newColors. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4948 |
]. |
1446 | 4949 |
image fileName: oldFileName. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4950 |
|
1054 | 4951 |
(imageEditView image: image) notNil ifTrue:[ |
1446 | 4952 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4953 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4954 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4955 |
|
2174 | 4956 |
"Modified: / 20-07-2007 / 09:18:59 / cg" |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4957 |
! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4958 |
|
2192 | 4959 |
colorize |
4960 |
"interactive Hue editing" |
|
4961 |
||
4962 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
4963 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
|
4964 |
originalPixels p| |
|
4965 |
||
4966 |
"/ compute the averageColor in the background (while asking user) |
|
4967 |
readySema := Semaphore new. |
|
4968 |
[ |
|
4969 |
|image| |
|
4970 |
||
4971 |
image := imageEditView image. |
|
4972 |
originalColormap := image colorMap copy. |
|
4973 |
avgColor := image averageColor. |
|
4974 |
originalPixels := image bits. |
|
4975 |
readySema signal. |
|
4976 |
] forkAt:7. |
|
4977 |
||
4978 |
acceptChannel := TriggerValue new. |
|
4979 |
avgColorHolder := avgColor asValue. |
|
4980 |
||
4981 |
firstChange := true. |
|
4982 |
||
4983 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
|
4984 |
Color |
|
4985 |
hue:((clr hue) ? 0 + hShift) |
|
4986 |
light:((clr light * lFactor / 100) "min:100") |
|
4987 |
saturation:(((clr saturation max:20) * sFactor / 100) "min:100")]. |
|
4988 |
||
4989 |
||
4990 |
shiftAction := |
|
4991 |
[ |
|
4992 |
|hShift lFactor sFactor| |
|
4993 |
||
4994 |
acceptChannel value:true. |
|
4995 |
||
4996 |
firstChange ifTrue:[ |
|
4997 |
imageEditView makeUndo. |
|
4998 |
firstChange := false. |
|
4999 |
]. |
|
5000 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
|
5001 |
||
5002 |
hShift := hueShift value. |
|
5003 |
lFactor := lightValue value. |
|
5004 |
sFactor := saturationValue value. |
|
5005 |
||
5006 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
|
5007 |
||
5008 |
shiftProcess notNil ifTrue:[ |
|
5009 |
shiftProcess terminate. |
|
5010 |
shiftProcess waitUntilTerminated. |
|
5011 |
shiftProcess := nil. |
|
5012 |
]. |
|
5013 |
shiftProcess := |
|
5014 |
[ |
|
5015 |
[ |
|
5016 |
imageEditView image |
|
5017 |
colorMap:originalColormap copy; |
|
5018 |
bits:originalPixels copy; |
|
5019 |
release; |
|
5020 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
5021 |
self updateImage. |
|
5022 |
self updateInfoLabel. |
|
5023 |
self updateImagePreView. |
|
5024 |
] ensure:[ shiftProcess := nil ]. |
|
5025 |
] forkAt:7. |
|
5026 |
]. |
|
5027 |
||
5028 |
bindings := IdentityDictionary new. |
|
5029 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
|
5030 |
hueShift onChangeEvaluate:shiftAction. |
|
5031 |
||
5032 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
5033 |
lightValue onChangeEvaluate:shiftAction. |
|
5034 |
||
5035 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
5036 |
saturationValue onChangeEvaluate:shiftAction. |
|
5037 |
||
5038 |
bindings at:#acceptChannel put:acceptChannel. |
|
5039 |
bindings at:#hlsColor put:avgColorHolder. |
|
5040 |
||
5041 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
5042 |
ifFalse:[ |
|
5043 |
firstChange ~~ true ifTrue:[ |
|
5044 |
imageEditView undo |
|
5045 |
] |
|
5046 |
]. |
|
5047 |
||
5048 |
(p := shiftProcess) notNil ifTrue:[ |
|
5049 |
p waitUntilTerminated. |
|
5050 |
]. |
|
5051 |
self updateImage. |
|
5052 |
self updateImagePreView. |
|
5053 |
||
5054 |
"Created: / 01-11-2007 / 23:27:37 / cg" |
|
5055 |
! |
|
5056 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5057 |
compressColorMap |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5058 |
"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
|
5059 |
|
927 | 5060 |
|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
|
5061 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5062 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5063 |
depth := oldImage depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5064 |
|
1403 | 5065 |
usedColors := oldImage realUsedColors. |
2652 | 5066 |
|
5067 |
"/ translation table |
|
5068 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
5069 |
newColorMap := usedColors asArray. |
|
5070 |
newColorMap sort:self sortBlockForColors. |
|
2718 | 5071 |
oldImage colorMap notNil ifTrue:[ |
5072 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
5073 |
|newPixel| |
|
5074 |
||
5075 |
(usedColors includes:clr) ifTrue:[ |
|
5076 |
newPixel := newColorMap indexOf:clr. |
|
5077 |
oldToNew at:oldIdx put:newPixel-1. |
|
5078 |
] |
|
5079 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5080 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5081 |
|
2652 | 5082 |
oldBits := oldImage bits. |
5083 |
newBits := ByteArray new:(oldBits size). |
|
5084 |
depth ~~ 8 ifTrue:[ |
|
5085 |
"/ expand/compress can only handle 8bits |
|
5086 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
5087 |
oldBits |
|
5088 |
expandPixels:depth |
|
5089 |
width:oldImage width |
|
5090 |
height:oldImage height |
|
5091 |
into:tmpBits |
|
5092 |
mapping:oldToNew. |
|
5093 |
tmpBits |
|
5094 |
compressPixels:depth |
|
5095 |
width:oldImage width |
|
5096 |
height:oldImage height |
|
5097 |
into:newBits |
|
5098 |
mapping:nil |
|
5099 |
] ifFalse:[ |
|
5100 |
oldBits |
|
5101 |
expandPixels:depth |
|
5102 |
width:oldImage width |
|
5103 |
height:oldImage height |
|
5104 |
into:newBits |
|
5105 |
mapping:oldToNew. |
|
5106 |
]. |
|
5107 |
||
5108 |
newImage := oldImage species new |
|
5109 |
width:oldImage width |
|
5110 |
height:oldImage height |
|
5111 |
depth:depth |
|
5112 |
fromArray:newBits. |
|
5113 |
||
5114 |
newImage colorMap:newColorMap. |
|
5115 |
newImage fileName:oldImage fileName. |
|
5116 |
newImage mask:(oldImage mask copy). |
|
5117 |
||
5118 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5119 |
self fetchImageData. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5120 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5121 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5122 |
"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
|
5123 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
1008 | 5124 |
! |
5125 |
||
1852 | 5126 |
copyColorFromColormap |
1871 | 5127 |
imageEditView setClipboardObject:(self selectedColorOrNil) |
1852 | 5128 |
! |
5129 |
||
2054 | 5130 |
ditherToDepth |
5131 |
|depth| |
|
5132 |
||
5133 |
depth := Dialog request:'New depth ?'. |
|
5134 |
depth isEmptyOrNil ifTrue:[^ self]. |
|
5135 |
depth := Number readFrom:depth onError:nil. |
|
5136 |
depth isNil ifTrue:[^ self]. |
|
5137 |
||
5138 |
self ditherToDepth:depth |
|
5139 |
||
5140 |
"Created: / 07-07-2006 / 13:22:10 / cg" |
|
5141 |
! |
|
5142 |
||
5143 |
ditherToDepth:depth |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5144 |
|ditherColors newImage useStandardColors nGrey greyColorsAlready additionalGreyColors moreColors d| |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5145 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5146 |
useStandardColors := true. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5147 |
"/ useStandardColors := Dialog confirmWithCancel:'Dither in standard colors or use a new (optimized) colormap ?'. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5148 |
"/ useStandardColors isNil ifTrue:[^ self]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5149 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5150 |
useStandardColors ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5151 |
depth = 1 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5152 |
ditherColors := Array with:(Color black) with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5153 |
] ifFalse:[ depth = 2 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5154 |
ditherColors := Array |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5155 |
with:(Color black) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5156 |
with:(Color darkGrey) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5157 |
with:(Color lightGrey) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5158 |
with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5159 |
] ifFalse:[ depth = 3 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5160 |
ditherColors := Color colorCubeWithRed:2 green:2 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5161 |
] ifFalse:[ depth = 4 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5162 |
ditherColors := Color vgaColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5163 |
] ifFalse:[ depth = 5 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5164 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5165 |
] ifFalse:[ depth = 6 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5166 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:3. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5167 |
] ifFalse:[ depth <= 8 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5168 |
ditherColors := Color colorCubeWithRed:6 green:6 blue:5. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5169 |
] ifFalse:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5170 |
self error:'unsupported depth'. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5171 |
]]]]]]]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5172 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5173 |
nGrey := (2 raisedTo:depth) - ditherColors size. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5174 |
nGrey > 0 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5175 |
nGrey := nGrey min:128. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5176 |
greyColorsAlready := ditherColors select:[:clr | clr isGreyColor]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5177 |
d := 1 / nGrey. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5178 |
moreColors := (1 to:nGrey-1) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5179 |
collect:[:i | Color brightness:(d * i)] |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5180 |
thenReject:[:clr | greyColorsAlready includes:clr ]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5181 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5182 |
ditherColors := ditherColors , moreColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5183 |
]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5184 |
] ifFalse:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5185 |
self halt. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5186 |
]. |
2054 | 5187 |
|
5188 |
self withExecuteCursorDo:[ |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5189 |
"/ newImage := self image asDitheredImageUsing:ditherColors depth:depth. |
2054 | 5190 |
newImage := self image asDitheredImageUsing:ditherColors depth:8. |
5191 |
||
5192 |
imageEditView makeUndo. |
|
5193 |
imageEditView image:newImage. |
|
5194 |
imageEditView setModified. |
|
5195 |
self updateImage. |
|
5196 |
self updateImagePreView. |
|
5197 |
||
5198 |
self fetchImageData. |
|
5199 |
]. |
|
5200 |
||
5201 |
"Created: / 07-07-2006 / 13:20:56 / cg" |
|
2073 | 5202 |
"Modified: / 05-09-2006 / 16:13:25 / cg" |
2054 | 5203 |
! |
5204 |
||
2174 | 5205 |
doubleClickOnColor:aColorIndex |
5206 |
self editSelectedColor. |
|
5207 |
||
5208 |
"Created: / 22-07-2007 / 13:14:37 / cg" |
|
5209 |
! |
|
5210 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5211 |
editSelectedColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5212 |
self processSelectedColorWith:[:clr | |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5213 |
|editor| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5214 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5215 |
editor := ColorEditDialog new. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5216 |
editor color:clr. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5217 |
editor open. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5218 |
editor accepted ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5219 |
AbortOperationRequest raise. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5220 |
]. |
2575
43e98f6d71d2
ColorEditDialog was grazy - adapted to changed protocol
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5221 |
editor colorNameOrColor |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5222 |
] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5223 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5224 |
|
1446 | 5225 |
fetchImageData |
1460 | 5226 |
|image| |
5227 |
||
5228 |
(image := imageEditView image) notNil ifTrue:[ |
|
5229 |
self findColorMapMode. |
|
5230 |
self updateLabelsAndHistory. |
|
5231 |
] |
|
1446 | 5232 |
! |
5233 |
||
1544 | 5234 |
inspectColor |
2573 | 5235 |
|clrIndex clr| |
5236 |
||
5237 |
self hasColormap ifFalse:[ |
|
5238 |
clr := self selectedColorOrNil |
|
5239 |
] ifTrue:[ |
|
5240 |
clrIndex := self selectedColorIndexOrNil. |
|
5241 |
clrIndex isNil ifTrue:[ |
|
5242 |
^ self |
|
5243 |
]. |
|
5244 |
clr := self image colorFromValue:clrIndex-1 |
|
1544 | 5245 |
]. |
2573 | 5246 |
clr inspect |
1544 | 5247 |
! |
5248 |
||
2651 | 5249 |
inspectColormap |
5250 |
self hasColormap ifTrue:[ |
|
5251 |
self image colorMap inspect |
|
5252 |
]. |
|
5253 |
! |
|
5254 |
||
1598 | 5255 |
makeBrighter |
5256 |
| anyChange| |
|
5257 |
||
5258 |
self withExecuteCursorDo:[ |
|
5259 |
anyChange := imageEditView makeBrighter. |
|
5260 |
anyChange ifFalse:[ |
|
5261 |
Dialog warn:'Image unchanged'. |
|
5262 |
] ifTrue:[ |
|
5263 |
self updateImage. |
|
5264 |
] |
|
5265 |
]. |
|
5266 |
! |
|
5267 |
||
5268 |
makeDarker |
|
5269 |
| anyChange| |
|
5270 |
||
5271 |
self withExecuteCursorDo:[ |
|
5272 |
anyChange := imageEditView makeDarker. |
|
5273 |
anyChange ifFalse:[ |
|
5274 |
Dialog warn:'Image unchanged'. |
|
5275 |
] ifTrue:[ |
|
5276 |
self updateImage. |
|
5277 |
] |
|
5278 |
]. |
|
5279 |
! |
|
5280 |
||
1926 | 5281 |
makeGrayScaleImage |
1598 | 5282 |
|anyChange| |
1436 | 5283 |
|
5284 |
self withExecuteCursorDo:[ |
|
1926 | 5285 |
anyChange := imageEditView makeGrayScaleImage. |
1436 | 5286 |
anyChange ifFalse:[ |
5287 |
Dialog warn:'Image unchanged'. |
|
5288 |
] ifTrue:[ |
|
1598 | 5289 |
self updateImage. |
5290 |
] |
|
5291 |
]. |
|
5292 |
! |
|
5293 |
||
5294 |
makeInverse |
|
5295 |
| anyChange| |
|
5296 |
||
5297 |
self withExecuteCursorDo:[ |
|
5298 |
anyChange := imageEditView makeInverse. |
|
5299 |
anyChange ifFalse:[ |
|
5300 |
Dialog warn:'Image unchanged'. |
|
5301 |
] ifTrue:[ |
|
5302 |
self updateImage. |
|
1436 | 5303 |
] |
5304 |
]. |
|
5305 |
! |
|
5306 |
||
1446 | 5307 |
makeSelectedColorBrighter |
1682 | 5308 |
self processSelectedColorWith:[:clr | clr lightened] |
1446 | 5309 |
! |
5310 |
||
5311 |
makeSelectedColorDarker |
|
1682 | 5312 |
self processSelectedColorWith:[:clr | clr darkened] |
1446 | 5313 |
! |
5314 |
||
1884 | 5315 |
makeSelectedColorGray |
5316 |
self processSelectedColorWith:[:clr | Color brightness:(clr brightness)] |
|
5317 |
! |
|
5318 |
||
2826 | 5319 |
makeSlightlyBrighter |
5320 |
| anyChange| |
|
5321 |
||
5322 |
self withExecuteCursorDo:[ |
|
5323 |
anyChange := imageEditView makeSlightlyBrighter. |
|
5324 |
anyChange ifFalse:[ |
|
5325 |
Dialog warn:'Image unchanged'. |
|
5326 |
] ifTrue:[ |
|
5327 |
self updateImage. |
|
5328 |
] |
|
5329 |
]. |
|
5330 |
||
5331 |
"Created: / 24-11-2010 / 11:06:11 / cg" |
|
5332 |
! |
|
5333 |
||
5334 |
makeSlightlyDarker |
|
5335 |
| anyChange| |
|
5336 |
||
5337 |
self withExecuteCursorDo:[ |
|
5338 |
anyChange := imageEditView makeSlightlyDarker. |
|
5339 |
anyChange ifFalse:[ |
|
5340 |
Dialog warn:'Image unchanged'. |
|
5341 |
] ifTrue:[ |
|
5342 |
self updateImage. |
|
5343 |
] |
|
5344 |
]. |
|
5345 |
||
5346 |
"Created: / 24-11-2010 / 11:06:23 / cg" |
|
5347 |
! |
|
5348 |
||
2652 | 5349 |
menu_clearColormapEntry0AndMaskedPixels |
5350 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
5351 |
0 and then clear all masked pixels (to pixelValue 0)" |
|
5352 |
||
5353 |
imageEditView makeUndo. |
|
5354 |
self withExecuteCursorDo:[ |
|
5355 |
self clearColormapEntry0AndMaskedPixels |
|
5356 |
] |
|
5357 |
! |
|
5358 |
||
5359 |
menu_clearMaskedPixels |
|
5360 |
"clear all masked pixels (to pixelValue 0)" |
|
5361 |
||
5362 |
imageEditView makeUndo. |
|
5363 |
||
5364 |
self withExecuteCursorDo:[ |
|
5365 |
self clearMaskedPixels |
|
5366 |
] |
|
5367 |
! |
|
5368 |
||
5369 |
menu_compressColorMap |
|
5370 |
"calculates a new color map for the image, using only used colors" |
|
5371 |
||
5372 |
|depth oldImage usedColors| |
|
5373 |
||
5374 |
oldImage := self image. |
|
5375 |
depth := oldImage depth. |
|
5376 |
||
5377 |
oldImage photometric ~~ #palette ifTrue:[ |
|
5378 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
1852 | 5379 |
^ self |
5380 |
]. |
|
2652 | 5381 |
usedColors := oldImage realUsedColors. |
5382 |
usedColors size == (1 bitShift:depth) ifTrue:[ |
|
5383 |
self information:'Compress colorMap: All colors are used - no compression.'. |
|
5384 |
^ self |
|
5385 |
]. |
|
5386 |
usedColors size == oldImage colorMap size ifTrue:[ |
|
5387 |
self information:'Compress colorMap: Colormap already compressed - no compression.'. |
|
5388 |
^ self |
|
5389 |
]. |
|
5390 |
||
5391 |
imageEditView makeUndo. |
|
5392 |
||
5393 |
self withExecuteCursorDo:[ |
|
5394 |
self compressColorMap |
|
1852 | 5395 |
] |
5396 |
! |
|
5397 |
||
2652 | 5398 |
menu_copyMask |
5399 |
|mask| |
|
5400 |
||
5401 |
mask := self image mask. |
|
5402 |
MaskClipboard := mask subImageIn: (0@0 extent:mask extent). |
|
5403 |
! |
|
5404 |
||
5405 |
menu_pasteMask |
|
1480 | 5406 |
|img mask| |
5407 |
||
5408 |
imageEditView makeUndo. |
|
5409 |
||
5410 |
img := self image. |
|
5411 |
mask := img mask. |
|
5412 |
||
5413 |
mask |
|
5414 |
copyFrom:MaskClipboard |
|
5415 |
x:0 y:0 |
|
5416 |
toX:0 y:0 |
|
5417 |
width:(mask width min:MaskClipboard width) |
|
5418 |
height:(mask height min:MaskClipboard height). |
|
5419 |
img mask:mask. |
|
5420 |
(imageEditView image:img copy) notNil ifTrue:[ |
|
5421 |
self fetchImageData. |
|
5422 |
] |
|
5423 |
! |
|
5424 |
||
2652 | 5425 |
menu_sortColorMap |
5426 |
"calculates a new color map for the image, sorting colors" |
|
5427 |
||
5428 |
self menu_sortColorMapWith:self sortBlockForColors |
|
5429 |
! |
|
5430 |
||
5431 |
menu_sortColorMapWith:sortBlock |
|
5432 |
"calculates a new color map for the image, sorting colors" |
|
5433 |
||
5434 |
self image photometric ~~ #palette ifTrue:[ |
|
5435 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
5436 |
^ self |
|
5437 |
]. |
|
5438 |
||
5439 |
imageEditView makeUndo. |
|
5440 |
||
5441 |
self withExecuteCursorDo:[ |
|
5442 |
self sortColorMapWith:sortBlock |
|
5443 |
] |
|
5444 |
||
5445 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
5446 |
"Created: / 30.9.1998 / 23:51:23 / cg" |
|
5447 |
! |
|
5448 |
||
5449 |
pasteColorIntoColormap |
|
5450 |
|copyBufferColor| |
|
5451 |
||
5452 |
copyBufferColor := imageEditView getClipboardObject. |
|
5453 |
copyBufferColor isColor ifFalse:[ |
|
5454 |
UserPreferences current beepInEditor ifTrue:[ |
|
5455 |
self window beep. |
|
5456 |
]. |
|
5457 |
^ self |
|
5458 |
]. |
|
5459 |
||
5460 |
self processSelectedColorWith:[:clr | |
|
5461 |
copyBufferColor |
|
5462 |
] |
|
5463 |
! |
|
5464 |
||
1682 | 5465 |
pickAndAddColorToColormap |
5466 |
self addColorToColormap:(Color fromUser) |
|
5467 |
! |
|
5468 |
||
1933 | 5469 |
pickAndPasteColor |
5470 |
self pickColor. |
|
5471 |
self pasteColorIntoColormap. |
|
5472 |
! |
|
5473 |
||
1852 | 5474 |
pickColor |
1871 | 5475 |
imageEditView setClipboardObject:(Color fromUser) |
1852 | 5476 |
! |
5477 |
||
1682 | 5478 |
processSelectedColorWith:aBlock |
1852 | 5479 |
"undoable color processing: the selected color will be replaced by the |
5480 |
value of aBlock" |
|
5481 |
||
5482 |
|img cMap modifiedColormap oldColor newImage selectedColorIndex oldSelection newColor| |
|
1682 | 5483 |
|
5484 |
selectedColorIndex := self selectedColorIndexOrNil. |
|
5485 |
selectedColorIndex isNil ifTrue:[^ self]. |
|
5486 |
||
5487 |
img := self image. |
|
5488 |
cMap := img colorMap. |
|
5489 |
cMap isNil ifTrue:[ |
|
1916 | 5490 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1682 | 5491 |
^ self |
5492 |
]. |
|
1852 | 5493 |
|
5494 |
oldColor := cMap at:selectedColorIndex. |
|
1682 | 5495 |
imageEditView makeUndo. |
5496 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5497 |
modifiedColormap := cMap asArray copy. |
1852 | 5498 |
|
5499 |
newColor := aBlock value:oldColor. |
|
1859 | 5500 |
modifiedColormap at:selectedColorIndex put:newColor. |
1682 | 5501 |
|
5502 |
newImage := img species new |
|
5503 |
width:img width |
|
5504 |
height:img height |
|
1843 | 5505 |
depth:img depth |
1682 | 5506 |
fromArray:img bits. |
5507 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5508 |
newImage colorMap:modifiedColormap. |
1682 | 5509 |
newImage fileName:img fileName. |
5510 |
newImage mask:(img mask copy). |
|
5511 |
||
5512 |
oldSelection := self selectionOfColor value. |
|
5513 |
||
5514 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5515 |
self fetchImageData. |
|
5516 |
]. |
|
5517 |
self selectionOfColor value:oldSelection. |
|
5518 |
||
5519 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
|
5520 |
"Modified: / 16.3.1999 / 21:57:26 / cg" |
|
5521 |
! |
|
5522 |
||
1124 | 5523 |
reduceNumberOfColors |
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5524 |
|s n anyChange img usedColors| |
1124 | 5525 |
|
2817 | 5526 |
s := Dialog request:'Number of color bits to strip (1-7) ?' initialAnswer:3. |
1435 | 5527 |
s size == 0 ifTrue:[^ self]. |
1934 | 5528 |
|
1124 | 5529 |
n := Integer readFrom:s onError:0. |
5530 |
(n between:1 and:7) ifFalse:[ |
|
5531 |
Dialog warn:'Image unchanged'. |
|
5532 |
^ self |
|
5533 |
]. |
|
5534 |
||
5535 |
self withExecuteCursorDo:[ |
|
5536 |
anyChange := imageEditView reduceColorResolutionBy:n. |
|
5537 |
anyChange ifFalse:[ |
|
5538 |
Dialog warn:'Image unchanged'. |
|
5539 |
] ifTrue:[ |
|
5540 |
img := imageEditView image. |
|
5541 |
imageEditView image:img. |
|
1446 | 5542 |
|
5543 |
self fetchImageData. |
|
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5544 |
usedColors := img usedColorsMax:10000. |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5545 |
usedColors size == 10000 ifTrue:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5546 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5547 |
] ifFalse:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5548 |
Dialog information:(usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5549 |
] |
1124 | 5550 |
] |
5551 |
]. |
|
2817 | 5552 |
|
5553 |
"Modified: / 29-10-2010 / 18:08:01 / cg" |
|
1124 | 5554 |
! |
5555 |
||
1930 | 5556 |
reduceNumberOfColors2 |
1938 | 5557 |
|s rndR rndG rndB usedColors image newImage| |
5558 |
||
5559 |
s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4. |
|
1934 | 5560 |
s size == 0 ifTrue:[^ self]. |
1938 | 5561 |
rndR := Integer readFrom:s onError:0. |
1939 | 5562 |
|
1938 | 5563 |
s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2. |
5564 |
s size == 0 ifTrue:[^ self]. |
|
5565 |
rndG := Integer readFrom:s onError:0. |
|
1939 | 5566 |
|
1938 | 5567 |
s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10. |
5568 |
s size == 0 ifTrue:[^ self]. |
|
5569 |
rndB := Integer readFrom:s onError:0. |
|
1939 | 5570 |
|
5571 |
((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[ |
|
1930 | 5572 |
Dialog warn:'Image unchanged'. |
5573 |
^ self |
|
5574 |
]. |
|
5575 |
||
5576 |
self withExecuteCursorDo:[ |
|
1934 | 5577 |
image := self image. |
2054 | 5578 |
"/ usedColors := image usedColorsMax:4096. |
1934 | 5579 |
imageEditView makeUndo. |
5580 |
||
5581 |
newImage := image copy. |
|
2260 | 5582 |
newImage photometric == #palette ifTrue:[ |
5583 |
newImage colorMap:(OrderedCollection new). |
|
5584 |
]. |
|
5585 |
||
1934 | 5586 |
image |
5587 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
5588 |
do:[:x :y :clr | |
|
5589 |
|r g b nr ng nb newClr| |
|
5590 |
||
5591 |
r := clr redByte. |
|
5592 |
g := clr greenByte. |
|
5593 |
b := clr blueByte. |
|
1938 | 5594 |
nr := (r roundTo:rndR) min:255. |
5595 |
ng := (g roundTo:rndG) min:255. |
|
5596 |
nb := (b roundTo:rndB) min:255. |
|
1934 | 5597 |
|
5598 |
newClr := Color redByte:nr greenByte:ng blueByte:nb. |
|
2260 | 5599 |
newImage photometric == #palette ifTrue:[ |
5600 |
(newImage colorMap includes:newClr) ifFalse:[ |
|
5601 |
newImage colorMap add:newClr |
|
5602 |
]. |
|
5603 |
]. |
|
1934 | 5604 |
newImage colorAtX:x y:y put:newClr |
5605 |
]. |
|
5606 |
||
5607 |
imageEditView image:newImage. |
|
5608 |
imageEditView setModified. |
|
5609 |
self updateImage. |
|
5610 |
self updateImagePreView. |
|
5611 |
||
5612 |
self fetchImageData. |
|
5613 |
usedColors := newImage usedColorsMax:10000. |
|
5614 |
usedColors size == 10000 ifTrue:[ |
|
5615 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
|
5616 |
] ifFalse:[ |
|
5617 |
Dialog information:(usedColors size printString , ' colors used.') |
|
5618 |
] |
|
1930 | 5619 |
]. |
2054 | 5620 |
|
5621 |
"Modified: / 07-07-2006 / 13:10:42 / cg" |
|
1930 | 5622 |
! |
5623 |
||
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5624 |
selectColor:aColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5625 |
|idx img cMap| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5626 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5627 |
aColor isNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5628 |
idx := nil. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5629 |
] ifFalse:[ |
2791 | 5630 |
img := self image. |
5631 |
img notNil ifTrue: [ |
|
5632 |
aColor == Color noColor ifTrue:[ |
|
5633 |
(img mask notNil) ifTrue:[ |
|
5634 |
idx := 1. |
|
5635 |
] |
|
5636 |
] ifFalse:[ |
|
2447 | 5637 |
(cMap := self listOfColors) notNil ifTrue:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5638 |
idx := cMap indexOf:aColor ifAbsent:nil. |
2447 | 5639 |
]. |
5640 |
idx isNil ifTrue:[ |
|
5641 |
"/ should not happen... |
|
5642 |
(cMap := img colorMap) notNil ifTrue:[ |
|
5643 |
idx := cMap indexOf:aColor ifAbsent:nil. |
|
5644 |
idx notNil ifTrue:[ |
|
5645 |
img mask notNil ifTrue:[ |
|
5646 |
idx := idx + 1. |
|
5647 |
]. |
|
5648 |
] |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5649 |
]. |
2447 | 5650 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5651 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5652 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5653 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5654 |
self selectionOfColor value:idx. |
2790 | 5655 |
|
2791 | 5656 |
"Modified: / 02-07-2010 / 12:06:07 / cg" |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5657 |
! |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5658 |
|
1682 | 5659 |
selectedColorIndexOrNil |
2651 | 5660 |
|img clrIndex| |
1682 | 5661 |
|
5662 |
img := self image. |
|
5663 |
img isNil ifTrue:[ |
|
2764 | 5664 |
"/ self warn:'No Image.'. |
1682 | 5665 |
^ nil |
5666 |
]. |
|
5667 |
clrIndex := self selectionOfColor value. |
|
1896 | 5668 |
self hasMask "img mask notNil" ifTrue: [ |
2449
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5669 |
(clrIndex isInteger and:[clrIndex > 1]) ifTrue:[ |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5670 |
^ clrIndex - 1 |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5671 |
]. |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5672 |
^ nil |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5673 |
]. |
1682 | 5674 |
^ clrIndex |
5675 |
! |
|
5676 |
||
1852 | 5677 |
selectedColorOrNil |
2447 | 5678 |
|cmapIndex img cMap colorList| |
1896 | 5679 |
|
5680 |
cmapIndex := self selectedColorIndexOrNil. |
|
1900 | 5681 |
cmapIndex isNil ifTrue:[^ nil]. |
2556 | 5682 |
cmapIndex == 0 ifTrue:[^ nil]. |
1852 | 5683 |
|
5684 |
img := self image. |
|
5685 |
cMap := img colorMap. |
|
5686 |
cMap isNil ifTrue:[ |
|
2447 | 5687 |
"/ self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
5688 |
colorList := self listOfColors. |
|
5689 |
colorList notNil ifTrue:[ |
|
5690 |
^ colorList at:cmapIndex ifAbsent:nil |
|
5691 |
]. |
|
1900 | 5692 |
^ nil |
1852 | 5693 |
]. |
1896 | 5694 |
^ cMap at:cmapIndex. |
1852 | 5695 |
! |
5696 |
||
1008 | 5697 |
sortColorMap |
5698 |
"calculates a new color map for the image, sorting colors" |
|
5699 |
||
2652 | 5700 |
self sortColorMapWith:self sortBlockForColors |
1939 | 5701 |
! |
5702 |
||
5703 |
sortColorMapWith:sortBlock |
|
5704 |
"calculates a new color map for the image, sorting colors" |
|
5705 |
||
1008 | 5706 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| |
5707 |
||
5708 |
oldImage := self image. |
|
5709 |
depth := oldImage depth. |
|
5710 |
||
2652 | 5711 |
usedColors := oldImage realColorMap. |
5712 |
||
5713 |
||
5714 |
"/ translation table |
|
5715 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
5716 |
newColorMap := usedColors asArray. |
|
5717 |
newColorMap sort:sortBlock. |
|
5718 |
||
5719 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
5720 |
|newPixel| |
|
5721 |
||
5722 |
(usedColors includes:clr) ifTrue:[ |
|
5723 |
newPixel := newColorMap indexOf:clr. |
|
5724 |
oldToNew at:oldIdx put:newPixel-1. |
|
5725 |
] |
|
1008 | 5726 |
]. |
5727 |
||
2652 | 5728 |
oldBits := oldImage bits. |
5729 |
newBits := ByteArray new:(oldBits size). |
|
5730 |
depth ~~ 8 ifTrue:[ |
|
5731 |
"/ expand/compress can only handle 8bits |
|
5732 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
5733 |
oldBits |
|
5734 |
expandPixels:depth |
|
5735 |
width:oldImage width |
|
5736 |
height:oldImage height |
|
5737 |
into:tmpBits |
|
5738 |
mapping:oldToNew. |
|
5739 |
tmpBits |
|
5740 |
compressPixels:depth |
|
5741 |
width:oldImage width |
|
5742 |
height:oldImage height |
|
5743 |
into:newBits |
|
5744 |
mapping:nil |
|
5745 |
] ifFalse:[ |
|
5746 |
oldBits |
|
5747 |
expandPixels:depth |
|
5748 |
width:oldImage width |
|
5749 |
height:oldImage height |
|
5750 |
into:newBits |
|
5751 |
mapping:oldToNew. |
|
5752 |
]. |
|
5753 |
||
5754 |
newImage := oldImage species new |
|
5755 |
width:oldImage width |
|
5756 |
height:oldImage height |
|
5757 |
depth:depth |
|
5758 |
fromArray:newBits. |
|
5759 |
||
5760 |
newImage colorMap:newColorMap. |
|
5761 |
newImage fileName:oldImage fileName. |
|
5762 |
newImage mask:(oldImage mask copy). |
|
5763 |
||
5764 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5765 |
self fetchImageData. |
|
1008 | 5766 |
] |
5767 |
||
5768 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
5769 |
"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
|
5770 |
! ! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5771 |
|
1715 | 5772 |
!ImageEditor methodsFor:'user actions-editing'! |
400 | 5773 |
|
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5774 |
do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5775 |
|box dx1 dx2 image| |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5776 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5777 |
image := imageEditView image. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5778 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5779 |
box := EnterBox new. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5780 |
box title:(resources string:'dX1 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5781 |
box okText:(resources string:'OK'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5782 |
box abortText:(resources string:'Cancel'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5783 |
box initialText:'0.1'. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5784 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5785 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5786 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5787 |
and: [(dx1 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5788 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5789 |
box title:(resources string:'dX2 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5790 |
box initialText:(dx1 printString). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5791 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5792 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5793 |
and: [(dx2 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5794 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5795 |
imageEditView threeDProjection:dx1 and:dx2. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5796 |
] |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5797 |
]. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5798 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5799 |
self updateInfoLabel |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5800 |
! |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5801 |
|
1882 | 5802 |
doBrightenImage |
5803 |
imageEditView brightenImage. |
|
5804 |
self listOfColors removeAll. |
|
5805 |
self findColorMapMode. |
|
2585 | 5806 |
"/ imageEditView removelastUndo |
1882 | 5807 |
! |
5808 |
||
767 | 5809 |
doBrowseClass |
5810 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
400 | 5811 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5812 |
|cls| |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5813 |
|
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
5814 |
cls := imageEditView resourceClass. |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5815 |
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
|
5816 |
|
1488 | 5817 |
UserPreferences systemBrowserClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5818 |
openInClass:cls class |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5819 |
selector:(imageEditView resourceSelector) |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5820 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5821 |
"Modified: / 31.7.1998 / 02:01:15 / cg" |
400 | 5822 |
! |
5823 |
||
1703 | 5824 |
doCopyImageToClipboard |
5825 |
imageEditView copyImageToClipboard. |
|
5826 |
! |
|
5827 |
||
1045 | 5828 |
doCropAll |
986 | 5829 |
"find all borders and cut them off" |
5830 |
||
1045 | 5831 |
imageEditView cropLeft:true right:true top:true bottom:true. |
986 | 5832 |
self updateInfoLabel |
5833 |
||
5834 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
5835 |
"Created: / 7.9.1998 / 16:33:43 / cg" |
|
5836 |
! |
|
5837 |
||
1045 | 5838 |
doCropBottom |
986 | 5839 |
"find a bottom border and cut it off" |
5840 |
||
1045 | 5841 |
imageEditView cropLeft:false right:false top:false bottom:true. |
986 | 5842 |
self updateInfoLabel |
5843 |
||
5844 |
"Created: / 7.9.1998 / 13:00:20 / cg" |
|
5845 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
5846 |
! |
|
5847 |
||
1045 | 5848 |
doCropLeft |
986 | 5849 |
"find a left border and cut it off" |
5850 |
||
1045 | 5851 |
imageEditView cropLeft:true right:false top:false bottom:false. |
986 | 5852 |
self updateInfoLabel |
5853 |
||
5854 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
5855 |
"Modified: / 7.9.1998 / 14:26:34 / cg" |
|
5856 |
! |
|
5857 |
||
1045 | 5858 |
doCropManual |
986 | 5859 |
"let user specify borders and cut them off" |
5860 |
||
1502 | 5861 |
|bindings left top right bottom img firstChange gropAction acceptChannel| |
5862 |
||
5863 |
acceptChannel := TriggerValue new. |
|
1490 | 5864 |
|
5865 |
firstChange := true. |
|
5866 |
||
1502 | 5867 |
gropAction := |
5868 |
[:lV :rV :tV :bV | |l r t b| |
|
5869 |
acceptChannel value:true. |
|
5870 |
||
5871 |
l := lV value. |
|
5872 |
r := rV value. |
|
5873 |
t := tV value. |
|
5874 |
b := bV value. |
|
5875 |
(l + r + t + b) == 0 ifTrue:[ |
|
2520 | 5876 |
UserPreferences current beepInEditor ifTrue:[ |
5877 |
self window beep |
|
5878 |
] |
|
1502 | 5879 |
] ifFalse:[ |
5880 |
img := imageEditView image. |
|
5881 |
firstChange ifTrue:[ |
|
5882 |
imageEditView makeUndo. |
|
5883 |
firstChange := false. |
|
5884 |
]. |
|
5885 |
imageEditView |
|
5886 |
makeSubImageX:l y:t |
|
5887 |
width:(img width - l - r) |
|
5888 |
height:(img height - t - b). |
|
2546 | 5889 |
|
5890 |
self updateImagePreView. |
|
1502 | 5891 |
self updateInfoLabel |
5892 |
]. |
|
1490 | 5893 |
]. |
986 | 5894 |
|
5895 |
bindings := IdentityDictionary new. |
|
1507 | 5896 |
bindings at:#left put:(left := 1 asValue). |
5897 |
bindings at:#right put:(right := 1 asValue). |
|
5898 |
bindings at:#top put:(top := 1 asValue). |
|
5899 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1502 | 5900 |
bindings at:#acceptChannel put:acceptChannel. |
5901 |
||
5902 |
bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
|
5903 |
bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
|
5904 |
bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
|
5905 |
bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
|
5906 |
||
5907 |
bindings at:#applyAction put:[ gropAction value:left value:right value:top value:bottom ]. |
|
1490 | 5908 |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
5909 |
(self openDialogInterface:#cropDialogSpec withBindings:bindings) |
1507 | 5910 |
ifFalse:[ |
5911 |
firstChange ~~ true ifTrue:[ |
|
1558 | 5912 |
imageEditView undo. |
5913 |
self updateImagePreView. |
|
1507 | 5914 |
] |
5915 |
]. |
|
986 | 5916 |
|
5917 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
5918 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
5919 |
! |
|
5920 |
||
1045 | 5921 |
doCropRight |
986 | 5922 |
"find a right border and cut it off" |
5923 |
||
1045 | 5924 |
imageEditView cropLeft:false right:true top:false bottom:false. |
986 | 5925 |
self updateInfoLabel |
5926 |
||
5927 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
5928 |
"Modified: / 7.9.1998 / 14:26:44 / cg" |
|
5929 |
! |
|
5930 |
||
1045 | 5931 |
doCropTop |
986 | 5932 |
"find a top border and cut it off" |
5933 |
||
1045 | 5934 |
imageEditView cropLeft:false right:false top:true bottom:false. |
986 | 5935 |
self updateInfoLabel |
5936 |
||
5937 |
"Created: / 7.9.1998 / 13:00:19 / cg" |
|
5938 |
"Modified: / 7.9.1998 / 14:26:52 / cg" |
|
5939 |
! |
|
5940 |
||
1882 | 5941 |
doDarkenImage |
5942 |
imageEditView darkenImage. |
|
5943 |
self listOfColors removeAll. |
|
5944 |
self findColorMapMode. |
|
2585 | 5945 |
"/ imageEditView removelastUndo |
1882 | 5946 |
! |
5947 |
||
1433 | 5948 |
doEditMask |
5949 |
self image mask edit |
|
5950 |
! |
|
5951 |
||
767 | 5952 |
doFlipHorizontal |
5953 |
"flips horizontally current image" |
|
400 | 5954 |
|
911 | 5955 |
imageEditView flipHorizontal |
400 | 5956 |
! |
5957 |
||
767 | 5958 |
doFlipVertical |
5959 |
"flips vertically current image" |
|
400 | 5960 |
|
911 | 5961 |
imageEditView flipVertical |
400 | 5962 |
! |
5963 |
||
2196 | 5964 |
doInsertTextFromUser |
5965 |
|text tempForm tempImage maskImage font w h| |
|
5966 |
||
2424 | 5967 |
text := Dialog request:'Text to be inserted (placed as bitmap into clipboard for paste):'. |
5968 |
text isEmptyOrNil ifTrue:[^ self ]. |
|
2196 | 5969 |
|
5970 |
font := Font family:'arial' size:20. |
|
5971 |
font := font onDevice:Screen current. |
|
5972 |
w := font widthOf:text. |
|
5973 |
h := font heightOf:text. |
|
5974 |
||
5975 |
tempForm := Form extent:(w@h) depth:1 onDevice:(Screen current). |
|
5976 |
tempForm clear. |
|
5977 |
tempForm font:font. |
|
5978 |
tempForm paint:(Color colorId:1). |
|
5979 |
tempForm displayString:text at:(0@font ascent). |
|
5980 |
||
5981 |
tempImage := tempForm asImage. |
|
5982 |
maskImage := tempForm asImage. |
|
5983 |
tempImage |
|
5984 |
photometric:#palette; |
|
5985 |
colorMap:(Array with:Color white with:imageEditView selectedColor); |
|
5986 |
mask:maskImage. |
|
5987 |
||
5988 |
ImageEditView copyImageToClipboard:tempImage. |
|
5989 |
self editMode value:#paste. |
|
5990 |
||
5991 |
"Modified: / 11-11-2007 / 12:32:55 / cg" |
|
5992 |
! |
|
5993 |
||
1896 | 5994 |
doInspectImage |
5995 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
5996 |
||
5997 |
self image inspect |
|
5998 |
! |
|
5999 |
||
767 | 6000 |
doMagnifyDown |
1987 | 6001 |
"magnifies the current image one step down" |
400 | 6002 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6003 |
|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
|
6004 |
|
1987 | 6005 |
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
|
6006 |
(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
|
6007 |
magHolder value: mag - 1 |
400 | 6008 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6009 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6010 |
"Modified: / 26.7.1998 / 20:24:08 / cg" |
400 | 6011 |
! |
6012 |
||
767 | 6013 |
doMagnifyImage |
1479 | 6014 |
"magnifies the current image to a new size" |
400 | 6015 |
|
1353 | 6016 |
|box newSize image| |
6017 |
||
6018 |
image := imageEditView image. |
|
6019 |
||
6020 |
box := EnterBox new. |
|
6021 |
box title:(resources string:'Images new size:'). |
|
6022 |
box okText:(resources string:'OK'). |
|
6023 |
box abortText:(resources string:'Cancel'). |
|
6024 |
box initialText:image extent printString. |
|
6025 |
box showAtPointer. |
|
6026 |
(box accepted |
|
1960 | 6027 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6028 |
ifTrue:[ |
1479 | 6029 |
newSize isPoint ifFalse:[ |
6030 |
self warn:'please enter the new size as ''x @ y''.'. |
|
6031 |
^ self. |
|
6032 |
]. |
|
6033 |
imageEditView magnifyImageTo:newSize. |
|
6034 |
]. |
|
6035 |
||
6036 |
self updateInfoLabel |
|
6037 |
! |
|
6038 |
||
6039 |
doMagnifyImageBy |
|
6040 |
"magnifies the current image (by a scale)" |
|
6041 |
||
2260 | 6042 |
|box oldSize newSize scaleString scale image| |
1479 | 6043 |
|
6044 |
image := imageEditView image. |
|
6045 |
oldSize := image extent. |
|
6046 |
||
2260 | 6047 |
scaleString := Dialog |
6048 |
request:(resources string:'Scale factor (<1 to shrink; >1 to magnify):') |
|
6049 |
initialAnswer:'1' |
|
6050 |
list:#('0.25' '0.5' '2' '4'). |
|
6051 |
||
6052 |
"/ box := EnterBox new. |
|
6053 |
"/ box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):'). |
|
6054 |
"/ box okText:(resources string:'OK'). |
|
6055 |
"/ box abortText:(resources string:'Cancel'). |
|
6056 |
"/ box initialText:1 printString. |
|
6057 |
"/ box showAtPointer. |
|
6058 |
"/ box accepted ifTrue:[ |
|
6059 |
"/ scaleString := box contents. |
|
6060 |
"/ ]. |
|
6061 |
||
6062 |
scale := Object readFromString:scaleString onError:nil. |
|
6063 |
||
6064 |
scale notNil ifTrue:[ |
|
1479 | 6065 |
scale isNumber ifFalse:[ |
6066 |
self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'. |
|
6067 |
^ self. |
|
6068 |
]. |
|
6069 |
newSize := oldSize * scale. |
|
1353 | 6070 |
imageEditView magnifyImageTo:newSize. |
6071 |
]. |
|
6072 |
||
400 | 6073 |
self updateInfoLabel |
6074 |
! |
|
6075 |
||
767 | 6076 |
doMagnifyUp |
1987 | 6077 |
"magnifies the current image one step up" |
400 | 6078 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6079 |
|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
|
6080 |
|
1987 | 6081 |
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
|
6082 |
(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
|
6083 |
magHolder value: mag + 1 |
400 | 6084 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6085 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6086 |
"Modified: / 26.7.1998 / 20:23:52 / cg" |
400 | 6087 |
! |
6088 |
||
767 | 6089 |
doNegativeImage |
6090 |
"negates current image by negating the color map" |
|
400 | 6091 |
|
1598 | 6092 |
self image depth ~~ 1 ifTrue:[ |
6093 |
Dialog warn:'Only useful for depth 1 images'. |
|
6094 |
^ self |
|
6095 |
]. |
|
911 | 6096 |
imageEditView negativeImage. |
400 | 6097 |
self listOfColors removeAll. |
901 | 6098 |
self findColorMapMode. |
2585 | 6099 |
"/ imageEditView removelastUndo |
400 | 6100 |
! |
6101 |
||
767 | 6102 |
doResizeImage |
1353 | 6103 |
"resizes the current image" |
6104 |
||
6105 |
|box newSize image| |
|
6106 |
||
6107 |
image := imageEditView image. |
|
6108 |
||
6109 |
box := EnterBox new. |
|
6110 |
box title:(resources string:'Images new size:'). |
|
6111 |
box okText:(resources string:'OK'). |
|
6112 |
box abortText:(resources string:'Cancel'). |
|
6113 |
box initialText:image extent printString. |
|
6114 |
box showAtPointer. |
|
6115 |
(box accepted |
|
1960 | 6116 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6117 |
ifTrue:[ |
6118 |
imageEditView resizeImageTo:newSize. |
|
6119 |
]. |
|
400 | 6120 |
! |
6121 |
||
767 | 6122 |
doRotateImage |
6123 |
"rotates current image" |
|
400 | 6124 |
|
1353 | 6125 |
|box rotation| |
6126 |
||
6127 |
box := EnterBox new. |
|
6128 |
box title:(resources string:'Rotate by (degrees, clockwise):'). |
|
6129 |
box okText:(resources string:'OK'). |
|
6130 |
box abortText:(resources string:'Cancel'). |
|
6131 |
box initialText: '0'. |
|
6132 |
box showAtPointer. |
|
2196 | 6133 |
(box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil]) |
1353 | 6134 |
ifTrue:[ |
6135 |
imageEditView rotateImageBy:rotation. |
|
1558 | 6136 |
self updateInfoLabel. |
1353 | 6137 |
]. |
2196 | 6138 |
|
6139 |
"Modified: / 11-11-2007 / 13:21:11 / cg" |
|
400 | 6140 |
! |
6141 |
||
1557 | 6142 |
doShiftManual |
6143 |
"let user specify amount and shift" |
|
6144 |
||
1713 | 6145 |
|bindings amount img firstChange shiftAction acceptChannel wrapHolder| |
1557 | 6146 |
|
6147 |
acceptChannel := TriggerValue new. |
|
1960 | 6148 |
wrapHolder := (lastShiftUsedWrap ? true) asValue. |
1557 | 6149 |
|
6150 |
firstChange := true. |
|
6151 |
||
6152 |
shiftAction := |
|
6153 |
[:shiftH :shiftV | |
|
6154 |
acceptChannel value:true. |
|
6155 |
||
6156 |
img := imageEditView image. |
|
6157 |
firstChange ifTrue:[ |
|
6158 |
imageEditView makeUndo. |
|
6159 |
firstChange := false. |
|
6160 |
]. |
|
1713 | 6161 |
imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). |
1557 | 6162 |
self updateInfoLabel |
6163 |
]. |
|
6164 |
||
6165 |
bindings := IdentityDictionary new. |
|
6166 |
bindings at:#shiftAmount put:(amount := 1 asValue). |
|
1713 | 6167 |
bindings at:#wrap put:wrapHolder. |
1557 | 6168 |
bindings at:#acceptChannel put:acceptChannel. |
6169 |
||
6170 |
bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ]. |
|
6171 |
bindings at:#shiftRightNow put:[ shiftAction value:amount value value:0 ]. |
|
6172 |
bindings at:#shiftUpNow put:[ shiftAction value:0 value:(-1*amount value) ]. |
|
6173 |
bindings at:#shiftDownNow put:[ shiftAction value:0 value:amount value ]. |
|
6174 |
||
6175 |
(self openDialogInterface:#shiftDialogSpec withBindings:bindings) |
|
6176 |
ifFalse:[ |
|
6177 |
firstChange ~~ true ifTrue:[ |
|
6178 |
imageEditView undo |
|
6179 |
] |
|
6180 |
]. |
|
1960 | 6181 |
lastShiftUsedWrap := wrapHolder value. |
1557 | 6182 |
|
6183 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6184 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6185 |
! |
|
6186 |
||
1480 | 6187 |
doUnCropManual |
6188 |
"let user specify borders and add them" |
|
6189 |
||
6190 |
|bindings left top right bottom img| |
|
6191 |
||
6192 |
bindings := IdentityDictionary new. |
|
1704 | 6193 |
bindings at:#left put:(left := 1 asValue). |
6194 |
bindings at:#right put:(right := 1 asValue). |
|
6195 |
bindings at:#top put:(top := 1 asValue). |
|
6196 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
6197 |
(self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
1480 | 6198 |
ifTrue:[ |
6199 |
left := left value. |
|
6200 |
right := right value. |
|
6201 |
top := top value. |
|
6202 |
bottom := bottom value. |
|
6203 |
img := imageEditView image. |
|
6204 |
||
6205 |
imageEditView |
|
6206 |
makeBorderedImageX:left y:top |
|
6207 |
width:(img width + left + right) |
|
6208 |
height:(img height + top + bottom). |
|
6209 |
self updateInfoLabel |
|
6210 |
]. |
|
6211 |
||
6212 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6213 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6214 |
! |
|
6215 |
||
767 | 6216 |
doUndo |
6217 |
"reverses last edit action" |
|
400 | 6218 |
|
1436 | 6219 |
imageEditView undo. |
400 | 6220 |
! ! |
6221 |
||
2812 | 6222 |
!ImageEditor methodsFor:'user actions-image sequences'! |
6223 |
||
6224 |
editEachImageFromSequence |
|
6225 |
|seq| |
|
6226 |
||
6227 |
self checkModified ifFalse:[ ^ self ]. |
|
6228 |
||
6229 |
imageEditView releaseUndos. |
|
6230 |
||
6231 |
seq := self image imageSequence. |
|
6232 |
seq size > 10 ifTrue:[ |
|
6233 |
(Dialog confirm:(resources string:'Ok to open %1 image editor windows?' with:seq size)) |
|
6234 |
ifFalse:[^ self]. |
|
6235 |
]. |
|
6236 |
||
6237 |
seq do:[:eachFrame | |
|
6238 |
ImageEditor openOnImage:eachFrame image |
|
6239 |
]. |
|
6240 |
||
6241 |
"Modified: / 21-10-2010 / 15:01:25 / cg" |
|
6242 |
! |
|
6243 |
||
6244 |
gotoImageInSequence:index |
|
6245 |
"display the next image in the image sequence" |
|
6246 |
||
6247 |
|img seq frame listOfColors| |
|
6248 |
||
6249 |
imageEditView releaseUndos. |
|
6250 |
||
6251 |
seq := self image imageSequence. |
|
6252 |
||
6253 |
imageSeqNr := index. |
|
6254 |
frame := seq at:imageSeqNr. |
|
6255 |
imageEditView image:(frame image). |
|
6256 |
||
6257 |
(img := self image) notNil ifTrue:[ |
|
6258 |
listOfColors := self listOfColors. |
|
6259 |
img colorMap notNil ifTrue:[ |
|
6260 |
listOfColors contents:(img usedColors asSet asOrderedCollection). |
|
6261 |
] ifFalse:[ |
|
6262 |
listOfColors removeAll. |
|
6263 |
]. |
|
6264 |
self findColorMapMode. |
|
6265 |
self updateLabelsAndHistory. |
|
6266 |
img := img onDevice:device. |
|
6267 |
imageEditView image:img. |
|
6268 |
] ifFalse:[ |
|
6269 |
self updateForNoImage |
|
6270 |
]. |
|
6271 |
||
6272 |
"Created: / 21-10-2010 / 14:22:11 / cg" |
|
6273 |
! |
|
6274 |
||
6275 |
nextImageInSequence |
|
6276 |
"display the next image in the image sequence" |
|
6277 |
||
6278 |
|seq index| |
|
6279 |
||
6280 |
seq := self image imageSequence. |
|
6281 |
(index := imageSeqNr) isNil ifTrue:[ |
|
6282 |
index := 1. |
|
6283 |
]. |
|
6284 |
index := index + 1. |
|
6285 |
index > seq size ifTrue:[ |
|
6286 |
self information:'Back to first image in sequence'. |
|
6287 |
index := 1. |
|
6288 |
]. |
|
6289 |
self gotoImageInSequence:index. |
|
6290 |
||
6291 |
"Modified: / 21-10-2010 / 14:24:11 / cg" |
|
6292 |
! |
|
6293 |
||
6294 |
previousImageInSequence |
|
6295 |
"display the previous image in the image sequence" |
|
6296 |
||
6297 |
|seq index| |
|
6298 |
||
6299 |
seq := self image imageSequence. |
|
6300 |
(index := imageSeqNr) isNil ifTrue:[ |
|
6301 |
index := 1. |
|
6302 |
]. |
|
6303 |
index := index - 1. |
|
6304 |
index < 1 ifTrue:[ |
|
6305 |
self information:'Wrap to last image in sequence'. |
|
6306 |
index := seq size. |
|
6307 |
]. |
|
6308 |
self gotoImageInSequence:index. |
|
6309 |
||
6310 |
"Created: / 21-10-2010 / 14:25:03 / cg" |
|
6311 |
! ! |
|
6312 |
||
1715 | 6313 |
!ImageEditor methodsFor:'user actions-loading'! |
400 | 6314 |
|
767 | 6315 |
doLoadFromClass |
6316 |
"opens a dialog for loading an image from class and a (resource-) selector" |
|
400 | 6317 |
|
1122 | 6318 |
|img| |
6319 |
||
1975 | 6320 |
self checkModified ifFalse:[ ^ self ]. |
6321 |
||
1054 | 6322 |
(imageEditView loadFromClass) notNil ifTrue:[ |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6323 |
imageSeqNr := nil. |
1122 | 6324 |
(img := self image) notNil ifTrue: [ |
1900 | 6325 |
self updateColorsFromImage:img. |
574 | 6326 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
6327 |
self updateLabelsAndHistory. |
1054 | 6328 |
] ifFalse: [ |
6329 |
self updateForNoImage |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
6330 |
]. |
449 | 6331 |
] |
400 | 6332 |
! |
6333 |
||
767 | 6334 |
doLoadFromFile |
6335 |
"opens a dialog for loading an image from a file" |
|
400 | 6336 |
|
2820 | 6337 |
|img file filters title| |
1353 | 6338 |
|
1975 | 6339 |
self checkModified ifFalse:[ ^ self ]. |
6340 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6341 |
imageSeqNr := nil. |
1353 | 6342 |
img := self image. |
6343 |
img notNil ifTrue: [ |
|
6344 |
file := img fileName |
|
6345 |
]. |
|
6346 |
||
2820 | 6347 |
title := (resources string:'Load Image From'). |
6348 |
||
6349 |
UserPreferences current useNativeFileDialog ifTrue:[ |
|
6350 |
self withWaitCursorDo:[ |
|
6351 |
file := Display |
|
6352 |
nativeFileDialogFor:(self window topView id) |
|
6353 |
save:false |
|
6354 |
title:title |
|
6355 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
6356 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 6357 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 6358 |
filter: |
6359 |
{ |
|
6360 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp;*.jpg' } . |
|
6361 |
{ (resources string:'All Files') . '*.*' } |
|
6362 |
} |
|
2821 | 6363 |
extension:nil |
2827 | 6364 |
"blocking:false". |
2820 | 6365 |
]. |
6366 |
] ifFalse:[ |
|
6367 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
6368 |
file notNil ifTrue:[ |
|
6369 |
file := FileSelectionBrowser |
|
6370 |
request:title |
|
6371 |
fileName:file |
|
6372 |
withFileFilters:filters. |
|
6373 |
] ifFalse:[ |
|
6374 |
file := FileSelectionBrowser |
|
6375 |
request:title |
|
6376 |
inDirectory:LastDirectory |
|
6377 |
withFileFilters:filters. |
|
6378 |
]. |
|
1353 | 6379 |
]. |
2820 | 6380 |
|
1353 | 6381 |
file notNil ifTrue:[ |
6382 |
LastDirectory := file asFilename directoryName. |
|
6383 |
self loadFromFile:file |
|
6384 |
] |
|
2820 | 6385 |
|
2827 | 6386 |
"Modified: / 14-12-2010 / 13:52:11 / cg" |
400 | 6387 |
! |
6388 |
||
2796 | 6389 |
doLoadFromURL |
6390 |
"opens a dialog for loading an image from a URL" |
|
6391 |
||
2866 | 6392 |
|tempFile url response| |
2796 | 6393 |
|
6394 |
self checkModified ifFalse:[ ^ self ]. |
|
6395 |
||
6396 |
url := Dialog |
|
2866 | 6397 |
request:(resources string:'Load Image from URL') |
2796 | 6398 |
initialAnswer:LastURL. |
6399 |
||
6400 |
url notEmptyOrNil ifTrue:[ |
|
6401 |
LastURL := url. |
|
6402 |
tempFile := Filename newTemporary. |
|
2866 | 6403 |
self withWaitCursorDo:[ |
6404 |
response := HTTPInterface get:url destinationFile:tempFile. |
|
6405 |
]. |
|
6406 |
response isErrorResponse ifTrue:[ |
|
6407 |
Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText). |
|
6408 |
] ifFalse:[ |
|
6409 |
self loadFromFile:tempFile. |
|
6410 |
]. |
|
2796 | 6411 |
tempFile delete |
6412 |
] |
|
6413 |
||
6414 |
"Created: / 20-09-2010 / 11:30:59 / cg" |
|
6415 |
! |
|
6416 |
||
767 | 6417 |
doNewImage |
6418 |
"opens a dialog with choices of size and color map for creating a new image" |
|
400 | 6419 |
|
1975 | 6420 |
|dialogAspects width height cMapString cMapMode cMap imageClass image szString defaultSize ext| |
6421 |
||
6422 |
self checkModified ifFalse:[ ^ self ]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6423 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6424 |
defaultSize := (self class listOfDefaultSizes includes:'32x32') |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6425 |
ifTrue:['32x32'] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6426 |
ifFalse:[self class listOfDefaultSizes first]. |
767 | 6427 |
|
1975 | 6428 |
dialogAspects := IdentityDictionary new |
767 | 6429 |
at:#listOfSizes put: self class listOfDefaultSizes asValue; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6430 |
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
|
6431 |
at:#selectionOfSize put: (LastSizeString ? defaultSize) asValue; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6432 |
at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue; |
400 | 6433 |
yourself. |
6434 |
||
1975 | 6435 |
(self openDialogInterface:#dialogSpecForNewImage withBindings:dialogAspects) |
1383 | 6436 |
ifTrue:[ |
1975 | 6437 |
szString := (dialogAspects at:#selectionOfSize) value. |
1960 | 6438 |
ext := self pointFromString:szString. |
1962 | 6439 |
ext isNil ifTrue:[ |
6440 |
width := height := 32 |
|
6441 |
] ifFalse:[ |
|
6442 |
width := ext x. |
|
6443 |
height := ext y. |
|
6444 |
]. |
|
1960 | 6445 |
"/ width := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]). |
6446 |
"/ height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]). |
|
400 | 6447 |
|
1975 | 6448 |
cMapString := (dialogAspects at:#selectionOfColorMap) value. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6449 |
cMapMode := self class namesOfColorMaps keyAtEqualValue:cMapString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6450 |
cMap := self class listOfColorMaps at:cMapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6451 |
imageClass := Image implementorForDepth:(cMap size highBit-1). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6452 |
image := imageClass width: width height: height. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6453 |
image bits:(ByteArray new:(image bytesPerRow*height)). |
400 | 6454 |
|
1637 | 6455 |
LastSizeString := szString. |
6456 |
LastColormapMode := cMapString. |
|
6457 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6458 |
(cMapMode startsWith: 'mask') ifTrue:[ |
767 | 6459 |
image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels |
400 | 6460 |
]. |
6461 |
image colorMap: cMap. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6462 |
(imageEditView image: image) notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6463 |
self updateListOfColorsAndColormapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6464 |
self updateLabelsAndHistory. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6465 |
]. |
400 | 6466 |
image fillRectangleX:0 y:0 width:width height:height with:Color white. |
767 | 6467 |
] |
929 | 6468 |
! |
6469 |
||
2058 | 6470 |
doNewImageEditor |
6471 |
"opens a new image editor" |
|
6472 |
||
6473 |
ImageEditor open |
|
6474 |
||
6475 |
"Created: / 17-08-2006 / 09:03:14 / cg" |
|
6476 |
! |
|
6477 |
||
1682 | 6478 |
doNewImageFromClipboard |
6479 |
|image| |
|
6480 |
||
1975 | 6481 |
self checkModified ifFalse:[ ^ self ]. |
6482 |
||
1682 | 6483 |
image := imageEditView clipBoard. |
1975 | 6484 |
imageEditView image:image. |
6485 |
||
6486 |
image notNil ifTrue:[ |
|
1900 | 6487 |
self updateColorsFromImage:image. |
1682 | 6488 |
self findColorMapMode. |
6489 |
self updateLabelsAndHistory. |
|
6490 |
] |
|
6491 |
! |
|
6492 |
||
929 | 6493 |
grabScreenImage |
6494 |
"let user choose an area and grab that are for editing" |
|
6495 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6496 |
self grabScreenImageUsing:[ |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6497 |
|r| |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6498 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6499 |
[Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6500 |
r := Rectangle fromUser. |
2708 | 6501 |
(r width == 0 or:[r height == 0]) ifTrue:[ |
6502 |
nil |
|
6503 |
] ifFalse:[ |
|
6504 |
lastGrabbedScreenArea := r. |
|
6505 |
Image fromScreen:r |
|
6506 |
] |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6507 |
]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6508 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6509 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6510 |
grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6511 |
"grab again from the previous area for editing" |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6512 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6513 |
self grabScreenImageUsing:[ |
2708 | 6514 |
Image fromScreen:lastGrabbedScreenArea |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6515 |
]. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6516 |
! |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6517 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6518 |
grabScreenImageUsing:aBlock |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6519 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6520 |
|
1975 | 6521 |
self checkModified ifFalse:[ ^ self ]. |
6522 |
||
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6523 |
Processor |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6524 |
addTimedBlock:[ |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6525 |
|image d8image img| |
929 | 6526 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6527 |
imageSeqNr := nil. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6528 |
image := aBlock value. |
2708 | 6529 |
image notNil ifTrue:[ |
1121 | 6530 |
image depth > 8 ifTrue:[ |
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
6531 |
false ifTrue:[ |
1687
f4543a556b89
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1682
diff
changeset
|
6532 |
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
|
6533 |
(sig := ex signal) == HaltInterrupt ifTrue:[ex reject]. |
1122 | 6534 |
sig == Signal noHandlerSignal ifTrue:[ex reject]. |
1121 | 6535 |
|
6536 |
self warn:'Could not convert to depth8 image (too many colors)'. |
|
6537 |
d8image := nil. |
|
6538 |
] do:[ |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
6539 |
d8image := Depth8Image fromImage:image photometric:#palette. |
1121 | 6540 |
]. |
6541 |
d8image notNil ifTrue:[ |
|
6542 |
image := d8image |
|
6543 |
] |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
6544 |
]. |
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6545 |
]. |
1121 | 6546 |
(imageEditView image:image) notNil ifTrue:[ |
6547 |
self listOfColors contents:(image colorMap). |
|
6548 |
self findColorMapMode. |
|
6549 |
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
|
6550 |
] |
1121 | 6551 |
] |
6552 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6553 |
afterSeconds:1 |
929 | 6554 |
|
6555 |
"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
|
6556 |
"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
|
6557 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6558 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6559 |
grabWindowImage |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6560 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6561 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6562 |
self grabScreenImageUsing:[ |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6563 |
|v| |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6564 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6565 |
(v := Screen current viewFromUser) notNil ifTrue:[ |
2704 | 6566 |
v topView raise. |
6567 |
v topView makeFullyVisible. |
|
6568 |
Delay waitForSeconds:0.5. "/ give view a chance to redraw itself. |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6569 |
Image fromView:(v topView) |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6570 |
]. |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6571 |
]. |
400 | 6572 |
! ! |
6573 |
||
1715 | 6574 |
!ImageEditor methodsFor:'user actions-saving'! |
400 | 6575 |
|
767 | 6576 |
doPrint |
6577 |
"prints current image on the current printer" |
|
400 | 6578 |
|
1734 | 6579 |
self withWaitCursorDo:[ |
6580 |
imageEditView print |
|
6581 |
] |
|
400 | 6582 |
! |
6583 |
||
1613 | 6584 |
doSaveButtonImageToFileAs |
6585 |
"opens a dialog for saving current image to a file" |
|
6586 |
||
6587 |
imageEditView saveButtonImageToFileAs. |
|
6588 |
self updateLabelsAndHistory. |
|
6589 |
! |
|
6590 |
||
767 | 6591 |
doSaveImageFile |
6592 |
"saves current image to current file" |
|
400 | 6593 |
|
1481 | 6594 |
imageEditView save. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6595 |
self clearModified. |
400 | 6596 |
! |
6597 |
||
767 | 6598 |
doSaveImageFileAs |
1922 | 6599 |
"opens a dialog for saving an image to a file" |
6600 |
||
6601 |
|img file filters| |
|
6602 |
||
6603 |
img := self image. |
|
6604 |
img notNil ifTrue: [ |
|
6605 |
file := img fileName |
|
6606 |
]. |
|
6607 |
||
2595 | 6608 |
filters := FileSelectionBrowser saveImageFileNameFilters. |
1922 | 6609 |
|
2820 | 6610 |
UserPreferences current useNativeFileDialog ifTrue:[ |
6611 |
self withWaitCursorDo:[ |
|
6612 |
file := Display |
|
6613 |
nativeFileDialogFor:(self window topView id) |
|
6614 |
save:true |
|
6615 |
title:(resources string:'Save Image To') |
|
6616 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
6617 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 6618 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 6619 |
filter: |
6620 |
{ |
|
6621 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp' } . |
|
6622 |
{ (resources string:'All Files') . '*.*' } |
|
6623 |
} |
|
2821 | 6624 |
extension:nil |
2827 | 6625 |
"blocking:false". |
2807 | 6626 |
]. |
2820 | 6627 |
] ifFalse:[ |
6628 |
(FileSelectionBrowser isNil or:[DirectoryView isNil]) ifTrue:[ |
|
6629 |
file notNil ifTrue:[ |
|
6630 |
file := Dialog requestFileName:'Save Image To' |
|
6631 |
default:file |
|
6632 |
pattern:(filters first). |
|
6633 |
] ifFalse:[ |
|
6634 |
file := Dialog |
|
6635 |
requestFileName:'Save Image To' |
|
6636 |
default:'image.png' |
|
6637 |
pattern:(filters first) |
|
6638 |
fromDirectory:LastDirectory. |
|
6639 |
]. |
|
2807 | 6640 |
] ifFalse:[ |
2820 | 6641 |
file notNil ifTrue:[ |
6642 |
file := FileSelectionBrowser |
|
6643 |
request:'Save Image To' |
|
6644 |
fileName:file |
|
6645 |
withFileFilters:filters. |
|
6646 |
] ifFalse:[ |
|
6647 |
file := FileSelectionBrowser |
|
6648 |
request:'Save Image To' |
|
6649 |
inDirectory:LastDirectory |
|
6650 |
withFileFilters:filters. |
|
6651 |
]. |
|
2807 | 6652 |
]. |
1922 | 6653 |
]. |
6654 |
file notNil ifTrue:[ |
|
6655 |
imageEditView saveImageFileAs:file. |
|
6656 |
LastDirectory := file asFilename directoryName. |
|
6657 |
self updateLabelsAndHistory. |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6658 |
self clearModified. |
1922 | 6659 |
] |
2807 | 6660 |
|
2827 | 6661 |
"Modified: / 14-12-2010 / 13:51:47 / cg" |
400 | 6662 |
! |
6663 |
||
767 | 6664 |
doSaveImageMaskFileAs |
6665 |
"opens a dialog for saving mask of current image to a file" |
|
400 | 6666 |
|
1481 | 6667 |
imageEditView saveImageMaskFileAs. |
400 | 6668 |
! |
6669 |
||
767 | 6670 |
doSaveMethod |
1975 | 6671 |
"saves the image in current class and selector" |
6672 |
||
6673 |
imageEditView saveMethod ifTrue:[ |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6674 |
self updateLabelsAndHistory. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6675 |
self clearModified. |
400 | 6676 |
] |
6677 |
! |
|
6678 |
||
767 | 6679 |
doSaveMethodAs |
6680 |
"opens a dialog for saving current image on a class and a selector" |
|
400 | 6681 |
|
1975 | 6682 |
imageEditView saveMethodAs ifTrue:[ |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6683 |
self updateLabelsAndHistory. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6684 |
self clearModified. |
400 | 6685 |
] |
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6686 |
! |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6687 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6688 |
doShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6689 |
"opens a dialog showing the storeString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6690 |
(sometimes useful to embed an image into source code)" |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6691 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6692 |
|img| |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6693 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6694 |
img := imageEditView image. |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6695 |
TextBox openOn:img storeString |
1975 | 6696 |
! |
6697 |
||
6698 |
save |
|
6699 |
"saves current image on current class and selector" |
|
6700 |
||
6701 |
self doSaveMethod |
|
400 | 6702 |
! ! |
6703 |
||
1715 | 6704 |
!ImageEditor methodsFor:'user actions-settings'! |
1353 | 6705 |
|
6706 |
doChangeGridMagnification |
|
6707 |
"change grid magnification" |
|
6708 |
||
6709 |
|box oldGridLimit newGridLimit| |
|
6710 |
||
6711 |
oldGridLimit := imageEditView class gridMagnificationLimit asPoint. |
|
6712 |
||
6713 |
box := EnterBox new. |
|
6714 |
box title:(resources string:'Grid Magnification Limit:'). |
|
6715 |
box okText:(resources string:'OK'). |
|
6716 |
box abortText:(resources string:'Cancel'). |
|
6717 |
box initialText:(oldGridLimit x printString). |
|
6718 |
box showAtPointer. |
|
6719 |
||
6720 |
(box accepted |
|
6721 |
and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil] |
|
6722 |
) ifTrue:[ |
|
6723 |
newGridLimit := (99 min: (2 max:newGridLimit)) asPoint. |
|
6724 |
imageEditView class gridMagnificationLimit:newGridLimit. |
|
6725 |
imageEditView invalidate |
|
6726 |
] |
|
6727 |
||
2192 | 6728 |
! |
6729 |
||
6730 |
penWidth:n |
|
6731 |
imageEditView penWidth:n |
|
6732 |
||
6733 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
2375 | 6734 |
! |
6735 |
||
6736 |
spraySpot:n |
|
6737 |
imageEditView spraySpot:n |
|
6738 |
||
6739 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
1353 | 6740 |
! ! |
6741 |
||
400 | 6742 |
!ImageEditor class methodsFor:'documentation'! |
6743 |
||
6744 |
version |
|
6745 |
^ '$Header$' |
|
2590 | 6746 |
! |
6747 |
||
6748 |
version_CVS |
|
6749 |
^ '$Header$' |
|
400 | 6750 |
! ! |