author | Claus Gittinger <cg@exept.de> |
Mon, 06 Feb 2012 13:12:52 +0100 | |
changeset 2877 | 1a7cd3e6eea1 |
parent 2876 | 3c7d06dab802 |
child 2881 | 67e99e350ee0 |
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 |
|
2876 | 2537 |
label: '-' |
2538 |
) |
|
2539 |
(MenuItem |
|
2196 | 2540 |
activeHelpKey: fileNewImage |
2541 |
label: 'New...' |
|
2542 |
itemValue: doNewImage |
|
2543 |
translateLabel: true |
|
2544 |
) |
|
2545 |
(MenuItem |
|
2546 |
activeHelpKey: fileNewImage |
|
2547 |
label: 'New from ClipBoard' |
|
2548 |
itemValue: doNewImageFromClipboard |
|
2549 |
translateLabel: true |
|
2550 |
) |
|
2551 |
(MenuItem |
|
2552 |
label: '-' |
|
2553 |
) |
|
2554 |
(MenuItem |
|
2555 |
activeHelpKey: fileLoadFromClass |
|
2556 |
label: 'Load...' |
|
2557 |
itemValue: doLoadFromClass |
|
2558 |
translateLabel: true |
|
2559 |
) |
|
2560 |
(MenuItem |
|
2561 |
activeHelpKey: fileLoadFromFile |
|
2562 |
label: 'Load from File...' |
|
2563 |
itemValue: doLoadFromFile |
|
2564 |
translateLabel: true |
|
2565 |
) |
|
2566 |
(MenuItem |
|
2796 | 2567 |
activeHelpKey: fileLoadFromURL |
2568 |
label: 'Load from URL...' |
|
2569 |
itemValue: doLoadFromURL |
|
2570 |
translateLabel: true |
|
2571 |
) |
|
2572 |
(MenuItem |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2573 |
label: 'Grab' |
2196 | 2574 |
translateLabel: true |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2575 |
submenu: |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2576 |
(Menu |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2577 |
( |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2578 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2579 |
activeHelpKey: fileGrabImageFromScreen |
2717 | 2580 |
label: 'Grab from Screen Area...' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2581 |
itemValue: grabScreenImage |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2582 |
translateLabel: true |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2583 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2584 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2585 |
activeHelpKey: fileGrabImageFromScreen |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2586 |
enabled: hasLastGrabScreenArea |
2711 | 2587 |
label: 'Grab again from same Screen Area' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2588 |
itemValue: grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2589 |
translateLabel: true |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2590 |
) |
2771 | 2591 |
(MenuItem |
2592 |
label: '-' |
|
2593 |
) |
|
2594 |
(MenuItem |
|
2595 |
activeHelpKey: fileGrabImageFromWindow |
|
2596 |
label: 'Grab from Window...' |
|
2597 |
itemValue: grabWindowImage |
|
2598 |
translateLabel: true |
|
2599 |
) |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2600 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2601 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2602 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2603 |
) |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
2604 |
) |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
2605 |
(MenuItem |
2196 | 2606 |
label: '-' |
2607 |
) |
|
2608 |
(MenuItem |
|
2609 |
activeHelpKey: fileSaveMethod |
|
2610 |
enabled: imageIsLoadedAndClassDefined |
|
2611 |
label: 'Save' |
|
2612 |
itemValue: doSaveMethod |
|
2613 |
translateLabel: true |
|
2614 |
) |
|
2615 |
(MenuItem |
|
2616 |
activeHelpKey: fileSaveMethodAs |
|
2792 | 2617 |
enabled: imageIsLoadedHolder |
2196 | 2618 |
label: 'Save As...' |
2619 |
itemValue: doSaveMethodAs |
|
2620 |
translateLabel: true |
|
2621 |
) |
|
2622 |
(MenuItem |
|
2623 |
activeHelpKey: fileSaveAs |
|
2792 | 2624 |
enabled: imageIsLoadedHolder |
2196 | 2625 |
label: 'Save to File...' |
2626 |
itemValue: doSaveImageFileAs |
|
2627 |
translateLabel: true |
|
2628 |
) |
|
2629 |
(MenuItem |
|
2630 |
activeHelpKey: fileSaveMaskAs |
|
2792 | 2631 |
enabled: imageIsLoadedHolder |
2196 | 2632 |
label: 'Save Mask to File...' |
2633 |
itemValue: doSaveImageMaskFileAs |
|
2634 |
translateLabel: true |
|
2635 |
) |
|
2636 |
(MenuItem |
|
2637 |
activeHelpKey: fileSaveButtonImageAs |
|
2792 | 2638 |
enabled: imageIsLoadedHolder |
2196 | 2639 |
label: 'Save as Button to File...' |
2640 |
itemValue: doSaveButtonImageToFileAs |
|
2641 |
translateLabel: true |
|
2642 |
) |
|
2643 |
(MenuItem |
|
2644 |
label: '-' |
|
2645 |
) |
|
2646 |
(MenuItem |
|
2647 |
activeHelpKey: filePrint |
|
2792 | 2648 |
enabled: imageIsLoadedHolder |
2196 | 2649 |
label: 'Print' |
2650 |
itemValue: doPrint |
|
2651 |
translateLabel: true |
|
2652 |
) |
|
2653 |
(MenuItem |
|
2654 |
label: '-' |
|
2655 |
isVisible: isStandAlone |
|
2656 |
) |
|
2657 |
(MenuItem |
|
2658 |
activeHelpKey: fileBrowseClass |
|
2792 | 2659 |
enabled: hasClassDefinedHolder |
2196 | 2660 |
label: 'Browse Class' |
2661 |
itemValue: doBrowseClass |
|
2662 |
translateLabel: true |
|
2663 |
isVisible: isStandAlone |
|
2664 |
) |
|
2665 |
(MenuItem |
|
2792 | 2666 |
enabled: imageIsLoadedHolder |
2196 | 2667 |
label: 'Inspect Image' |
2668 |
itemValue: doInspectImage |
|
2669 |
translateLabel: true |
|
2670 |
isVisible: isStandAlone |
|
2671 |
) |
|
2672 |
(MenuItem |
|
2585 | 2673 |
activeHelpKey: fileShowStoreString |
2792 | 2674 |
enabled: imageIsLoadedHolder |
2585 | 2675 |
label: 'Show storeString' |
2676 |
itemValue: doShowStoreString |
|
2677 |
translateLabel: true |
|
2678 |
) |
|
2679 |
(MenuItem |
|
2196 | 2680 |
label: '-' |
2681 |
isVisible: isStandAlone |
|
2682 |
) |
|
2683 |
(MenuItem |
|
2684 |
activeHelpKey: fileExit |
|
2685 |
label: 'Exit' |
|
2686 |
itemValue: closeRequest |
|
2687 |
translateLabel: true |
|
2688 |
isVisible: isStandAlone |
|
2689 |
) |
|
2690 |
) |
|
2691 |
nil |
|
2692 |
nil |
|
2693 |
) |
|
2812 | 2694 |
|
2876 | 2695 |
"Modified: / 01-02-2012 / 15:00:50 / cg" |
2196 | 2696 |
! |
2697 |
||
679 | 2698 |
menuMouseButtonColors |
737 | 2699 |
"This resource specification was automatically generated |
2700 |
by the MenuEditor of ST/X." |
|
679 | 2701 |
|
737 | 2702 |
"Do not manually edit this!! If it is corrupted, |
2703 |
the MenuEditor may not be able to read the specification." |
|
679 | 2704 |
|
2705 |
" |
|
2706 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
2707 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
2708 |
" |
|
2709 |
||
2710 |
<resource: #menu> |
|
2711 |
||
2712 |
^ |
|
2713 |
||
2714 |
#(#Menu |
|
2715 |
||
2716 |
#( |
|
2717 |
#(#MenuItem |
|
2718 |
#label: 'Left Mouse Button' |
|
2719 |
#nameKey: #leftMouseKeyButton |
|
2720 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 2721 |
#enabled: #imageIsLoadedHolder |
679 | 2722 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 2723 |
#choice: #mouseKeyColorMode |
2724 |
#choiceValue: 1 |
|
679 | 2725 |
) |
2726 |
#(#MenuItem |
|
2727 |
#label: 'Right Mouse Button' |
|
2728 |
#nameKey: #rightMouseKeyButton |
|
2729 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 2730 |
#enabled: #imageIsLoadedHolder |
679 | 2731 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 2732 |
#choice: #mouseKeyColorMode |
2733 |
#choiceValue: 2 |
|
679 | 2734 |
) |
2735 |
) nil |
|
2736 |
nil |
|
2737 |
) |
|
2792 | 2738 |
|
2739 |
"Modified: / 04-07-2010 / 10:17:37 / cg" |
|
679 | 2740 |
! |
2741 |
||
2585 | 2742 |
menuSettings |
2743 |
"This resource specification was automatically generated |
|
2744 |
by the MenuEditor of ST/X." |
|
2745 |
||
2746 |
"Do not manually edit this!! If it is corrupted, |
|
2747 |
the MenuEditor may not be able to read the specification." |
|
2748 |
||
2749 |
" |
|
2750 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuSettings |
|
2751 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuSettings)) startUp |
|
2752 |
" |
|
2753 |
||
2754 |
<resource: #menu> |
|
2755 |
||
2756 |
^ |
|
2757 |
#(Menu |
|
2758 |
( |
|
2759 |
(MenuItem |
|
2760 |
activeHelpKey: settingsGridMagnification |
|
2761 |
label: 'Grid Magnification Limit...' |
|
2762 |
itemValue: doChangeGridMagnification |
|
2763 |
translateLabel: true |
|
2764 |
) |
|
2765 |
(MenuItem |
|
2766 |
label: 'Pen' |
|
2767 |
translateLabel: true |
|
2768 |
submenu: |
|
2769 |
(Menu |
|
2770 |
( |
|
2771 |
(MenuItem |
|
2772 |
label: '1' |
|
2773 |
itemValue: penWidth: |
|
2774 |
translateLabel: true |
|
2775 |
argument: 1 |
|
2776 |
) |
|
2777 |
(MenuItem |
|
2778 |
label: '5' |
|
2779 |
itemValue: penWidth: |
|
2780 |
translateLabel: true |
|
2781 |
argument: 5 |
|
2782 |
) |
|
2783 |
(MenuItem |
|
2784 |
label: '10' |
|
2785 |
itemValue: penWidth: |
|
2786 |
translateLabel: true |
|
2787 |
argument: 10 |
|
2788 |
) |
|
2789 |
) |
|
2790 |
nil |
|
2791 |
nil |
|
2792 |
) |
|
2793 |
) |
|
2794 |
(MenuItem |
|
2795 |
label: 'Spray' |
|
2796 |
translateLabel: true |
|
2797 |
submenu: |
|
2798 |
(Menu |
|
2799 |
( |
|
2800 |
(MenuItem |
|
2801 |
label: '4' |
|
2802 |
itemValue: spraySpot: |
|
2803 |
translateLabel: true |
|
2804 |
argument: 4 |
|
2805 |
) |
|
2806 |
(MenuItem |
|
2807 |
label: '8' |
|
2808 |
itemValue: spraySpot: |
|
2809 |
translateLabel: true |
|
2810 |
argument: 8 |
|
2811 |
) |
|
2812 |
(MenuItem |
|
2813 |
label: '16' |
|
2814 |
itemValue: spraySpot: |
|
2815 |
translateLabel: true |
|
2816 |
argument: 16 |
|
2817 |
) |
|
2818 |
(MenuItem |
|
2819 |
label: '32' |
|
2820 |
itemValue: spraySpot: |
|
2821 |
translateLabel: true |
|
2822 |
argument: 32 |
|
2823 |
) |
|
2824 |
) |
|
2825 |
nil |
|
2826 |
nil |
|
2827 |
) |
|
2828 |
) |
|
2829 |
) |
|
2830 |
nil |
|
2831 |
nil |
|
2832 |
) |
|
2833 |
! |
|
2834 |
||
400 | 2835 |
menuToolbar |
737 | 2836 |
"This resource specification was automatically generated |
2837 |
by the MenuEditor of ST/X." |
|
400 | 2838 |
|
737 | 2839 |
"Do not manually edit this!! If it is corrupted, |
2840 |
the MenuEditor may not be able to read the specification." |
|
400 | 2841 |
|
2876 | 2842 |
|
400 | 2843 |
" |
2844 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
2845 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
2846 |
" |
|
2847 |
||
2848 |
<resource: #menu> |
|
2849 |
||
1196 | 2850 |
^ |
1820 | 2851 |
#(Menu |
2852 |
( |
|
2853 |
(MenuItem |
|
2854 |
activeHelpKey: fileNewImage |
|
2855 |
label: 'newImage' |
|
2856 |
itemValue: doNewImage |
|
2857 |
translateLabel: true |
|
2858 |
isButton: true |
|
1883 | 2859 |
labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon) |
1196 | 2860 |
) |
1820 | 2861 |
(MenuItem |
2876 | 2862 |
activeHelpKey: fileGrabImageFromScreen |
2863 |
label: 'grabScreenImage' |
|
2864 |
itemValue: grabScreenImage |
|
2865 |
translateLabel: true |
|
2866 |
isButton: true |
|
2877 | 2867 |
labelImage: (ResourceRetriever ToolbarIconLibrary snapshot24x24Icon) |
2876 | 2868 |
) |
2869 |
(MenuItem |
|
1949 | 2870 |
label: '-' |
2871 |
) |
|
2872 |
(MenuItem |
|
1970 | 2873 |
activeHelpKey: fileLoadFromClass |
2874 |
label: 'loadFromClass' |
|
2875 |
itemValue: doLoadFromClass |
|
2876 |
translateLabel: true |
|
2877 |
isButton: true |
|
1975 | 2878 |
isVisible: isStandAlone |
1970 | 2879 |
submenuChannel: menuHistory |
2880 |
labelImage: (ResourceRetriever XPToolbarIconLibrary loadImageFromMethodIcon) |
|
2881 |
keepLinkedMenu: true |
|
2882 |
) |
|
2883 |
(MenuItem |
|
2567 | 2884 |
activeHelpKey: fileSaveMethodAs |
2792 | 2885 |
enabled: imageIsLoadedHolder |
2567 | 2886 |
label: 'fileSaveMethodAs' |
1970 | 2887 |
itemValue: doSaveMethodAs |
2888 |
translateLabel: true |
|
2889 |
isButton: true |
|
1975 | 2890 |
isVisible: isStandAlone |
1970 | 2891 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon) |
2892 |
) |
|
2893 |
(MenuItem |
|
2894 |
activeHelpKey: fileSaveMethod |
|
2792 | 2895 |
enabled: imageIsLoadedHolder |
1970 | 2896 |
label: 'saveAsMethod' |
2897 |
itemValue: doSaveMethod |
|
2898 |
translateLabel: true |
|
2899 |
isButton: true |
|
1975 | 2900 |
isVisible: isNotStandAlone |
2590 | 2901 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodIcon) |
1970 | 2902 |
) |
2903 |
(MenuItem |
|
2904 |
label: '-' |
|
2905 |
) |
|
2906 |
(MenuItem |
|
1820 | 2907 |
activeHelpKey: fileLoadFromFile |
2908 |
label: 'loadFromFile' |
|
2909 |
itemValue: doLoadFromFile |
|
2910 |
translateLabel: true |
|
2911 |
isButton: true |
|
1884 | 2912 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon) |
1820 | 2913 |
) |
2914 |
(MenuItem |
|
2915 |
activeHelpKey: fileSaveAs |
|
2792 | 2916 |
enabled: imageIsLoadedHolder |
1820 | 2917 |
label: 'saveAsFile' |
2918 |
itemValue: doSaveImageFileAs |
|
2919 |
translateLabel: true |
|
2920 |
isButton: true |
|
1885 | 2921 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon) |
1820 | 2922 |
) |
2923 |
(MenuItem |
|
1949 | 2924 |
label: '-' |
1196 | 2925 |
) |
1820 | 2926 |
(MenuItem |
2927 |
activeHelpKey: editUndo |
|
1987 | 2928 |
enabled: canUndoHolder |
1820 | 2929 |
label: 'Undo' |
2930 |
itemValue: doUndo |
|
2931 |
translateLabel: true |
|
2932 |
isButton: true |
|
1883 | 2933 |
labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
1196 | 2934 |
) |
2812 | 2935 |
(MenuItem |
2936 |
label: '-' |
|
2937 |
isVisible: imageHasImageSequenceHolder |
|
2938 |
) |
|
2939 |
(MenuItem |
|
2940 |
activeHelpKey: previousImageInSequence |
|
2941 |
enabled: imageHasPreviousImageHolder |
|
2942 |
label: 'Previous Image' |
|
2943 |
itemValue: previousImageInSequence |
|
2944 |
translateLabel: true |
|
2945 |
isVisible: imageHasImageSequenceHolder |
|
2946 |
labelImage: (ResourceRetriever ToolbarIconLibrary leftArrow24x24Icon) |
|
2947 |
) |
|
2948 |
(MenuItem |
|
2949 |
activeHelpKey: nextImageInSequence |
|
2950 |
enabled: imageHasNextImageHolder |
|
2951 |
label: 'Next Image' |
|
2952 |
itemValue: nextImageInSequence |
|
2953 |
translateLabel: true |
|
2954 |
isVisible: imageHasImageSequenceHolder |
|
2955 |
labelImage: (ResourceRetriever ToolbarIconLibrary rightArrow24x24Icon) |
|
2956 |
) |
|
1637 | 2957 |
) |
2958 |
nil |
|
2959 |
nil |
|
2960 |
) |
|
2961 |
! |
|
2962 |
||
2963 |
modeMenu |
|
2964 |
"This resource specification was automatically generated |
|
2965 |
by the MenuEditor of ST/X." |
|
2966 |
||
2967 |
"Do not manually edit this!! If it is corrupted, |
|
2968 |
the MenuEditor may not be able to read the specification." |
|
2969 |
||
2970 |
" |
|
2971 |
MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu |
|
2972 |
(Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp |
|
2973 |
" |
|
2974 |
||
2975 |
<resource: #menu> |
|
2976 |
||
2977 |
^ |
|
2592 | 2978 |
#(Menu |
2979 |
( |
|
2980 |
(MenuItem |
|
2981 |
activeHelpKey: drawModePoint |
|
2792 | 2982 |
enabled: imageIsLoadedHolder |
2592 | 2983 |
label: 'Point' |
2984 |
translateLabel: true |
|
2985 |
labelImage: (ResourceRetriever ImageEditor pointIcon 'Point') |
|
2986 |
choice: editMode |
|
2987 |
choiceValue: point |
|
2988 |
) |
|
2989 |
(MenuItem |
|
2990 |
activeHelpKey: drawModePoint |
|
2792 | 2991 |
enabled: imageIsLoadedHolder |
2592 | 2992 |
label: 'Spray' |
2993 |
translateLabel: true |
|
2994 |
labelImage: (ResourceRetriever ImageEditor sprayIcon 'Spray') |
|
2995 |
choice: editMode |
|
2996 |
choiceValue: spray |
|
1196 | 2997 |
) |
2592 | 2998 |
(MenuItem |
2999 |
activeHelpKey: drawModeBox |
|
2792 | 3000 |
enabled: imageIsLoadedHolder |
2592 | 3001 |
label: 'Rect' |
3002 |
translateLabel: true |
|
3003 |
labelImage: (ResourceRetriever ImageEditor rectIcon 'Rect') |
|
3004 |
choice: editMode |
|
3005 |
choiceValue: box |
|
1196 | 3006 |
) |
2592 | 3007 |
(MenuItem |
3008 |
activeHelpKey: drawModeFilledBox |
|
2792 | 3009 |
enabled: imageIsLoadedHolder |
2592 | 3010 |
label: 'Filled Rectangle' |
3011 |
translateLabel: true |
|
3012 |
labelImage: (ResourceRetriever ImageEditor fillRectIcon 'Filled Rectangle') |
|
3013 |
choice: editMode |
|
3014 |
choiceValue: filledBox |
|
1196 | 3015 |
) |
2592 | 3016 |
(MenuItem |
3017 |
activeHelpKey: drawModeBox |
|
2792 | 3018 |
enabled: imageIsLoadedHolder |
2592 | 3019 |
label: 'Circle' |
3020 |
translateLabel: true |
|
3021 |
labelImage: (ResourceRetriever ImageEditor circleIcon 'Circle') |
|
3022 |
choice: editMode |
|
3023 |
choiceValue: circle |
|
1196 | 3024 |
) |
2592 | 3025 |
(MenuItem |
3026 |
activeHelpKey: drawModeFill |
|
2792 | 3027 |
enabled: imageIsLoadedHolder |
2592 | 3028 |
label: 'Fill' |
3029 |
translateLabel: true |
|
3030 |
labelImage: (ResourceRetriever ImageEditor fillIcon 'Fill') |
|
3031 |
choice: editMode |
|
3032 |
choiceValue: fill |
|
1196 | 3033 |
) |
2592 | 3034 |
(MenuItem |
3035 |
activeHelpKey: drawModeCopy |
|
2792 | 3036 |
enabled: imageIsLoadedHolder |
2592 | 3037 |
label: 'Copy' |
3038 |
translateLabel: true |
|
3039 |
labelImage: (ResourceRetriever ImageEditor copyIcon 'Copy') |
|
3040 |
choice: editMode |
|
3041 |
choiceValue: copy |
|
3042 |
) |
|
3043 |
(MenuItem |
|
3044 |
activeHelpKey: drawModePaste |
|
2792 | 3045 |
enabled: imageIsLoadedHolder |
2592 | 3046 |
label: 'Paste' |
3047 |
translateLabel: true |
|
3048 |
labelImage: (ResourceRetriever ImageEditor pasteIcon 'Paste') |
|
3049 |
choice: editMode |
|
3050 |
choiceValue: paste |
|
1196 | 3051 |
) |
2592 | 3052 |
(MenuItem |
3053 |
activeHelpKey: drawModePasteUnder |
|
2792 | 3054 |
enabled: imageIsLoadedHolder |
2592 | 3055 |
label: 'Paste Under' |
3056 |
translateLabel: true |
|
3057 |
labelImage: (ResourceRetriever ImageEditor pasteUnderIcon 'Paste Under') |
|
3058 |
choice: editMode |
|
3059 |
choiceValue: pasteUnder |
|
1196 | 3060 |
) |
2592 | 3061 |
(MenuItem |
3062 |
activeHelpKey: drawModePasteWithMask |
|
2792 | 3063 |
enabled: imageIsLoadedHolder |
2592 | 3064 |
label: 'Paste with Mask' |
3065 |
translateLabel: true |
|
3066 |
labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon 'Paste with Mask') |
|
3067 |
choice: editMode |
|
3068 |
choiceValue: pasteWithMask |
|
1579 | 3069 |
) |
2592 | 3070 |
(MenuItem |
3071 |
activeHelpKey: drawModeSpecial |
|
2792 | 3072 |
enabled: imageIsLoadedHolder |
2592 | 3073 |
label: 'Special' |
3074 |
translateLabel: true |
|
3075 |
labelImage: (ResourceRetriever ImageEditor specialIcon 'Special') |
|
3076 |
choice: editMode |
|
3077 |
choiceValue: specialOperation |
|
1411 | 3078 |
) |
1196 | 3079 |
) |
3080 |
nil |
|
3081 |
nil |
|
400 | 3082 |
) |
2792 | 3083 |
|
3084 |
"Modified: / 04-07-2010 / 10:18:08 / cg" |
|
1558 | 3085 |
! |
3086 |
||
3087 |
previewMenu |
|
3088 |
"This resource specification was automatically generated |
|
3089 |
by the MenuEditor of ST/X." |
|
3090 |
||
3091 |
"Do not manually edit this!! If it is corrupted, |
|
3092 |
the MenuEditor may not be able to read the specification." |
|
3093 |
||
3094 |
" |
|
3095 |
MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu |
|
3096 |
(Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp |
|
3097 |
" |
|
3098 |
||
3099 |
<resource: #menu> |
|
3100 |
||
3101 |
^ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3102 |
#(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3103 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3104 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3105 |
label: 'TileMode' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3106 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3107 |
indication: tileModeHolder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3108 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3109 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3110 |
label: '-' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3111 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3112 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3113 |
label: 'Background Color' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3114 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3115 |
submenu: |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3116 |
(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3117 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3118 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3119 |
label: 'Gray' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3120 |
translateLabel: true |
2792 | 3121 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3122 |
choiceValue: nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3123 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3124 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3125 |
label: 'Black' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3126 |
translateLabel: true |
2792 | 3127 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3128 |
choiceValue: black |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3129 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3130 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3131 |
label: 'White' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3132 |
translateLabel: true |
2792 | 3133 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3134 |
choiceValue: white |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3135 |
) |
1774 | 3136 |
(MenuItem |
3137 |
label: '-' |
|
3138 |
) |
|
3139 |
(MenuItem |
|
3140 |
label: 'Red' |
|
3141 |
translateLabel: true |
|
2792 | 3142 |
choice: previewBackgroundColorHolder |
1774 | 3143 |
choiceValue: red |
3144 |
) |
|
3145 |
(MenuItem |
|
3146 |
label: 'Green' |
|
3147 |
translateLabel: true |
|
2792 | 3148 |
choice: previewBackgroundColorHolder |
1774 | 3149 |
choiceValue: green |
3150 |
) |
|
3151 |
(MenuItem |
|
3152 |
label: 'Blue' |
|
3153 |
translateLabel: true |
|
2792 | 3154 |
choice: previewBackgroundColorHolder |
1774 | 3155 |
choiceValue: blue |
3156 |
) |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3157 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3158 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3159 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3160 |
) |
1558 | 3161 |
) |
3162 |
) |
|
3163 |
nil |
|
3164 |
nil |
|
3165 |
) |
|
2792 | 3166 |
|
3167 |
"Modified: / 04-07-2010 / 10:20:09 / cg" |
|
1637 | 3168 |
! |
3169 |
||
3170 |
toolsMenuToolbar |
|
3171 |
"This resource specification was automatically generated |
|
3172 |
by the MenuEditor of ST/X." |
|
3173 |
||
3174 |
"Do not manually edit this!! If it is corrupted, |
|
3175 |
the MenuEditor may not be able to read the specification." |
|
3176 |
||
3177 |
" |
|
3178 |
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar |
|
3179 |
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp |
|
3180 |
" |
|
3181 |
||
3182 |
<resource: #menu> |
|
3183 |
||
3184 |
^ |
|
3185 |
#(#Menu |
|
3186 |
#( |
|
3187 |
#(#MenuItem |
|
3188 |
#activeHelpKey: #drawModePoint |
|
2792 | 3189 |
#enabled: #imageIsLoadedHolder |
1637 | 3190 |
#label: 'Point' |
3191 |
#translateLabel: true |
|
3192 |
#isButton: true |
|
3193 |
#labelImage: #(#ResourceRetriever #ImageEditor #pointIcon) |
|
3194 |
#choice: #editMode |
|
3195 |
#choiceValue: #point |
|
3196 |
) |
|
3197 |
#(#MenuItem |
|
2375 | 3198 |
#activeHelpKey: #drawModeSpray |
2792 | 3199 |
#enabled: #imageIsLoadedHolder |
2375 | 3200 |
#label: 'Spray' |
3201 |
#translateLabel: true |
|
3202 |
#isButton: true |
|
3203 |
#labelImage: #(#ResourceRetriever #ImageEditor #sprayIcon) |
|
3204 |
#choice: #editMode |
|
3205 |
#choiceValue: #spray |
|
3206 |
) |
|
3207 |
#(#MenuItem |
|
1637 | 3208 |
#activeHelpKey: #drawModeBox |
2792 | 3209 |
#enabled: #imageIsLoadedHolder |
1637 | 3210 |
#label: 'Rect' |
3211 |
#translateLabel: true |
|
3212 |
#isButton: true |
|
3213 |
#labelImage: #(#ResourceRetriever #ImageEditor #rectIcon) |
|
3214 |
#choice: #editMode |
|
3215 |
#choiceValue: #box |
|
3216 |
) |
|
3217 |
#(#MenuItem |
|
3218 |
#activeHelpKey: #drawModeFilledBox |
|
2792 | 3219 |
#enabled: #imageIsLoadedHolder |
1637 | 3220 |
#label: 'FillRect' |
3221 |
#translateLabel: true |
|
3222 |
#isButton: true |
|
3223 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillRectIcon) |
|
3224 |
#choice: #editMode |
|
3225 |
#choiceValue: #filledBox |
|
3226 |
) |
|
3227 |
#(#MenuItem |
|
2375 | 3228 |
#activeHelpKey: #drawModeCircle |
2792 | 3229 |
#enabled: #imageIsLoadedHolder |
2375 | 3230 |
#label: 'Circle' |
3231 |
#translateLabel: true |
|
3232 |
#isButton: true |
|
3233 |
#labelImage: #(#ResourceRetriever #ImageEditor #circleIcon) |
|
3234 |
#choice: #editMode |
|
3235 |
#choiceValue: #circle |
|
3236 |
) |
|
3237 |
#(#MenuItem |
|
1637 | 3238 |
#activeHelpKey: #drawModeFill |
2792 | 3239 |
#enabled: #imageIsLoadedHolder |
1637 | 3240 |
#label: 'Fill' |
3241 |
#translateLabel: true |
|
3242 |
#isButton: true |
|
3243 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillIcon) |
|
3244 |
#choice: #editMode |
|
3245 |
#choiceValue: #fill |
|
3246 |
) |
|
3247 |
#(#MenuItem |
|
3248 |
#activeHelpKey: #drawModeCopy |
|
2792 | 3249 |
#enabled: #imageIsLoadedHolder |
1637 | 3250 |
#label: 'Copy' |
3251 |
#translateLabel: true |
|
3252 |
#isButton: true |
|
3253 |
#labelImage: #(#ResourceRetriever #ImageEditor #copyIcon) |
|
3254 |
#choice: #editMode |
|
3255 |
#choiceValue: #copy |
|
3256 |
) |
|
3257 |
#(#MenuItem |
|
3258 |
#activeHelpKey: #drawModePaste |
|
2792 | 3259 |
#enabled: #imageIsLoadedHolder |
1637 | 3260 |
#label: 'Paste' |
3261 |
#translateLabel: true |
|
3262 |
#isButton: true |
|
3263 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteIcon) |
|
3264 |
#choice: #editMode |
|
3265 |
#choiceValue: #paste |
|
3266 |
) |
|
3267 |
#(#MenuItem |
|
3268 |
#activeHelpKey: #drawModePasteUnder |
|
2792 | 3269 |
#enabled: #imageIsLoadedHolder |
1637 | 3270 |
#label: 'Paste Under' |
3271 |
#translateLabel: true |
|
3272 |
#isButton: true |
|
3273 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteUnderIcon) |
|
3274 |
#choice: #editMode |
|
3275 |
#choiceValue: #pasteUnder |
|
3276 |
) |
|
3277 |
#(#MenuItem |
|
3278 |
#activeHelpKey: #drawModePasteWithMask |
|
2792 | 3279 |
#enabled: #imageIsLoadedHolder |
1637 | 3280 |
#label: 'Paste With Mask' |
3281 |
#translateLabel: true |
|
3282 |
#isButton: true |
|
3283 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteWithMaskIcon) |
|
3284 |
#choice: #editMode |
|
3285 |
#choiceValue: #pasteWithMask |
|
3286 |
) |
|
3287 |
#(#MenuItem |
|
3288 |
#activeHelpKey: #drawModeSpecial |
|
2792 | 3289 |
#enabled: #imageIsLoadedHolder |
1637 | 3290 |
#label: 'Special' |
3291 |
#translateLabel: true |
|
3292 |
#isButton: true |
|
3293 |
#labelImage: #(#ResourceRetriever #ImageEditor #specialIcon) |
|
3294 |
#choice: #editMode |
|
3295 |
#choiceValue: #specialOperation |
|
3296 |
) |
|
3297 |
) |
|
3298 |
nil |
|
3299 |
nil |
|
3300 |
) |
|
2792 | 3301 |
|
3302 |
"Modified: / 04-07-2010 / 10:18:24 / cg" |
|
400 | 3303 |
! ! |
3304 |
||
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3305 |
!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
|
3306 |
|
1900 | 3307 |
colorTableColumns |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3308 |
"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
|
3309 |
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
|
3310 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3311 |
"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
|
3312 |
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
|
3313 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3314 |
" |
1975 | 3315 |
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
|
3316 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3317 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3318 |
<resource: #tableColumns> |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3319 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3320 |
^#( |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3321 |
(DataSetColumnSpec |
2174 | 3322 |
activeHelpKey: '' |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3323 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3324 |
rendererType: rowSelector |
2712 | 3325 |
backgroundSelector: theColorItself: |
3326 |
selectedBackgroundSelector: theColorItself: |
|
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3327 |
isResizeable: false |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3328 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3329 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3330 |
label: 'R' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3331 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3332 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3333 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3334 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3335 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3336 |
model: redFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3337 |
writeSelector: redAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3338 |
selectSelector: canSelectRedInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3339 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3340 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3341 |
label: 'G' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3342 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3343 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3344 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3345 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3346 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3347 |
model: greenFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3348 |
writeSelector: greenAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3349 |
selectSelector: canSelectGreenInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3350 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3351 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3352 |
label: 'B' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3353 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3354 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3355 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3356 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3357 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3358 |
model: blueFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3359 |
writeSelector: blueAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3360 |
selectSelector: canSelectBlueInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3361 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3362 |
) |
2174 | 3363 |
|
3364 |
"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
|
3365 |
! ! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3366 |
|
400 | 3367 |
!ImageEditor methodsFor:'accessing'! |
3368 |
||
3369 |
image |
|
767 | 3370 |
"returns the current editing image" |
400 | 3371 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3372 |
^ imageEditView image |
400 | 3373 |
! |
3374 |
||
3375 |
postOpenAction: anAction |
|
767 | 3376 |
"sets an action which is evaluated after opening" |
400 | 3377 |
|
3378 |
postOpenAction := anAction |
|
1381 | 3379 |
! |
3380 |
||
3381 |
resourceClass:aClass |
|
3382 |
imageEditView resourceClass:aClass |
|
400 | 3383 |
! ! |
3384 |
||
2767 | 3385 |
!ImageEditor methodsFor:'accessing-behavior'! |
3386 |
||
3387 |
allowedToChangeImageDimensionAndDepth |
|
3388 |
"used to edit an existing image's contents only (Expecco)" |
|
3389 |
||
3390 |
^ allowedToChangeImageDimensionAndDepth ? true |
|
3391 |
! |
|
3392 |
||
3393 |
allowedToChangeImageDimensionAndDepth:aBoolean |
|
3394 |
"used to edit an existing image's contents only (Expecco)" |
|
3395 |
||
3396 |
allowedToChangeImageDimensionAndDepth := aBoolean |
|
3397 |
! ! |
|
3398 |
||
1398 | 3399 |
!ImageEditor methodsFor:'accessing-views'! |
400 | 3400 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3401 |
colorDataSetView |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3402 |
"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
|
3403 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3404 |
^(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
|
3405 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3406 |
"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
|
3407 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3408 |
|
487 | 3409 |
coordLabel |
767 | 3410 |
"returns the view the coord label" |
487 | 3411 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3412 |
^self componentAt: #coordLabel |
487 | 3413 |
! |
3414 |
||
400 | 3415 |
imageEditView |
911 | 3416 |
"returns the view of the image" |
400 | 3417 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3418 |
imageEditView isNil ifTrue:[ |
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3419 |
imageEditView := (self componentAt: #imageEditView) scrolledView. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3420 |
imageEditView addDependent:self. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3421 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3422 |
^ imageEditView |
1345 | 3423 |
|
3424 |
"Modified: / 10.2.2000 / 23:19:20 / cg" |
|
400 | 3425 |
! |
3426 |
||
3427 |
imagePreView |
|
767 | 3428 |
"returns the preview of the image" |
400 | 3429 |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3430 |
|imagePreViewSubViews| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3431 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3432 |
imagePreViewSubViews := (self componentAt: #imagePreView) subViews. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3433 |
|
2043 | 3434 |
"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
|
3435 |
imagePreViewSubViews isEmptyOrNil ifTrue:[ |
2043 | 3436 |
^ nil |
3437 |
]. |
|
3438 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3439 |
^ imagePreViewSubViews first |
475 | 3440 |
! ! |
3441 |
||
400 | 3442 |
!ImageEditor methodsFor:'aspects'! |
3443 |
||
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3444 |
activityInfoHolder |
1987 | 3445 |
^ self infoLabelHolder |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3446 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3447 |
"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
|
3448 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3449 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3450 |
colorColumnAdaptor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3451 |
^ self |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3452 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3453 |
"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
|
3454 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3455 |
|
2792 | 3456 |
hasClassAndSelectorDefinedHolder |
1054 | 3457 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3458 |
|cls| |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3459 |
|
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3460 |
(cls := imageEditView resourceClass) notNil |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3461 |
and:[imageEditView resourceSelector notNil] |
1054 | 3462 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3463 |
|
2792 | 3464 |
"Created: / 04-07-2010 / 10:11:10 / cg" |
3465 |
! |
|
3466 |
||
3467 |
hasClassDefinedHolder |
|
1054 | 3468 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3469 |
imageEditView resourceClass notNil |
1054 | 3470 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3471 |
|
2792 | 3472 |
"Created: / 04-07-2010 / 10:11:47 / cg" |
3473 |
! |
|
3474 |
||
3475 |
hasColorSelectedHolder |
|
3476 |
^ [ self selectedColorIndexOrNil notNil ] |
|
3477 |
||
3478 |
"Created: / 04-07-2010 / 10:12:22 / cg" |
|
2651 | 3479 |
! |
3480 |
||
1008 | 3481 |
hasColormap |
2792 | 3482 |
^ self image notNil and:[self image colorMap notNil] |
3483 |
||
3484 |
"Created: / 30-09-1998 / 23:53:55 / cg" |
|
3485 |
"Modified: / 04-07-2010 / 10:13:26 / cg" |
|
1008 | 3486 |
! |
3487 |
||
2651 | 3488 |
hasColormapAndColorSelected |
2792 | 3489 |
^ [ self hasColormapHolder value and:[self hasColorSelectedHolder value]] |
3490 |
||
3491 |
"Modified: / 04-07-2010 / 10:13:13 / cg" |
|
3492 |
! |
|
3493 |
||
3494 |
hasColormapHolder |
|
3495 |
^ [self hasColormap] |
|
3496 |
||
3497 |
"Created: / 04-07-2010 / 10:13:05 / cg" |
|
3498 |
! |
|
3499 |
||
2812 | 3500 |
imageHasImageSequence |
3501 |
^ self image notNil and:[self image imageSequence notNil] |
|
3502 |
||
3503 |
"Created: / 21-10-2010 / 14:35:45 / cg" |
|
3504 |
! |
|
3505 |
||
3506 |
imageHasImageSequenceHolder |
|
3507 |
|holder| |
|
3508 |
||
3509 |
(holder := builder bindingAt:#imageHasImageSequenceHolder) isNil ifTrue:[ |
|
3510 |
builder aspectAt:#imageHasImageSequenceHolder put:(holder := false asValue). |
|
3511 |
holder value:(self imageHasImageSequence). |
|
3512 |
]. |
|
3513 |
^ holder |
|
3514 |
||
3515 |
"Modified: / 21-10-2010 / 14:36:57 / cg" |
|
3516 |
! |
|
3517 |
||
3518 |
imageHasNextImage |
|
3519 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) < self image imageSequence size ] |
|
3520 |
||
3521 |
"Created: / 21-10-2010 / 14:37:10 / cg" |
|
3522 |
! |
|
3523 |
||
2792 | 3524 |
imageHasNextImageHolder |
2812 | 3525 |
|holder| |
3526 |
||
3527 |
(holder := builder bindingAt:#imageHasNextImageHolder) isNil ifTrue:[ |
|
3528 |
builder aspectAt:#imageHasNextImageHolder put:(holder := false asValue). |
|
3529 |
holder value:(self imageHasNextImage). |
|
3530 |
]. |
|
3531 |
^ holder |
|
3532 |
||
3533 |
"Modified: / 21-10-2010 / 14:37:40 / cg" |
|
3534 |
! |
|
3535 |
||
3536 |
imageHasPreviousImage |
|
3537 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) > 1 ] |
|
3538 |
||
3539 |
"Created: / 21-10-2010 / 14:37:21 / cg" |
|
3540 |
! |
|
3541 |
||
3542 |
imageHasPreviousImageHolder |
|
3543 |
|holder| |
|
3544 |
||
3545 |
(holder := builder bindingAt:#imageHasPreviousImageHolder) isNil ifTrue:[ |
|
3546 |
builder aspectAt:#imageHasPreviousImageHolder put:(holder := false asValue). |
|
3547 |
holder value:(self imageHasPreviousImage). |
|
3548 |
]. |
|
3549 |
^ holder |
|
3550 |
||
3551 |
"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
|
3552 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
3553 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3554 |
imageInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3555 |
|holder| |
2792 | 3556 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3557 |
(holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3558 |
builder aspectAt:#imageInfoHolder put:(holder := '' asValue). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3559 |
]. |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3560 |
^ holder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3561 |
|
2792 | 3562 |
"Modified: / 04-07-2010 / 10:15:14 / cg" |
400 | 3563 |
! |
3564 |
||
2767 | 3565 |
imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
3566 |
"returns whether an image is loaded as value holder" |
|
3567 |
||
3568 |
^ [ |
|
2792 | 3569 |
self imageIsLoadedHolder value |
2767 | 3570 |
and:[ self allowedToChangeImageDimensionAndDepth ] |
3571 |
] |
|
2792 | 3572 |
|
3573 |
"Modified: / 04-07-2010 / 10:15:43 / cg" |
|
2767 | 3574 |
! |
3575 |
||
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3576 |
imageIsLoadedAndClassDefined |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3577 |
"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
|
3578 |
|
2792 | 3579 |
^ [self hasClassAndSelectorDefinedHolder value |
3580 |
and:[self imageIsLoadedHolder value]] |
|
3581 |
||
3582 |
"Created: / 31-07-1998 / 02:04:18 / cg" |
|
3583 |
"Modified: / 04-07-2010 / 10:15:48 / cg" |
|
3584 |
! |
|
3585 |
||
3586 |
imageIsLoadedHolder |
|
3587 |
"returns whether an image is loaded as value holder" |
|
3588 |
||
3589 |
|holder| |
|
3590 |
||
3591 |
(holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
3592 |
builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
3593 |
]. |
|
3594 |
^ holder |
|
3595 |
||
3596 |
"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
|
3597 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3598 |
|
400 | 3599 |
listOfColors |
1896 | 3600 |
"returns the list of colors" |
3601 |
||
3602 |
|list| |
|
3603 |
||
3604 |
(list := builder bindingAt:#listOfColors) isNil ifTrue:[ |
|
3605 |
builder aspectAt:#listOfColors put:(list := List new). |
|
3606 |
list addDependent:self. |
|
400 | 3607 |
]. |
1896 | 3608 |
^ list |
400 | 3609 |
! |
3610 |
||
1987 | 3611 |
magnificationHolder |
3612 |
"returns current magnification of the image as an AspectAdaptor" |
|
3613 |
||
3614 |
|holder| |
|
3615 |
(holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[ |
|
3616 |
builder aspectAt:#valueOfMagnification put:( |
|
3617 |
holder := AspectAdaptor new subject:self; forAspect:#magnification) |
|
3618 |
]. |
|
3619 |
^ holder |
|
3620 |
! |
|
3621 |
||
2792 | 3622 |
previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3623 |
|holder| |
2792 | 3624 |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3625 |
(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
|
3626 |
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
|
3627 |
holder addDependent:self. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3628 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3629 |
^ holder |
2792 | 3630 |
|
3631 |
"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
|
3632 |
! |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3633 |
|
400 | 3634 |
selectionOfColor |
1682 | 3635 |
"returns a valueHolder for the current selection of the edit color. |
3636 |
Here, an AspectAdaptor which accesses selectedColorIndex is returned." |
|
400 | 3637 |
|
3638 |
|holder| |
|
1682 | 3639 |
|
400 | 3640 |
(holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[ |
3641 |
builder aspectAt:#selectionOfColor put:( |
|
1682 | 3642 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ). |
400 | 3643 |
]. |
3644 |
^ holder |
|
3645 |
! |
|
3646 |
||
1558 | 3647 |
tileModeHolder |
3648 |
|holder| |
|
2812 | 3649 |
|
1558 | 3650 |
(holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[ |
3651 |
builder aspectAt:#tileModeHolder put:(holder := false asValue). |
|
3652 |
holder addDependent:self. |
|
3653 |
]. |
|
3654 |
^ holder |
|
2812 | 3655 |
|
3656 |
"Modified: / 21-10-2010 / 14:35:24 / cg" |
|
1558 | 3657 |
! |
3658 |
||
400 | 3659 |
valueOfMagnification |
2308 | 3660 |
<resource: #obsolete> |
767 | 3661 |
"returns current magnification of the image as an AspectAdaptor" |
400 | 3662 |
|
1987 | 3663 |
self obsoleteMethodWarning:'stupid method name - use #magnificationHolder'. |
3664 |
^ self magnificationHolder |
|
400 | 3665 |
! ! |
3666 |
||
767 | 3667 |
!ImageEditor methodsFor:'change & update'! |
3668 |
||
3669 |
findColorMapMode |
|
899 | 3670 |
"finds the colorMapMode for a new image" |
767 | 3671 |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3672 |
|image newListOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors| |
1054 | 3673 |
|
3674 |
image := self image. |
|
1975 | 3675 |
image isNil ifTrue:[^ self ]. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3676 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3677 |
image mask notNil ifTrue: [ |
1896 | 3678 |
colorMapModeKey := 'masked'. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3679 |
] ifFalse:[ |
1896 | 3680 |
colorMapModeKey := 'depth'. |
1054 | 3681 |
]. |
1896 | 3682 |
colorMapModeKey := colorMapModeKey , image depth printString. |
1967 | 3683 |
self colorMapMode setValue:colorMapModeKey. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3684 |
|
1928 | 3685 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3686 |
image depth > 12 ifTrue:[ |
2447 | 3687 |
newListOfColors := OrderedCollection new. |
2870 | 3688 |
(image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[ |
1927 | 3689 |
someOrAllUsedColors := image usedColorsMax:10000. |
2054 | 3690 |
someOrAllUsedColors notNil ifTrue:[ |
3691 |
someOrAllUsedColors := someOrAllUsedColors asArray. |
|
3692 |
someOrAllUsedColors sort:self sortBlockForColors. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3693 |
newListOfColors addAll:someOrAllUsedColors. |
2054 | 3694 |
"/ listOfColors add:Color black; add:Color white. |
3695 |
] |
|
1904 | 3696 |
] ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3697 |
newListOfColors addAll:(image colorMap). |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3698 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3699 |
] ifFalse:[ |
2447 | 3700 |
newListOfColors := OrderedCollection withAll:(self listOfColors). |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3701 |
newListOfColors isEmpty ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3702 |
self colorMapMode: colorMapMode value. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3703 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3704 |
]. |
2054 | 3705 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3706 |
newListOfColors notEmptyOrNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3707 |
drawColor1 := newListOfColors at:1. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3708 |
drawColor2 := newListOfColors at:2 ifAbsent:drawColor1. |
2054 | 3709 |
|
3710 |
self hasMask ifTrue: [ |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3711 |
(newListOfColors contains: [:clr| clr = (Color colorId:0)]) |
2054 | 3712 |
ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3713 |
newListOfColors addFirst:(Color colorId:0). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3714 |
drawColor1 := newListOfColors at:2. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3715 |
drawColor2 := newListOfColors at:3 ifAbsent:drawColor1. |
2054 | 3716 |
] |
3717 |
]. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3718 |
"/ imageEditView drawingColors:(Array with: drawColor1 with: drawColor2). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3719 |
"/ self selectionOfColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3720 |
"/ setValue: 0; |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3721 |
"/ value: (listOfColors indexOf: imageEditView selectedColor). |
767 | 3722 |
]. |
2447 | 3723 |
self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[ |
3724 |
self listOfColors contents:newListOfColors. |
|
3725 |
]. |
|
2870 | 3726 |
|
3727 |
"Modified: / 18-01-2012 / 13:58:38 / cg" |
|
767 | 3728 |
! |
3729 |
||
942 | 3730 |
update:something with:aParameter from:changedObject |
2042 | 3731 |
|clrIndex img imagePreView clr changedColor| |
1436 | 3732 |
|
3733 |
img := self image. |
|
2042 | 3734 |
imagePreView := self imagePreView. |
1558 | 3735 |
|
3736 |
changedObject == self tileModeHolder ifTrue:[ |
|
2042 | 3737 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3738 |
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
|
3739 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3740 |
invalidate. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3741 |
^ self |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3742 |
]. |
2792 | 3743 |
changedObject == self previewBackgroundColorHolder ifTrue:[ |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3744 |
clr := changedObject value isNil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3745 |
ifTrue:[imageEditView viewBackground] |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3746 |
ifFalse:[Color perform:changedObject value]. |
2042 | 3747 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3748 |
viewBackground:clr; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3749 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3750 |
invalidate. |
1558 | 3751 |
^ self |
3752 |
]. |
|
3753 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3754 |
changedObject == self listOfColors ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3755 |
something == #at: ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3756 |
"/ colormap entry changed at aParameter |
960 | 3757 |
|
3758 |
clrIndex := aParameter. |
|
3759 |
(self hasMask) ifTrue:[ |
|
3760 |
clrIndex := clrIndex - 1. |
|
3761 |
]. |
|
1928 | 3762 |
changedColor := changedObject at:aParameter. |
3763 |
img colorMap notNil ifTrue:[ |
|
3764 |
img colorMap at:clrIndex put:changedColor. |
|
3765 |
self colorMapChanged. |
|
3766 |
] ifFalse:[ |
|
3767 |
drawingColormap notNil ifTrue:[ |
|
3768 |
drawingColormap at:clrIndex put:changedColor. |
|
3769 |
]. |
|
3770 |
]. |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3771 |
^ self |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3772 |
]. |
1896 | 3773 |
^ self |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3774 |
]. |
1124 | 3775 |
|
3776 |
changedObject == imageEditView undoImages ifTrue:[ |
|
1987 | 3777 |
self canUndoHolder value:(changedObject notEmpty). |
1124 | 3778 |
^ self. |
3779 |
]. |
|
3780 |
||
1345 | 3781 |
changedObject == imageEditView ifTrue:[ |
3782 |
something == #imageColors ifTrue:[ |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3783 |
self updateListOfColorsAndColormapMode. |
1345 | 3784 |
^ self. |
3785 |
]. |
|
3786 |
something == #image ifTrue:[ |
|
2812 | 3787 |
self updateAfterImageChange. |
2728 | 3788 |
imagePreView image:img scroll:false. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3789 |
self updateListOfColorsAndColormapMode. |
1558 | 3790 |
self tileModeHolder value ifTrue:[ |
2042 | 3791 |
imagePreView tileMode:true tileOffset:(img extent). |
1558 | 3792 |
]. |
1345 | 3793 |
^ self. |
3794 |
]. |
|
3795 |
something == #subImageIn ifTrue:[ |
|
2042 | 3796 |
imagePreView image ~~ img ifTrue:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
3797 |
self error:'internal error' mayProceed:true. |
1406 | 3798 |
]. |
1558 | 3799 |
self tileModeHolder value ifTrue:[ |
2042 | 3800 |
imagePreView invalidate. |
1558 | 3801 |
] ifFalse:[ |
2042 | 3802 |
imagePreView invalidate:aParameter. |
1558 | 3803 |
]. |
1345 | 3804 |
^ self. |
3805 |
]. |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3806 |
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
|
3807 |
(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
|
3808 |
"/ no color/mask */ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3809 |
"/ self halt. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3810 |
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
|
3811 |
] ifFalse:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3812 |
clrIndex := self listOfColors indexOf:aParameter. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3813 |
]. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3814 |
self selectionOfColor value:clrIndex. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3815 |
^ self. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3816 |
]. |
1345 | 3817 |
^ self. |
3818 |
]. |
|
3819 |
||
1880 | 3820 |
changedObject == imageEditView modifiedHolder ifTrue:[ |
3821 |
"/ self halt:'to be implemented'. |
|
3822 |
^ self |
|
3823 |
]. |
|
3824 |
||
1345 | 3825 |
changedObject == imageEditView image ifTrue:[ |
2042 | 3826 |
"/ self halt:'to be implemented'. |
2812 | 3827 |
self updateAfterImageChange. |
1345 | 3828 |
^ self. |
3829 |
]. |
|
3830 |
||
942 | 3831 |
super update:something with:aParameter from:changedObject |
3832 |
||
2812 | 3833 |
"Modified: / 21-10-2010 / 14:34:31 / cg" |
3834 |
! |
|
3835 |
||
3836 |
updateAfterImageChange |
|
3837 |
|img| |
|
3838 |
||
3839 |
(img := self image) notNil ifTrue:[ |
|
3840 |
img := img onDevice:device. |
|
3841 |
self updateColorsFromImage:img. |
|
3842 |
self findColorMapMode. |
|
3843 |
self updateLabelsAndHistory. |
|
3844 |
||
3845 |
imageSeqNr isNil ifTrue:[ |
|
3846 |
imageSeqNr := 1 |
|
3847 |
]. |
|
3848 |
self imageHasImageSequenceHolder value:(self imageHasImageSequence). |
|
3849 |
self imageHasNextImageHolder value:(self imageHasNextImage). |
|
3850 |
self imageHasPreviousImageHolder value:(self imageHasPreviousImage). |
|
3851 |
] ifFalse:[ |
|
3852 |
self updateForNoImage |
|
3853 |
] |
|
3854 |
||
3855 |
"Modified: / 21-10-2010 / 14:40:45 / cg" |
|
942 | 3856 |
! |
3857 |
||
1900 | 3858 |
updateColorsFromImage:image |
3859 |
|colors| |
|
3860 |
||
2870 | 3861 |
image depth > 16 ifTrue:[ |
3862 |
self listOfColors contents:#(). |
|
3863 |
^ self. |
|
3864 |
]. |
|
3865 |
||
1904 | 3866 |
colors := image colorMap. |
3867 |
colors isNil ifTrue:[ |
|
1906 | 3868 |
Error handle:[:ex | |
3869 |
colors := OrderedCollection new. |
|
3870 |
] do:[ |
|
3871 |
colors := image usedColors asSet. |
|
2870 | 3872 |
]. |
1900 | 3873 |
]. |
1904 | 3874 |
self listOfColors contents:(colors asOrderedCollection). |
2870 | 3875 |
|
3876 |
"Modified: / 18-01-2012 / 13:57:43 / cg" |
|
1900 | 3877 |
! |
3878 |
||
1054 | 3879 |
updateForNoImage |
767 | 3880 |
"updates channels and view, if image is loaded" |
3881 |
||
2792 | 3882 |
self imageIsLoadedHolder value: false. |
767 | 3883 |
self listOfColors removeAll. |
2812 | 3884 |
self imagePreView image: nil. |
3885 |
self imageHasImageSequenceHolder value:false. |
|
3886 |
||
3887 |
"Modified: / 21-10-2010 / 14:39:13 / cg" |
|
767 | 3888 |
! |
3889 |
||
3890 |
updateLabelsAndHistory |
|
3891 |
"updates labels and history, if something has changed" |
|
3892 |
||
1910 | 3893 |
|image| |
3894 |
||
3895 |
image := self image. |
|
3896 |
||
2792 | 3897 |
self imageIsLoadedHolder value: image notNil. |
1910 | 3898 |
image isNil ifTrue: [^nil]. |
767 | 3899 |
|
3900 |
self updateInfoLabel. |
|
3901 |
||
1975 | 3902 |
imageEditView resourceClass notNil ifTrue:[ |
3903 |
imageEditView resourceSelector notNil ifTrue:[ |
|
3904 |
self addHistoryEntryForClass:imageEditView resourceClass selector:imageEditView resourceSelector. |
|
3905 |
] |
|
3906 |
]. |
|
3907 |
||
3908 |
image fileName notNil ifTrue: [ |
|
3909 |
self addHistoryEntryForFile:image fileName. |
|
3910 |
]. |
|
2792 | 3911 |
|
3912 |
"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
|
3913 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3914 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3915 |
updateListOfColorsAndColormapMode |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3916 |
|selectedColor colorMap image| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3917 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3918 |
selectedColor := self selectedColorOrNil. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3919 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3920 |
image := self image. |
1975 | 3921 |
image isNil ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3922 |
self listOfColors removeAll. |
1975 | 3923 |
] ifFalse:[ |
3924 |
colorMap := image colorMap. |
|
2447 | 3925 |
colorMap notNil ifTrue:[ |
3926 |
(colorMap size <= 4096) ifTrue:[ |
|
3927 |
image mask notNil ifTrue:[ |
|
3928 |
colorMap := (Array with:(Color noColor)),colorMap. |
|
3929 |
]. |
|
3930 |
self listOfColors contents:colorMap. |
|
3931 |
] ifFalse:[ |
|
3932 |
self listOfColors removeAll. |
|
3933 |
colorMap isFixedPalette ifTrue:[ |
|
3934 |
image colorMap:nil. |
|
3935 |
image photometric:#rgb. |
|
3936 |
image samplesPerPixel:3. |
|
3937 |
||
3938 |
image bitsPerSample:(Array |
|
3939 |
with:(colorMap bitsRed) |
|
3940 |
with:(colorMap bitsGreen) |
|
3941 |
with:(colorMap bitsBlue)). |
|
3942 |
]. |
|
3943 |
] |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3944 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3945 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3946 |
self findColorMapMode. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3947 |
selectedColor notNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3948 |
self selectColor:selectedColor. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3949 |
]. |
767 | 3950 |
! ! |
3951 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3952 |
!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
|
3953 |
|
1951 | 3954 |
atColor:anOldColor put:newColor |
1952 | 3955 |
"a color changed to a new color" |
3956 |
||
1930 | 3957 |
|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
|
3958 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3959 |
list := self listOfColors. |
1951 | 3960 |
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
|
3961 |
|
1930 | 3962 |
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
|
3963 |
index ~~ 0 ifTrue:[ |
1928 | 3964 |
oldColor := list at:index. |
3965 |
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
|
3966 |
] ifFalse:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
3967 |
self error:'internal error' mayProceed:true. |
1928 | 3968 |
list add:newColor |
3969 |
]. |
|
3970 |
||
3971 |
image := self image. |
|
3972 |
(image colorMap isNil |
|
3973 |
and:[drawingColormap isNil]) ifTrue:[ |
|
3974 |
oldColor notNil ifTrue:[ |
|
3975 |
imageEditView makeUndo. |
|
3976 |
newImage := image copy. |
|
3977 |
newImage |
|
3978 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
3979 |
do:[:x :y :clr | |
|
3980 |
|newClr| |
|
3981 |
||
1951 | 3982 |
newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr]. |
1928 | 3983 |
newImage colorAtX:x y:y put:newClr |
3984 |
]. |
|
3985 |
imageEditView image:newImage. |
|
3986 |
imageEditView setModified. |
|
3987 |
self updateImage. |
|
3988 |
self updateImagePreView. |
|
1930 | 3989 |
|
3990 |
self selectionOfColor value:oldSel. |
|
3991 |
imageEditView selectedColorIndex:oldSel. |
|
3992 |
imageEditView selectedColor:(self listOfColors at:oldSel). |
|
1928 | 3993 |
] |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3994 |
]. |
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 |
|
942 | 3997 |
blueAtColor:aColor put:newBlue |
3998 |
"helper used to return a new row element, when blue is changed" |
|
3999 |
||
4000 |
|byte| |
|
4001 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4002 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4003 |
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
|
4004 |
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
|
4005 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4006 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4007 |
put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte). |
942 | 4008 |
! |
4009 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4010 |
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
|
4011 |
"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
|
4012 |
|
930 | 4013 |
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
|
4014 |
^ 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
|
4015 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4016 |
"Created: / 26.7.1998 / 12:30:35 / cg" |
930 | 4017 |
"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
|
4018 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4019 |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4020 |
canSelectBlueInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4021 |
^ aColor blueByte notNil |
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 |
"Created: / 7.8.1998 / 22:50:34 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4024 |
"Modified: / 7.8.1998 / 22:52:57 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4025 |
! |
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 |
canSelectGreenInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4028 |
^ aColor greenByte notNil |
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 |
"Created: / 7.8.1998 / 22:50:22 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4031 |
"Modified: / 7.8.1998 / 22:52:46 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4032 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4033 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4034 |
canSelectRedInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4035 |
^ aColor redByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4036 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4037 |
"Created: / 7.8.1998 / 22:50:00 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4038 |
"Modified: / 7.8.1998 / 22:51:03 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4039 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4040 |
|
942 | 4041 |
greenAtColor:aColor put:newGreen |
4042 |
"helper used to return a new row element, when green is changed" |
|
4043 |
||
4044 |
|byte| |
|
4045 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4046 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4047 |
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
|
4048 |
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
|
4049 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4050 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4051 |
put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)). |
942 | 4052 |
! |
4053 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4054 |
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
|
4055 |
"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
|
4056 |
|
930 | 4057 |
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
|
4058 |
^ 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
|
4059 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4060 |
"Created: / 26.7.1998 / 12:30:29 / cg" |
930 | 4061 |
"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
|
4062 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4063 |
|
942 | 4064 |
redAtColor:aColor put:newRed |
4065 |
"helper used to return a new row element, when red is changed" |
|
4066 |
||
4067 |
|byte| |
|
4068 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4069 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4070 |
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
|
4071 |
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
|
4072 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4073 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4074 |
put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)). |
942 | 4075 |
! |
4076 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4077 |
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
|
4078 |
"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
|
4079 |
|
930 | 4080 |
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
|
4081 |
^ 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
|
4082 |
|
930 | 4083 |
"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
|
4084 |
! |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4085 |
|
2712 | 4086 |
theColorItself:aColor |
4087 |
"an accessor for the table-column" |
|
4088 |
||
1449
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4089 |
^ 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
|
4090 |
! ! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4091 |
|
2663 | 4092 |
!ImageEditor methodsFor:'defaults'! |
4093 |
||
4094 |
aboutIcon |
|
4095 |
^ self class defaultIcon |
|
4096 |
! ! |
|
4097 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4098 |
!ImageEditor methodsFor:'drag & drop'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4099 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4100 |
canDropObjects:aCollectionOfDropObjects in:aWidget |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4101 |
^ (aCollectionOfDropObjects size == 1) |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4102 |
and:[ aCollectionOfDropObjects |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4103 |
contains:[:dropObject | dropObject isFileObject]] |
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 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4106 |
dropObjects:aCollectionOfDropObjects in:aWidget at:position |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4107 |
|dropObject| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4108 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4109 |
dropObject := aCollectionOfDropObjects first. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4110 |
dropObject isFileObject ifTrue:[ |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4111 |
self loadFromFile:dropObject asFilename. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4112 |
] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4113 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4114 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4115 |
!ImageEditor methodsFor:'event handling'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4116 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4117 |
processEvent:anEvent |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4118 |
"Return true, if I have eaten the event" |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4119 |
|
2841 | 4120 |
|view focusView p transformation| |
4121 |
||
4122 |
view := anEvent view. |
|
4123 |
view notNil ifTrue:[ |
|
4124 |
view == self imagePreView ifTrue:[ |
|
4125 |
((anEvent isButtonPressEvent and:[ anEvent button == 1 ]) |
|
4126 |
or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]]) ifTrue:[ |
|
4127 |
p := anEvent x @ anEvent y. |
|
4128 |
(transformation := view transformation) notNil ifTrue:[ |
|
4129 |
p := transformation applyInverseTo:p. |
|
4130 |
]. |
|
4131 |
self imageEditView scrollToMakeVisible:p. |
|
4132 |
^ true. |
|
2546 | 4133 |
]. |
2841 | 4134 |
]. |
4135 |
||
4136 |
anEvent isKeyPressEvent ifTrue:[ |
|
4137 |
focusView := view windowGroup focusView ? view. |
|
4138 |
(focusView isComponentOf:(builder componentAt:#colorDataSetView)) ifTrue:[ |
|
4139 |
anEvent key == #Paste ifTrue:[ |
|
4140 |
self pasteColorIntoColormap. |
|
4141 |
^ true. |
|
4142 |
]. |
|
4143 |
anEvent key == #Copy ifTrue:[ |
|
4144 |
self copyColorFromColormap. |
|
4145 |
^ true. |
|
4146 |
]. |
|
4147 |
]. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4148 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4149 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4150 |
^ false. |
2841 | 4151 |
|
4152 |
"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
|
4153 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4154 |
|
672 | 4155 |
!ImageEditor methodsFor:'help'! |
4156 |
||
4157 |
defaultInfoLabel |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4158 |
"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
|
4159 |
some widget with a help text." |
672 | 4160 |
|
1966 | 4161 |
|resourceClass resourceSelector| |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4162 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4163 |
resourceClass := imageEditView resourceClass. |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
4164 |
resourceClass notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4165 |
resourceSelector := imageEditView resourceSelector. |
1966 | 4166 |
resourceSelector notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4167 |
^ resourceClass name, ' >> ', resourceSelector |
1966 | 4168 |
]. |
672 | 4169 |
]. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4170 |
^ 'No class and selector defined.' |
674 | 4171 |
! |
4172 |
||
702 | 4173 |
openDocumentation |
767 | 4174 |
"opens the documentation file of the Image Editor" |
674 | 4175 |
|
763 | 4176 |
self openHTMLDocument: 'tools/uipainter/ImageEditor.html' |
4177 |
||
672 | 4178 |
! ! |
4179 |
||
767 | 4180 |
!ImageEditor methodsFor:'loading'! |
4181 |
||
1975 | 4182 |
loadFromClass:aClass andSelector:aSelector |
4183 |
"loads an image from the method specified by class and selector" |
|
4184 |
||
4185 |
self assert:(aClass isNil or:[aClass isClass]). |
|
4186 |
||
4187 |
(aClass isNil or:[aSelector]) isNil ifTrue:[ |
|
4188 |
imageEditView resourceClass:aClass. |
|
4189 |
imageEditView resourceSelector:aSelector. |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4190 |
imageEditView image:nil. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4191 |
self clearModified. |
1966 | 4192 |
^ self. |
4193 |
]. |
|
4194 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4195 |
"/ (imageEditView resourceClass == aClass |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4196 |
"/ and:[ imageEditView resourceSelector == aSelector ]) ifTrue:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4197 |
"/ imageEditView modified ifFalse:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4198 |
"/ ^ self. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4199 |
"/ ]. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4200 |
"/ ]. |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4201 |
|
1975 | 4202 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[ |
1966 | 4203 |
self updateAfterImageChange. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4204 |
self clearModified. |
1966 | 4205 |
] |
1975 | 4206 |
|
4207 |
"Modified: / 16.3.1999 / 21:44:41 / cg" |
|
1966 | 4208 |
! |
4209 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4210 |
loadFromFile:aFileName |
767 | 4211 |
"loads an image from aFileName and sets up color map list and other info labels" |
4212 |
||
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4213 |
self withCursor:Cursor wait do:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4214 |
(imageEditView loadFromFile: aFileName) notNil ifTrue:[ |
1966 | 4215 |
self updateAfterImageChange |
767 | 4216 |
] |
4217 |
] |
|
960 | 4218 |
|
1057 | 4219 |
"Modified: / 16.3.1999 / 21:44:26 / cg" |
767 | 4220 |
! |
4221 |
||
960 | 4222 |
loadFromImage:anImage |
767 | 4223 |
"loads an image from anImage and sets up color map list and other info labels" |
4224 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4225 |
|img| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4226 |
|
1057 | 4227 |
anImage notNil ifTrue:[ |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4228 |
img := anImage onDevice:device. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4229 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4230 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4231 |
imageEditView image:img. |
1799
e605f0af928a
clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents:
1796
diff
changeset
|
4232 |
imageEditView clearModified. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4233 |
|
1966 | 4234 |
self updateAfterImageChange. |
4235 |
"/ img notNil ifTrue:[ |
|
4236 |
"/ self updateColorsFromImage:img. |
|
4237 |
"/ self findColorMapMode. |
|
4238 |
"/ self updateLabelsAndHistory. |
|
4239 |
"/ ] ifFalse:[ |
|
4240 |
"/ self updateForNoImage |
|
4241 |
"/ ] |
|
960 | 4242 |
|
1057 | 4243 |
"Modified: / 16.3.1999 / 21:43:56 / cg" |
767 | 4244 |
! |
4245 |
||
1975 | 4246 |
loadFromOrPrepareForClass: aClass andSelector: aSelector |
767 | 4247 |
"loads an image by evaluating aMessage; |
4248 |
if no image could extract from aMessage; do set the class and the selector from |
|
4249 |
the aMessage for a saving at the end of editing" |
|
4250 |
||
1975 | 4251 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue: [ |
1900 | 4252 |
self updateColorsFromImage:self image. |
767 | 4253 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4254 |
] ifFalse: [ |
1975 | 4255 |
imageEditView resourceClass: aClass. |
4256 |
imageEditView resourceSelector:aSelector. |
|
767 | 4257 |
]. |
4258 |
self updateLabelsAndHistory. |
|
1057 | 4259 |
|
4260 |
"Modified: / 16.3.1999 / 21:45:07 / cg" |
|
767 | 4261 |
! ! |
4262 |
||
400 | 4263 |
!ImageEditor methodsFor:'menu modes'! |
4264 |
||
975 | 4265 |
colorMapMode |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4266 |
"returns the colorMapMode" |
400 | 4267 |
|
975 | 4268 |
colorMapMode isNil ifTrue: [colorMapMode := '' asValue]. |
400 | 4269 |
|
975 | 4270 |
^colorMapMode |
400 | 4271 |
! |
4272 |
||
975 | 4273 |
editMode |
4274 |
"returns editMode" |
|
400 | 4275 |
|
1054 | 4276 |
editMode isNil ifTrue: [ |
975 | 4277 |
editMode := #point asValue. |
1329 | 4278 |
editMode onChangeEvaluate:[imageEditView editMode:(editMode value)] |
975 | 4279 |
]. |
4280 |
||
4281 |
^editMode |
|
400 | 4282 |
! |
4283 |
||
975 | 4284 |
mouseKeyColorMode |
4285 |
"returns mouseKeyColorMode" |
|
400 | 4286 |
|
1345 | 4287 |
mouseKeyColorMode isNil ifTrue:[ |
975 | 4288 |
mouseKeyColorMode := 1 asValue. |
1345 | 4289 |
mouseKeyColorMode onChangeEvaluate: [ |
4290 |
imageEditView mouseKeyColorMode:mouseKeyColorMode value. |
|
4291 |
self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor). |
|
4292 |
] |
|
956 | 4293 |
]. |
400 | 4294 |
|
975 | 4295 |
^mouseKeyColorMode |
1345 | 4296 |
|
4297 |
"Modified: / 10.2.2000 / 23:16:42 / cg" |
|
400 | 4298 |
! ! |
4299 |
||
1558 | 4300 |
!ImageEditor methodsFor:'private'! |
4301 |
||
1975 | 4302 |
checkModified |
4303 |
imageEditView modified value ifTrue:[ |
|
4304 |
(Dialog |
|
4305 |
confirm:(resources string:'Image was not saved. Proceed anyway ?') |
|
4306 |
yesLabel:(resources string:'Proceed') |
|
4307 |
noLabel:(resources string:'Cancel') |
|
4308 |
initialAnswer:false |
|
4309 |
) ifFalse: [^false]. |
|
4310 |
||
4311 |
imageEditView clearModified. |
|
4312 |
]. |
|
4313 |
^ true |
|
4314 |
||
4315 |
"Modified: / 29.7.1998 / 18:55:24 / cg" |
|
4316 |
! |
|
4317 |
||
1960 | 4318 |
pointFromString:aString |
4319 |
|p s x y| |
|
4320 |
||
4321 |
p := Object readFromString:aString onError:nil. |
|
1962 | 4322 |
p isPoint ifTrue:[^ p]. |
1960 | 4323 |
|
4324 |
s := aString readStream. |
|
4325 |
x := Number readFrom:s onError:nil. |
|
4326 |
x notNil ifTrue:[ |
|
4327 |
s skipSeparators. |
|
1962 | 4328 |
[s atEnd not and:[s peek isDigit not]] whileTrue:[s next]. |
1960 | 4329 |
y := Number readFrom:s onError:nil. |
1961 | 4330 |
^ x @ (y ? x) |
1960 | 4331 |
]. |
1962 | 4332 |
^ nil |
1960 | 4333 |
! |
4334 |
||
1939 | 4335 |
sortBlockForColors |
4336 |
^ [:a :b | |
|
4337 |
a redByte == b redByte ifTrue:[ |
|
4338 |
a greenByte == b greenByte ifTrue:[ |
|
4339 |
a blueByte < b blueByte |
|
4340 |
] ifFalse:[ |
|
4341 |
a greenByte < b greenByte |
|
4342 |
] |
|
4343 |
] ifFalse:[ |
|
4344 |
a redByte < b redByte |
|
4345 |
] |
|
4346 |
] |
|
4347 |
! |
|
4348 |
||
1598 | 4349 |
updateImage |
4350 |
|img| |
|
4351 |
||
4352 |
img := imageEditView image. |
|
4353 |
imageEditView image:img. |
|
4354 |
self fetchImageData. |
|
4355 |
! |
|
4356 |
||
1558 | 4357 |
updateImagePreView |
4358 |
self tileModeHolder value ifTrue:[ |
|
4359 |
self imagePreView tileMode:true tileOffset:(self image extent). |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4360 |
]. |
2546 | 4361 |
self imagePreView setImage:(self image) scroll:false invalidate:true. |
1558 | 4362 |
! ! |
4363 |
||
535 | 4364 |
!ImageEditor methodsFor:'queries'! |
4365 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4366 |
hasLastGrabScreenArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4367 |
^ [ lastGrabbedScreenArea notNil ] |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4368 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4369 |
|
960 | 4370 |
hasMask |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4371 |
^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask'] |
960 | 4372 |
|
4373 |
"Created: / 18.8.1998 / 17:17:38 / cg" |
|
4374 |
! |
|
4375 |
||
1975 | 4376 |
modified |
4377 |
^ imageEditView modified |
|
4378 |
! |
|
4379 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4380 |
modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4381 |
super modified:aBoolean. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4382 |
imageEditView modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4383 |
! |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4384 |
|
535 | 4385 |
preferredExtent |
767 | 4386 |
"returns the preferred extent" |
535 | 4387 |
|
2423
0c5ac1daf0e4
changed #preferredExtent - formating
Stefan Vogel <sv@exept.de>
parents:
2420
diff
changeset
|
4388 |
^ super preferredExtent max: (Screen current width//3)@(Screen current height//3.5) |
535 | 4389 |
! ! |
4390 |
||
400 | 4391 |
!ImageEditor methodsFor:'selection'! |
4392 |
||
4393 |
magnification |
|
767 | 4394 |
"returns the magnification of the image" |
400 | 4395 |
|
911 | 4396 |
self imageEditView isNil ifTrue: [^1]. |
4397 |
^imageEditView magnification x |
|
400 | 4398 |
! |
4399 |
||
4400 |
magnification: aValue |
|
767 | 4401 |
"sets the magnification of the image" |
400 | 4402 |
|
905 | 4403 |
|magnification| |
4404 |
magnification := (aValue ? 1) asPoint. |
|
911 | 4405 |
(magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil]. |
4406 |
imageEditView magnification: magnification |
|
400 | 4407 |
! |
4408 |
||
4409 |
selectedColorIndex |
|
767 | 4410 |
"returns the index of the selected color" |
400 | 4411 |
|
4412 |
^selectedColorIndex |
|
4413 |
! |
|
4414 |
||
4415 |
selectedColorIndex: anIndex |
|
767 | 4416 |
"sets the index of the selected color" |
400 | 4417 |
|
1054 | 4418 |
|clr pixel| |
4419 |
||
4420 |
selectedColorIndex := anIndex. |
|
2447 | 4421 |
anIndex isNil ifTrue:[^ self]. |
1054 | 4422 |
clr := self listOfColors at:anIndex ifAbsent:nil. |
4423 |
clr isNil ifTrue:[^ self]. |
|
4424 |
||
1075 | 4425 |
pixel := anIndex - 1. |
1054 | 4426 |
(self listOfColors at:1) = Color noColor ifTrue:[ |
4427 |
anIndex == 1 ifTrue:[ |
|
4428 |
pixel := nil. "/ mask |
|
4429 |
] ifFalse:[ |
|
1075 | 4430 |
pixel := pixel - 1 |
1054 | 4431 |
] |
4432 |
]. |
|
4433 |
imageEditView selectedColorIndex:pixel. |
|
4434 |
imageEditView selectedColor:clr. |
|
400 | 4435 |
! ! |
4436 |
||
1716 | 4437 |
!ImageEditor methodsFor:'startup & release'! |
400 | 4438 |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4439 |
closeDownViews |
1644 | 4440 |
builder notNil ifTrue:[ |
4441 |
DefaultRelativeSizes := |
|
4442 |
Array |
|
1998 | 4443 |
with:(builder componentAt:#mainPanel) relativeCorners |
1644 | 4444 |
with:(builder componentAt:#verticalPanel) relativeCorners. |
4445 |
]. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4446 |
super closeDownViews |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4447 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4448 |
|
400 | 4449 |
closeRequest |
2016 | 4450 |
"asks for permission before closing" |
4451 |
||
4452 |
imageEditView checkModified ifTrue:[ |
|
4453 |
super closeRequest |
|
4454 |
] |
|
400 | 4455 |
! |
4456 |
||
1980 | 4457 |
commonPostBuild |
1975 | 4458 |
imageEditView undoImages addDependent:self. |
4459 |
imageEditView imageInfoHolder:(self imageInfoHolder). |
|
4460 |
imageEditView activityInfoHolder:(self activityInfoHolder). |
|
4461 |
||
4462 |
imageEditView clickInfoCallBack:[:button :point | |
|
4463 |
|mouseButtonColorToolBar| |
|
4464 |
||
4465 |
mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar. |
|
4466 |
(mouseButtonColorToolBar itemAt:button) toggleIndication. |
|
4467 |
mouseButtonColorToolBar do: [:i| i updateIndicators]. |
|
4468 |
]. |
|
4469 |
||
4470 |
imageEditView addDependent:self. |
|
4471 |
imageEditView modifiedHolder addDependent:self. |
|
4472 |
||
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4473 |
DefaultRelativeSizes notNil ifTrue:[ |
1998 | 4474 |
(builder componentAt:#mainPanel) relativeCorners:DefaultRelativeSizes first. |
1980 | 4475 |
(builder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4476 |
]. |
1995 | 4477 |
|
1996 | 4478 |
"/ using masters infoHolder ? |
4479 |
(builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[ |
|
1998 | 4480 |
(builder componentAt:#mainPanel) layout bottomOffset:0. |
1995 | 4481 |
(builder componentAt:#infoBarSubSpec) beInvisible |
4482 |
] |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4483 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4484 |
|
1980 | 4485 |
open |
4486 |
"after opening, sets the masterApplication of the imageEditView to self" |
|
4487 |
||
4488 |
super open. |
|
4489 |
||
4490 |
imageEditView := (self componentAt: #imageEditView) subViews first. |
|
4491 |
! |
|
4492 |
||
400 | 4493 |
postOpenWith:aBuilder |
767 | 4494 |
"after opening, sets the masterApplication of the imageEditView to self; |
4495 |
evaluate the postOpenAction" |
|
400 | 4496 |
|
1921 | 4497 |
postOpenAction value. |
400 | 4498 |
|
1250 | 4499 |
super postOpenWith:aBuilder. |
4500 |
||
4501 |
aBuilder keyboardProcessor menuBar:nil. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4502 |
self windowGroup addPreEventHook:self. |
400 | 4503 |
! ! |
4504 |
||
1715 | 4505 |
!ImageEditor methodsFor:'user actions-colormap'! |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4506 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4507 |
addColorToColormap |
1682 | 4508 |
self addColorToColormap:(Color black) |
4509 |
! |
|
4510 |
||
4511 |
addColorToColormap:newColor |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4512 |
|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
|
4513 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4514 |
img := self image. |
1499
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4515 |
img isNil ifTrue:[ |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4516 |
self warn:'No Image.'. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4517 |
^ self |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4518 |
]. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4519 |
|
1054 | 4520 |
depth := img depth. |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4521 |
cMap := img colorMap. |
1054 | 4522 |
cMap isNil ifTrue:[ |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4523 |
drawingColormap isNil ifTrue:[ |
1916 | 4524 |
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
|
4525 |
drawingColormap := OrderedCollection new. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4526 |
]. |
1682 | 4527 |
drawingColormap add:newColor. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4528 |
self listOfColors contents:drawingColormap. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4529 |
self selectionOfColor value:(drawingColormap size). |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4530 |
|
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4531 |
"/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs. |
1054 | 4532 |
^ self |
4533 |
]. |
|
4534 |
||
1583 | 4535 |
("(depth == 1)" false |
1054 | 4536 |
or:[cMap size == (1 bitShift:depth)]) ifTrue:[ |
4537 |
depth >= 8 ifTrue:[ |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4538 |
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
|
4539 |
^ self |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4540 |
]. |
1916 | 4541 |
(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
|
4542 |
ifFalse:[ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4543 |
^ self |
1057 | 4544 |
]. |
4545 |
||
4546 |
imageEditView makeUndo. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4547 |
img mask notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4548 |
newMode := 'masked' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4549 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4550 |
newMode := 'depth' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4551 |
]. |
1057 | 4552 |
self colorMapMode:newMode. |
4553 |
] ifFalse:[ |
|
4554 |
imageEditView makeUndo. |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4555 |
]. |
1054 | 4556 |
|
4557 |
cMap := cMap asArray. |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4558 |
listOfColors := self listOfColors. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4559 |
oldCListSize := listOfColors size. |
1054 | 4560 |
|
1682 | 4561 |
newColorMap := cMap copyWith:newColor. |
1054 | 4562 |
|
4563 |
newImage := img species new |
|
4564 |
width:img width |
|
4565 |
height:img height |
|
4566 |
depth:depth |
|
4567 |
fromArray:img bits. |
|
4568 |
||
4569 |
newImage colorMap:newColorMap. |
|
4570 |
newImage fileName:img fileName. |
|
4571 |
newImage mask:(img mask copy). |
|
4572 |
||
4573 |
(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
|
4574 |
listOfColors contents: newImage colorMap. |
1054 | 4575 |
self findColorMapMode. |
4576 |
"/ 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
|
4577 |
listOfColors size > (oldCListSize + 1) ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4578 |
listOfColors removeLast |
1054 | 4579 |
]. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4580 |
self selectionOfColor value:(listOfColors size). |
1054 | 4581 |
self updateLabelsAndHistory. |
4582 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4583 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4584 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
1057 | 4585 |
"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
|
4586 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4587 |
|
1650 | 4588 |
changeHLS |
4589 |
"interactive Hue/Light/Saturation editing" |
|
4590 |
||
4591 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4592 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
2438 | 4593 |
originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels |
4594 |
anyChange | |
|
1652 | 4595 |
|
1741 | 4596 |
"/ compute the averageColor in the background (while asking user) |
2438 | 4597 |
avgColorHolder := nil asValue. |
4598 |
previewImageHolder := nil asValue. |
|
4599 |
||
1652 | 4600 |
readySema := Semaphore new. |
4601 |
[ |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4602 |
|image| |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4603 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4604 |
image := imageEditView image. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4605 |
originalColormap := image colorMap copy. |
2438 | 4606 |
originalPixels := image bits. |
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4607 |
avgColor := image averageColor. |
2438 | 4608 |
avgColorHolder value:avgColor. |
4609 |
||
4610 |
previewImage := self image magnifiedPreservingRatioTo:100@100. |
|
4611 |
previewImageHolder value: previewImage. |
|
4612 |
originalPreviewColormap := previewImage colorMap copy. |
|
4613 |
originalPreviewPixels := previewImage bits. |
|
4614 |
||
1652 | 4615 |
readySema signal. |
4616 |
] forkAt:7. |
|
1649 | 4617 |
|
4618 |
acceptChannel := TriggerValue new. |
|
4619 |
||
4620 |
firstChange := true. |
|
2438 | 4621 |
anyChange := false. |
1649 | 4622 |
|
1651 | 4623 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
4624 |
Color |
|
4625 |
hue:((clr hue) ? 0 + hShift) |
|
1925 | 4626 |
light:((clr light * lFactor / 100) "min:100") |
4627 |
saturation:((clr saturation * sFactor / 100) "min:100")]. |
|
1652 | 4628 |
|
1649 | 4629 |
shiftAction := |
4630 |
[ |
|
1650 | 4631 |
|hShift lFactor sFactor| |
4632 |
||
1649 | 4633 |
acceptChannel value:true. |
4634 |
||
4635 |
firstChange ifTrue:[ |
|
4636 |
imageEditView makeUndo. |
|
4637 |
firstChange := false. |
|
2438 | 4638 |
anyChange := true. |
1649 | 4639 |
]. |
1652 | 4640 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
1650 | 4641 |
|
4642 |
hShift := hueShift value. |
|
4643 |
lFactor := lightValue value. |
|
4644 |
sFactor := saturationValue value. |
|
4645 |
||
1652 | 4646 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
4647 |
||
2438 | 4648 |
previewImage |
4649 |
colorMap:originalPreviewColormap copy; |
|
4650 |
bits:originalPreviewPixels copy; |
|
4651 |
release; |
|
4652 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
4653 |
previewImageHolder value:nil; value:previewImage. |
|
4654 |
||
1652 | 4655 |
shiftProcess notNil ifTrue:[ |
4656 |
shiftProcess terminate. |
|
4657 |
shiftProcess waitUntilTerminated. |
|
4658 |
shiftProcess := nil. |
|
4659 |
]. |
|
4660 |
shiftProcess := |
|
4661 |
[ |
|
4662 |
[ |
|
1656 | 4663 |
imageEditView image |
4664 |
colorMap:originalColormap copy; |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4665 |
bits:originalPixels copy; |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4666 |
release; |
1656 | 4667 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
1652 | 4668 |
self updateImage. |
4669 |
self updateInfoLabel. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4670 |
self updateImagePreView. |
1652 | 4671 |
] ensure:[ shiftProcess := nil ]. |
4672 |
] forkAt:7. |
|
1649 | 4673 |
]. |
4674 |
||
4675 |
bindings := IdentityDictionary new. |
|
1650 | 4676 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
1656 | 4677 |
hueShift onChangeEvaluate:shiftAction. |
1650 | 4678 |
|
4679 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
1656 | 4680 |
lightValue onChangeEvaluate:shiftAction. |
1650 | 4681 |
|
4682 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
1656 | 4683 |
saturationValue onChangeEvaluate:shiftAction. |
1650 | 4684 |
|
1649 | 4685 |
bindings at:#acceptChannel put:acceptChannel. |
1652 | 4686 |
bindings at:#hlsColor put:avgColorHolder. |
2438 | 4687 |
bindings at:#previewImageHolder put:previewImageHolder. |
1650 | 4688 |
|
4689 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
1649 | 4690 |
ifFalse:[ |
2438 | 4691 |
anyChange ifTrue:[ |
1649 | 4692 |
imageEditView undo |
4693 |
] |
|
4694 |
]. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4695 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4696 |
(p := shiftProcess) notNil ifTrue:[ |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4697 |
p waitUntilTerminated. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4698 |
]. |
2438 | 4699 |
|
4700 |
anyChange ifTrue:[ |
|
4701 |
self updateImage. |
|
4702 |
self updateImagePreView. |
|
4703 |
]. |
|
1649 | 4704 |
! |
4705 |
||
2652 | 4706 |
clearColormapEntry0AndMaskedPixels |
4707 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
4708 |
0 and then clear all masked pixels (to pixelValue 0). |
|
4709 |
This is required for windows icons to be really transparent" |
|
4710 |
||
4711 |
|index colorMap| |
|
4712 |
||
4713 |
self compressColorMap. |
|
4714 |
colorMap := self image colorMap. |
|
4715 |
(colorMap includes:(Color black)) ifFalse:[ |
|
4716 |
self addColorToColormap:(Color black). |
|
4717 |
colorMap := self image colorMap. |
|
4718 |
]. |
|
4719 |
index := colorMap indexOf:(Color black). |
|
4720 |
index == 1 ifFalse:[ |
|
4721 |
self sortColorMap. |
|
4722 |
colorMap := self image colorMap. |
|
4723 |
]. |
|
4724 |
self clearMaskedPixels |
|
4725 |
! |
|
4726 |
||
1403 | 4727 |
clearMaskedPixels |
4728 |
"clear all masked pixels (to pixelValue 0)" |
|
4729 |
||
2652 | 4730 |
|newImage| |
4731 |
||
4732 |
newImage := self image clearMaskedPixels. |
|
4733 |
0 to:newImage height - 1 do:[:y | |
|
4734 |
0 to:newImage width - 1 do:[:x | |
|
4735 |
(newImage maskAtX:x y:y) == 0 ifTrue:[ |
|
4736 |
newImage pixelAtX:x y:y put:0 |
|
1460 | 4737 |
] |
1403 | 4738 |
] |
2652 | 4739 |
]. |
4740 |
||
4741 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
4742 |
self fetchImageData. |
|
1403 | 4743 |
] |
4744 |
! |
|
4745 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4746 |
colorMapChanged |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4747 |
|img| |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4748 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4749 |
img := self image. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4750 |
img release. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4751 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4752 |
self imageEditView invalidate. |
960 | 4753 |
self imagePreView invalidate. |
4754 |
||
4755 |
"/ (imageEditView image:img) notNil ifTrue:[ |
|
4756 |
"/ self updateLabelsAndHistory. |
|
4757 |
"/ self imagePreView image:img |
|
4758 |
"/ ] |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4759 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4760 |
"Created: / 7.8.1998 / 22:26:10 / cg" |
960 | 4761 |
"Modified: / 18.8.1998 / 17:08:55 / cg" |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4762 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4763 |
|
975 | 4764 |
colorMapMode:aMode |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4765 |
"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
|
4766 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4767 |
|depth numColors newColorMap newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4768 |
oldImage image newColors realColorMap oldFileName |
1008 | 4769 |
usedColors useNearest usageCounts tmpBits tmpMap quest |
4770 |
prevMode maskThreshold maskImage| |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4771 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4772 |
self withExecuteCursorDo:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4773 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4774 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4775 |
prevMode := colorMapMode value. |
1008 | 4776 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4777 |
newColorMap := self class listOfColorMaps at:aMode. |
2572 | 4778 |
aMode == #depth32 ifTrue:[ |
4779 |
depth := 32. |
|
4780 |
] ifFalse:[ |
|
4781 |
depth := (newColorMap size log:2) asInteger. |
|
4782 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4783 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4784 |
useNearest := false. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4785 |
depth == 1 ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4786 |
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
|
4787 |
] ifFalse:[ |
1008 | 4788 |
prevMode isNil ifTrue:[ |
4789 |
quest := 'Compute colormap (or use standard)' |
|
4790 |
] ifFalse:[ |
|
4791 |
quest := 'Keep colormap (or use standard)' |
|
4792 |
] |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4793 |
]. |
1008 | 4794 |
((prevMode = aMode) |
1057 | 4795 |
or:[depth > oldImage depth |
4796 |
or:[self confirm:(resources string:quest)]]) ifTrue:[ |
|
1937 | 4797 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 4798 |
|
4799 |
"/ keep the colormap |
|
4800 |
newColorMap atAllPut:Color black. |
|
4801 |
depth > oldImage depth ifTrue:[ |
|
4802 |
"/ easy - simply copy the part |
|
4803 |
numColors := 1 bitShift:oldImage depth. |
|
4804 |
0 to:numColors-1 do:[:pixel | |
|
4805 |
newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel) |
|
1008 | 4806 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4807 |
] ifFalse:[ |
1935 | 4808 |
"/ see if all used color fit the new colormap |
4809 |
usedColors := oldImage usedColorsMax:(1 bitShift:depth). |
|
4810 |
(usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[ |
|
4811 |
usedColors := oldImage realUsedColors |
|
4812 |
]. |
|
4813 |
(usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[ |
|
4814 |
"/ yea - just install them |
|
4815 |
usedColors asArray keysAndValuesDo:[:idx :clr | |
|
4816 |
newColorMap at:idx put:clr |
|
4817 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4818 |
] ifFalse:[ |
1935 | 4819 |
"/ copy over those that are most often used. |
4820 |
oldImage depth < 8 ifTrue:[ |
|
4821 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
4822 |
oldImage bits |
|
4823 |
expandPixels:(oldImage depth) |
|
4824 |
width:oldImage width |
|
4825 |
height:oldImage height |
|
4826 |
into:tmpBits |
|
4827 |
mapping:nil. |
|
986 | 4828 |
] ifFalse:[ |
1935 | 4829 |
oldImage depth == 8 ifTrue:[ |
4830 |
tmpBits := oldImage bits |
|
4831 |
] ifFalse:[ |
|
4832 |
colorMapMode value:prevMode. |
|
4833 |
self findColorMapMode. |
|
4834 |
self warn:('Too many used colors in image (', oldImage usedColors size printString , ').'). |
|
4835 |
^ self |
|
4836 |
"/ (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs)) |
|
4837 |
"/ ifFalse:[. |
|
4838 |
"/ ^ self |
|
4839 |
"/ ]. |
|
4840 |
"/ self image: (Image newForDepth:depth) fromImage:oldImage. |
|
4841 |
"/ ^ self. |
|
4842 |
] |
|
4843 |
]. |
|
4844 |
usageCounts := tmpBits usageCounts. |
|
4845 |
tmpMap := Array new:usageCounts size. |
|
4846 |
oldImage colorMap asArray keysAndValuesDo:[:i :clr | |
|
4847 |
tmpMap at:i put:clr |
|
4848 |
]. |
|
4849 |
usageCounts sort:[:a :b | a > b] with:tmpMap. |
|
4850 |
||
4851 |
1 to:(1 bitShift:depth) do:[:idx | |
|
4852 |
newColorMap at:idx put:(tmpMap at:idx) |
|
4853 |
]. |
|
4854 |
||
4855 |
useNearest := Dialog |
|
4856 |
confirmWithCancel:(resources |
|
4857 |
stringWithCRs:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?' |
|
4858 |
with:usedColors size |
|
4859 |
with:(1 bitShift:depth)) |
|
4860 |
labels:(resources array:#('Cancel' 'First' 'Nearest')). |
|
4861 |
useNearest isNil ifTrue:[ |
|
1124 | 4862 |
colorMapMode value:prevMode. |
1935 | 4863 |
^ self "/ cancel |
4864 |
]. |
|
4865 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4866 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4867 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4868 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4869 |
"/ standard colormap |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4870 |
usedColors := oldImage usedColors. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4871 |
(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
|
4872 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4873 |
confirmWithCancel:(resources |
1916 | 4874 |
stringWithCRs:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?' |
4875 |
) |
|
1542 | 4876 |
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
|
4877 |
useNearest isNil ifTrue:[ |
1542 | 4878 |
colorMapMode value:prevMode. |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4879 |
^ self "/ cancel |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4880 |
]. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
4881 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4882 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4883 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4884 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4885 |
|
2260 | 4886 |
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
|
4887 |
newImage depth:depth. |
2260 | 4888 |
newImage photometric:oldImage photometric. |
4889 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4890 |
oldFileName := oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4891 |
|
1008 | 4892 |
Image imageErrorSignal handle:[:ex| |
4893 |
Color colorErrorSignal handle:[:ex| |
|
1542 | 4894 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4895 |
imageEditView undo. |
1008 | 4896 |
^ self warn:(resources string:'Conversion failed !!') |
4897 |
] do:[ |
|
1393 | 4898 |
newImage := Image newForDepth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4899 |
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
|
4900 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4901 |
newImage photometric:#palette. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4902 |
newImage bits:(ByteArray new:(newImage bytesPerRow * newImage height)). |
2260 | 4903 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4904 |
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
|
4905 |
[:x :y :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4906 |
|newColor| |
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 |
(newColorMap includes:clr) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4909 |
ifTrue: [newColor := clr] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4910 |
ifFalse: [ |
1008 | 4911 |
newColor := clr nearestIn:newColorMap. |
4912 |
useNearest ifFalse:[ |
|
4913 |
(newColor deltaFrom:clr) > 0.5 ifTrue:[ |
|
4914 |
newColor := oldImage colorFromValue:0 |
|
4915 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4916 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4917 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4918 |
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
|
4919 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4920 |
image := newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4921 |
]. |
1008 | 4922 |
] do:[ |
2260 | 4923 |
image := newImage fromImage:oldImage. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4924 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4925 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4926 |
(aMode asString startsWith:'mask') ifTrue:[ |
1008 | 4927 |
image mask isNil ifTrue:[ |
1949 | 4928 |
false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
1008 | 4929 |
maskThreshold := 0.1. |
4930 |
maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
|
4931 |
] ifFalse:[ |
|
4932 |
maskImage := Depth1Image extent:image extent. |
|
1770 | 4933 |
maskImage bits:(ByteArray |
1008 | 4934 |
new:(maskImage bytesPerRow * maskImage height) |
4935 |
withAll:16rFF). |
|
4936 |
||
4937 |
"/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
|
4938 |
]. |
|
4939 |
image mask:maskImage. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4940 |
]. |
1008 | 4941 |
] ifFalse:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4942 |
image mask: nil. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4943 |
]. |
1935 | 4944 |
|
1937 | 4945 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 4946 |
realColorMap := OrderedCollection new. |
4947 |
image realColorMap do:[:clr| |
|
4948 |
(realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
|
4949 |
]. |
|
4950 |
newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
|
4951 |
newColorMap do:[:clr| |
|
4952 |
((newColors size < newColorMap size) and: [(newColors includes: clr) not]) |
|
4953 |
ifTrue:[ |
|
4954 |
newColors add: clr |
|
4955 |
] |
|
4956 |
]. |
|
4957 |
image colorMap: newColors. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4958 |
]. |
1446 | 4959 |
image fileName: oldFileName. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4960 |
|
1054 | 4961 |
(imageEditView image: image) notNil ifTrue:[ |
1446 | 4962 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4963 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4964 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4965 |
|
2174 | 4966 |
"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
|
4967 |
! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4968 |
|
2192 | 4969 |
colorize |
4970 |
"interactive Hue editing" |
|
4971 |
||
4972 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
4973 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
|
4974 |
originalPixels p| |
|
4975 |
||
4976 |
"/ compute the averageColor in the background (while asking user) |
|
4977 |
readySema := Semaphore new. |
|
4978 |
[ |
|
4979 |
|image| |
|
4980 |
||
4981 |
image := imageEditView image. |
|
4982 |
originalColormap := image colorMap copy. |
|
4983 |
avgColor := image averageColor. |
|
4984 |
originalPixels := image bits. |
|
4985 |
readySema signal. |
|
4986 |
] forkAt:7. |
|
4987 |
||
4988 |
acceptChannel := TriggerValue new. |
|
4989 |
avgColorHolder := avgColor asValue. |
|
4990 |
||
4991 |
firstChange := true. |
|
4992 |
||
4993 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
|
4994 |
Color |
|
4995 |
hue:((clr hue) ? 0 + hShift) |
|
4996 |
light:((clr light * lFactor / 100) "min:100") |
|
4997 |
saturation:(((clr saturation max:20) * sFactor / 100) "min:100")]. |
|
4998 |
||
4999 |
||
5000 |
shiftAction := |
|
5001 |
[ |
|
5002 |
|hShift lFactor sFactor| |
|
5003 |
||
5004 |
acceptChannel value:true. |
|
5005 |
||
5006 |
firstChange ifTrue:[ |
|
5007 |
imageEditView makeUndo. |
|
5008 |
firstChange := false. |
|
5009 |
]. |
|
5010 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
|
5011 |
||
5012 |
hShift := hueShift value. |
|
5013 |
lFactor := lightValue value. |
|
5014 |
sFactor := saturationValue value. |
|
5015 |
||
5016 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
|
5017 |
||
5018 |
shiftProcess notNil ifTrue:[ |
|
5019 |
shiftProcess terminate. |
|
5020 |
shiftProcess waitUntilTerminated. |
|
5021 |
shiftProcess := nil. |
|
5022 |
]. |
|
5023 |
shiftProcess := |
|
5024 |
[ |
|
5025 |
[ |
|
5026 |
imageEditView image |
|
5027 |
colorMap:originalColormap copy; |
|
5028 |
bits:originalPixels copy; |
|
5029 |
release; |
|
5030 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
5031 |
self updateImage. |
|
5032 |
self updateInfoLabel. |
|
5033 |
self updateImagePreView. |
|
5034 |
] ensure:[ shiftProcess := nil ]. |
|
5035 |
] forkAt:7. |
|
5036 |
]. |
|
5037 |
||
5038 |
bindings := IdentityDictionary new. |
|
5039 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
|
5040 |
hueShift onChangeEvaluate:shiftAction. |
|
5041 |
||
5042 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
5043 |
lightValue onChangeEvaluate:shiftAction. |
|
5044 |
||
5045 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
5046 |
saturationValue onChangeEvaluate:shiftAction. |
|
5047 |
||
5048 |
bindings at:#acceptChannel put:acceptChannel. |
|
5049 |
bindings at:#hlsColor put:avgColorHolder. |
|
5050 |
||
5051 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
5052 |
ifFalse:[ |
|
5053 |
firstChange ~~ true ifTrue:[ |
|
5054 |
imageEditView undo |
|
5055 |
] |
|
5056 |
]. |
|
5057 |
||
5058 |
(p := shiftProcess) notNil ifTrue:[ |
|
5059 |
p waitUntilTerminated. |
|
5060 |
]. |
|
5061 |
self updateImage. |
|
5062 |
self updateImagePreView. |
|
5063 |
||
5064 |
"Created: / 01-11-2007 / 23:27:37 / cg" |
|
5065 |
! |
|
5066 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5067 |
compressColorMap |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5068 |
"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
|
5069 |
|
927 | 5070 |
|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
|
5071 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5072 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5073 |
depth := oldImage depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5074 |
|
1403 | 5075 |
usedColors := oldImage realUsedColors. |
2652 | 5076 |
|
5077 |
"/ translation table |
|
5078 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
5079 |
newColorMap := usedColors asArray. |
|
5080 |
newColorMap sort:self sortBlockForColors. |
|
2718 | 5081 |
oldImage colorMap notNil ifTrue:[ |
5082 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
5083 |
|newPixel| |
|
5084 |
||
5085 |
(usedColors includes:clr) ifTrue:[ |
|
5086 |
newPixel := newColorMap indexOf:clr. |
|
5087 |
oldToNew at:oldIdx put:newPixel-1. |
|
5088 |
] |
|
5089 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5090 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5091 |
|
2652 | 5092 |
oldBits := oldImage bits. |
5093 |
newBits := ByteArray new:(oldBits size). |
|
5094 |
depth ~~ 8 ifTrue:[ |
|
5095 |
"/ expand/compress can only handle 8bits |
|
5096 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
5097 |
oldBits |
|
5098 |
expandPixels:depth |
|
5099 |
width:oldImage width |
|
5100 |
height:oldImage height |
|
5101 |
into:tmpBits |
|
5102 |
mapping:oldToNew. |
|
5103 |
tmpBits |
|
5104 |
compressPixels:depth |
|
5105 |
width:oldImage width |
|
5106 |
height:oldImage height |
|
5107 |
into:newBits |
|
5108 |
mapping:nil |
|
5109 |
] ifFalse:[ |
|
5110 |
oldBits |
|
5111 |
expandPixels:depth |
|
5112 |
width:oldImage width |
|
5113 |
height:oldImage height |
|
5114 |
into:newBits |
|
5115 |
mapping:oldToNew. |
|
5116 |
]. |
|
5117 |
||
5118 |
newImage := oldImage species new |
|
5119 |
width:oldImage width |
|
5120 |
height:oldImage height |
|
5121 |
depth:depth |
|
5122 |
fromArray:newBits. |
|
5123 |
||
5124 |
newImage colorMap:newColorMap. |
|
5125 |
newImage fileName:oldImage fileName. |
|
5126 |
newImage mask:(oldImage mask copy). |
|
5127 |
||
5128 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5129 |
self fetchImageData. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5130 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5131 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5132 |
"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
|
5133 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
1008 | 5134 |
! |
5135 |
||
1852 | 5136 |
copyColorFromColormap |
1871 | 5137 |
imageEditView setClipboardObject:(self selectedColorOrNil) |
1852 | 5138 |
! |
5139 |
||
2054 | 5140 |
ditherToDepth |
5141 |
|depth| |
|
5142 |
||
5143 |
depth := Dialog request:'New depth ?'. |
|
5144 |
depth isEmptyOrNil ifTrue:[^ self]. |
|
5145 |
depth := Number readFrom:depth onError:nil. |
|
5146 |
depth isNil ifTrue:[^ self]. |
|
5147 |
||
5148 |
self ditherToDepth:depth |
|
5149 |
||
5150 |
"Created: / 07-07-2006 / 13:22:10 / cg" |
|
5151 |
! |
|
5152 |
||
5153 |
ditherToDepth:depth |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5154 |
|ditherColors newImage useStandardColors nGrey greyColorsAlready additionalGreyColors moreColors d| |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5155 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5156 |
useStandardColors := true. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5157 |
"/ 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
|
5158 |
"/ useStandardColors isNil ifTrue:[^ self]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5159 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5160 |
useStandardColors ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5161 |
depth = 1 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5162 |
ditherColors := Array with:(Color black) with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5163 |
] ifFalse:[ depth = 2 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5164 |
ditherColors := Array |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5165 |
with:(Color black) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5166 |
with:(Color darkGrey) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5167 |
with:(Color lightGrey) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5168 |
with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5169 |
] ifFalse:[ depth = 3 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5170 |
ditherColors := Color colorCubeWithRed:2 green:2 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5171 |
] ifFalse:[ depth = 4 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5172 |
ditherColors := Color vgaColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5173 |
] ifFalse:[ depth = 5 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5174 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5175 |
] ifFalse:[ depth = 6 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5176 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:3. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5177 |
] ifFalse:[ depth <= 8 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5178 |
ditherColors := Color colorCubeWithRed:6 green:6 blue:5. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5179 |
] ifFalse:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5180 |
self error:'unsupported depth'. |
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 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5183 |
nGrey := (2 raisedTo:depth) - ditherColors size. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5184 |
nGrey > 0 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5185 |
nGrey := nGrey min:128. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5186 |
greyColorsAlready := ditherColors select:[:clr | clr isGreyColor]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5187 |
d := 1 / nGrey. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5188 |
moreColors := (1 to:nGrey-1) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5189 |
collect:[:i | Color brightness:(d * i)] |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5190 |
thenReject:[:clr | greyColorsAlready includes:clr ]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5191 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5192 |
ditherColors := ditherColors , moreColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5193 |
]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5194 |
] ifFalse:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5195 |
self halt. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5196 |
]. |
2054 | 5197 |
|
5198 |
self withExecuteCursorDo:[ |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5199 |
"/ newImage := self image asDitheredImageUsing:ditherColors depth:depth. |
2054 | 5200 |
newImage := self image asDitheredImageUsing:ditherColors depth:8. |
5201 |
||
5202 |
imageEditView makeUndo. |
|
5203 |
imageEditView image:newImage. |
|
5204 |
imageEditView setModified. |
|
5205 |
self updateImage. |
|
5206 |
self updateImagePreView. |
|
5207 |
||
5208 |
self fetchImageData. |
|
5209 |
]. |
|
5210 |
||
5211 |
"Created: / 07-07-2006 / 13:20:56 / cg" |
|
2073 | 5212 |
"Modified: / 05-09-2006 / 16:13:25 / cg" |
2054 | 5213 |
! |
5214 |
||
2174 | 5215 |
doubleClickOnColor:aColorIndex |
5216 |
self editSelectedColor. |
|
5217 |
||
5218 |
"Created: / 22-07-2007 / 13:14:37 / cg" |
|
5219 |
! |
|
5220 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5221 |
editSelectedColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5222 |
self processSelectedColorWith:[:clr | |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5223 |
|editor| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5224 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5225 |
editor := ColorEditDialog new. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5226 |
editor color:clr. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5227 |
editor open. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5228 |
editor accepted ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5229 |
AbortOperationRequest raise. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5230 |
]. |
2575
43e98f6d71d2
ColorEditDialog was grazy - adapted to changed protocol
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
5231 |
editor colorNameOrColor |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5232 |
] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5233 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5234 |
|
1446 | 5235 |
fetchImageData |
1460 | 5236 |
|image| |
5237 |
||
5238 |
(image := imageEditView image) notNil ifTrue:[ |
|
5239 |
self findColorMapMode. |
|
5240 |
self updateLabelsAndHistory. |
|
5241 |
] |
|
1446 | 5242 |
! |
5243 |
||
1544 | 5244 |
inspectColor |
2573 | 5245 |
|clrIndex clr| |
5246 |
||
5247 |
self hasColormap ifFalse:[ |
|
5248 |
clr := self selectedColorOrNil |
|
5249 |
] ifTrue:[ |
|
5250 |
clrIndex := self selectedColorIndexOrNil. |
|
5251 |
clrIndex isNil ifTrue:[ |
|
5252 |
^ self |
|
5253 |
]. |
|
5254 |
clr := self image colorFromValue:clrIndex-1 |
|
1544 | 5255 |
]. |
2573 | 5256 |
clr inspect |
1544 | 5257 |
! |
5258 |
||
2651 | 5259 |
inspectColormap |
5260 |
self hasColormap ifTrue:[ |
|
5261 |
self image colorMap inspect |
|
5262 |
]. |
|
5263 |
! |
|
5264 |
||
1598 | 5265 |
makeBrighter |
5266 |
| anyChange| |
|
5267 |
||
5268 |
self withExecuteCursorDo:[ |
|
5269 |
anyChange := imageEditView makeBrighter. |
|
5270 |
anyChange ifFalse:[ |
|
5271 |
Dialog warn:'Image unchanged'. |
|
5272 |
] ifTrue:[ |
|
5273 |
self updateImage. |
|
5274 |
] |
|
5275 |
]. |
|
5276 |
! |
|
5277 |
||
5278 |
makeDarker |
|
5279 |
| anyChange| |
|
5280 |
||
5281 |
self withExecuteCursorDo:[ |
|
5282 |
anyChange := imageEditView makeDarker. |
|
5283 |
anyChange ifFalse:[ |
|
5284 |
Dialog warn:'Image unchanged'. |
|
5285 |
] ifTrue:[ |
|
5286 |
self updateImage. |
|
5287 |
] |
|
5288 |
]. |
|
5289 |
! |
|
5290 |
||
1926 | 5291 |
makeGrayScaleImage |
1598 | 5292 |
|anyChange| |
1436 | 5293 |
|
5294 |
self withExecuteCursorDo:[ |
|
1926 | 5295 |
anyChange := imageEditView makeGrayScaleImage. |
1436 | 5296 |
anyChange ifFalse:[ |
5297 |
Dialog warn:'Image unchanged'. |
|
5298 |
] ifTrue:[ |
|
1598 | 5299 |
self updateImage. |
5300 |
] |
|
5301 |
]. |
|
5302 |
! |
|
5303 |
||
5304 |
makeInverse |
|
5305 |
| anyChange| |
|
5306 |
||
5307 |
self withExecuteCursorDo:[ |
|
5308 |
anyChange := imageEditView makeInverse. |
|
5309 |
anyChange ifFalse:[ |
|
5310 |
Dialog warn:'Image unchanged'. |
|
5311 |
] ifTrue:[ |
|
5312 |
self updateImage. |
|
1436 | 5313 |
] |
5314 |
]. |
|
5315 |
! |
|
5316 |
||
1446 | 5317 |
makeSelectedColorBrighter |
1682 | 5318 |
self processSelectedColorWith:[:clr | clr lightened] |
1446 | 5319 |
! |
5320 |
||
5321 |
makeSelectedColorDarker |
|
1682 | 5322 |
self processSelectedColorWith:[:clr | clr darkened] |
1446 | 5323 |
! |
5324 |
||
1884 | 5325 |
makeSelectedColorGray |
5326 |
self processSelectedColorWith:[:clr | Color brightness:(clr brightness)] |
|
5327 |
! |
|
5328 |
||
2826 | 5329 |
makeSlightlyBrighter |
5330 |
| anyChange| |
|
5331 |
||
5332 |
self withExecuteCursorDo:[ |
|
5333 |
anyChange := imageEditView makeSlightlyBrighter. |
|
5334 |
anyChange ifFalse:[ |
|
5335 |
Dialog warn:'Image unchanged'. |
|
5336 |
] ifTrue:[ |
|
5337 |
self updateImage. |
|
5338 |
] |
|
5339 |
]. |
|
5340 |
||
5341 |
"Created: / 24-11-2010 / 11:06:11 / cg" |
|
5342 |
! |
|
5343 |
||
5344 |
makeSlightlyDarker |
|
5345 |
| anyChange| |
|
5346 |
||
5347 |
self withExecuteCursorDo:[ |
|
5348 |
anyChange := imageEditView makeSlightlyDarker. |
|
5349 |
anyChange ifFalse:[ |
|
5350 |
Dialog warn:'Image unchanged'. |
|
5351 |
] ifTrue:[ |
|
5352 |
self updateImage. |
|
5353 |
] |
|
5354 |
]. |
|
5355 |
||
5356 |
"Created: / 24-11-2010 / 11:06:23 / cg" |
|
5357 |
! |
|
5358 |
||
2652 | 5359 |
menu_clearColormapEntry0AndMaskedPixels |
5360 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
5361 |
0 and then clear all masked pixels (to pixelValue 0)" |
|
5362 |
||
5363 |
imageEditView makeUndo. |
|
5364 |
self withExecuteCursorDo:[ |
|
5365 |
self clearColormapEntry0AndMaskedPixels |
|
5366 |
] |
|
5367 |
! |
|
5368 |
||
5369 |
menu_clearMaskedPixels |
|
5370 |
"clear all masked pixels (to pixelValue 0)" |
|
5371 |
||
5372 |
imageEditView makeUndo. |
|
5373 |
||
5374 |
self withExecuteCursorDo:[ |
|
5375 |
self clearMaskedPixels |
|
5376 |
] |
|
5377 |
! |
|
5378 |
||
5379 |
menu_compressColorMap |
|
5380 |
"calculates a new color map for the image, using only used colors" |
|
5381 |
||
5382 |
|depth oldImage usedColors| |
|
5383 |
||
5384 |
oldImage := self image. |
|
5385 |
depth := oldImage depth. |
|
5386 |
||
5387 |
oldImage photometric ~~ #palette ifTrue:[ |
|
5388 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
1852 | 5389 |
^ self |
5390 |
]. |
|
2652 | 5391 |
usedColors := oldImage realUsedColors. |
5392 |
usedColors size == (1 bitShift:depth) ifTrue:[ |
|
5393 |
self information:'Compress colorMap: All colors are used - no compression.'. |
|
5394 |
^ self |
|
5395 |
]. |
|
5396 |
usedColors size == oldImage colorMap size ifTrue:[ |
|
5397 |
self information:'Compress colorMap: Colormap already compressed - no compression.'. |
|
5398 |
^ self |
|
5399 |
]. |
|
5400 |
||
5401 |
imageEditView makeUndo. |
|
5402 |
||
5403 |
self withExecuteCursorDo:[ |
|
5404 |
self compressColorMap |
|
1852 | 5405 |
] |
5406 |
! |
|
5407 |
||
2652 | 5408 |
menu_copyMask |
5409 |
|mask| |
|
5410 |
||
5411 |
mask := self image mask. |
|
5412 |
MaskClipboard := mask subImageIn: (0@0 extent:mask extent). |
|
5413 |
! |
|
5414 |
||
5415 |
menu_pasteMask |
|
1480 | 5416 |
|img mask| |
5417 |
||
5418 |
imageEditView makeUndo. |
|
5419 |
||
5420 |
img := self image. |
|
5421 |
mask := img mask. |
|
5422 |
||
5423 |
mask |
|
5424 |
copyFrom:MaskClipboard |
|
5425 |
x:0 y:0 |
|
5426 |
toX:0 y:0 |
|
5427 |
width:(mask width min:MaskClipboard width) |
|
5428 |
height:(mask height min:MaskClipboard height). |
|
5429 |
img mask:mask. |
|
5430 |
(imageEditView image:img copy) notNil ifTrue:[ |
|
5431 |
self fetchImageData. |
|
5432 |
] |
|
5433 |
! |
|
5434 |
||
2652 | 5435 |
menu_sortColorMap |
5436 |
"calculates a new color map for the image, sorting colors" |
|
5437 |
||
5438 |
self menu_sortColorMapWith:self sortBlockForColors |
|
5439 |
! |
|
5440 |
||
5441 |
menu_sortColorMapWith:sortBlock |
|
5442 |
"calculates a new color map for the image, sorting colors" |
|
5443 |
||
5444 |
self image photometric ~~ #palette ifTrue:[ |
|
5445 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
5446 |
^ self |
|
5447 |
]. |
|
5448 |
||
5449 |
imageEditView makeUndo. |
|
5450 |
||
5451 |
self withExecuteCursorDo:[ |
|
5452 |
self sortColorMapWith:sortBlock |
|
5453 |
] |
|
5454 |
||
5455 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
5456 |
"Created: / 30.9.1998 / 23:51:23 / cg" |
|
5457 |
! |
|
5458 |
||
5459 |
pasteColorIntoColormap |
|
5460 |
|copyBufferColor| |
|
5461 |
||
5462 |
copyBufferColor := imageEditView getClipboardObject. |
|
5463 |
copyBufferColor isColor ifFalse:[ |
|
5464 |
UserPreferences current beepInEditor ifTrue:[ |
|
5465 |
self window beep. |
|
5466 |
]. |
|
5467 |
^ self |
|
5468 |
]. |
|
5469 |
||
5470 |
self processSelectedColorWith:[:clr | |
|
5471 |
copyBufferColor |
|
5472 |
] |
|
5473 |
! |
|
5474 |
||
1682 | 5475 |
pickAndAddColorToColormap |
5476 |
self addColorToColormap:(Color fromUser) |
|
5477 |
! |
|
5478 |
||
1933 | 5479 |
pickAndPasteColor |
5480 |
self pickColor. |
|
5481 |
self pasteColorIntoColormap. |
|
5482 |
! |
|
5483 |
||
1852 | 5484 |
pickColor |
1871 | 5485 |
imageEditView setClipboardObject:(Color fromUser) |
1852 | 5486 |
! |
5487 |
||
1682 | 5488 |
processSelectedColorWith:aBlock |
1852 | 5489 |
"undoable color processing: the selected color will be replaced by the |
5490 |
value of aBlock" |
|
5491 |
||
5492 |
|img cMap modifiedColormap oldColor newImage selectedColorIndex oldSelection newColor| |
|
1682 | 5493 |
|
5494 |
selectedColorIndex := self selectedColorIndexOrNil. |
|
5495 |
selectedColorIndex isNil ifTrue:[^ self]. |
|
5496 |
||
5497 |
img := self image. |
|
5498 |
cMap := img colorMap. |
|
5499 |
cMap isNil ifTrue:[ |
|
1916 | 5500 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1682 | 5501 |
^ self |
5502 |
]. |
|
1852 | 5503 |
|
5504 |
oldColor := cMap at:selectedColorIndex. |
|
1682 | 5505 |
imageEditView makeUndo. |
5506 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5507 |
modifiedColormap := cMap asArray copy. |
1852 | 5508 |
|
5509 |
newColor := aBlock value:oldColor. |
|
1859 | 5510 |
modifiedColormap at:selectedColorIndex put:newColor. |
1682 | 5511 |
|
5512 |
newImage := img species new |
|
5513 |
width:img width |
|
5514 |
height:img height |
|
1843 | 5515 |
depth:img depth |
1682 | 5516 |
fromArray:img bits. |
5517 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5518 |
newImage colorMap:modifiedColormap. |
1682 | 5519 |
newImage fileName:img fileName. |
5520 |
newImage mask:(img mask copy). |
|
5521 |
||
5522 |
oldSelection := self selectionOfColor value. |
|
5523 |
||
5524 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5525 |
self fetchImageData. |
|
5526 |
]. |
|
5527 |
self selectionOfColor value:oldSelection. |
|
5528 |
||
5529 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
|
5530 |
"Modified: / 16.3.1999 / 21:57:26 / cg" |
|
5531 |
! |
|
5532 |
||
1124 | 5533 |
reduceNumberOfColors |
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5534 |
|s n anyChange img usedColors| |
1124 | 5535 |
|
2817 | 5536 |
s := Dialog request:'Number of color bits to strip (1-7) ?' initialAnswer:3. |
1435 | 5537 |
s size == 0 ifTrue:[^ self]. |
1934 | 5538 |
|
1124 | 5539 |
n := Integer readFrom:s onError:0. |
5540 |
(n between:1 and:7) ifFalse:[ |
|
5541 |
Dialog warn:'Image unchanged'. |
|
5542 |
^ self |
|
5543 |
]. |
|
5544 |
||
5545 |
self withExecuteCursorDo:[ |
|
5546 |
anyChange := imageEditView reduceColorResolutionBy:n. |
|
5547 |
anyChange ifFalse:[ |
|
5548 |
Dialog warn:'Image unchanged'. |
|
5549 |
] ifTrue:[ |
|
5550 |
img := imageEditView image. |
|
5551 |
imageEditView image:img. |
|
1446 | 5552 |
|
5553 |
self fetchImageData. |
|
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5554 |
usedColors := img usedColorsMax:10000. |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5555 |
usedColors size == 10000 ifTrue:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5556 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5557 |
] ifFalse:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5558 |
Dialog information:(usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
5559 |
] |
1124 | 5560 |
] |
5561 |
]. |
|
2817 | 5562 |
|
5563 |
"Modified: / 29-10-2010 / 18:08:01 / cg" |
|
1124 | 5564 |
! |
5565 |
||
1930 | 5566 |
reduceNumberOfColors2 |
1938 | 5567 |
|s rndR rndG rndB usedColors image newImage| |
5568 |
||
5569 |
s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4. |
|
1934 | 5570 |
s size == 0 ifTrue:[^ self]. |
1938 | 5571 |
rndR := Integer readFrom:s onError:0. |
1939 | 5572 |
|
1938 | 5573 |
s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2. |
5574 |
s size == 0 ifTrue:[^ self]. |
|
5575 |
rndG := Integer readFrom:s onError:0. |
|
1939 | 5576 |
|
1938 | 5577 |
s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10. |
5578 |
s size == 0 ifTrue:[^ self]. |
|
5579 |
rndB := Integer readFrom:s onError:0. |
|
1939 | 5580 |
|
5581 |
((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[ |
|
1930 | 5582 |
Dialog warn:'Image unchanged'. |
5583 |
^ self |
|
5584 |
]. |
|
5585 |
||
5586 |
self withExecuteCursorDo:[ |
|
1934 | 5587 |
image := self image. |
2054 | 5588 |
"/ usedColors := image usedColorsMax:4096. |
1934 | 5589 |
imageEditView makeUndo. |
5590 |
||
5591 |
newImage := image copy. |
|
2260 | 5592 |
newImage photometric == #palette ifTrue:[ |
5593 |
newImage colorMap:(OrderedCollection new). |
|
5594 |
]. |
|
5595 |
||
1934 | 5596 |
image |
5597 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
5598 |
do:[:x :y :clr | |
|
5599 |
|r g b nr ng nb newClr| |
|
5600 |
||
5601 |
r := clr redByte. |
|
5602 |
g := clr greenByte. |
|
5603 |
b := clr blueByte. |
|
1938 | 5604 |
nr := (r roundTo:rndR) min:255. |
5605 |
ng := (g roundTo:rndG) min:255. |
|
5606 |
nb := (b roundTo:rndB) min:255. |
|
1934 | 5607 |
|
5608 |
newClr := Color redByte:nr greenByte:ng blueByte:nb. |
|
2260 | 5609 |
newImage photometric == #palette ifTrue:[ |
5610 |
(newImage colorMap includes:newClr) ifFalse:[ |
|
5611 |
newImage colorMap add:newClr |
|
5612 |
]. |
|
5613 |
]. |
|
1934 | 5614 |
newImage colorAtX:x y:y put:newClr |
5615 |
]. |
|
5616 |
||
5617 |
imageEditView image:newImage. |
|
5618 |
imageEditView setModified. |
|
5619 |
self updateImage. |
|
5620 |
self updateImagePreView. |
|
5621 |
||
5622 |
self fetchImageData. |
|
5623 |
usedColors := newImage usedColorsMax:10000. |
|
5624 |
usedColors size == 10000 ifTrue:[ |
|
5625 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
|
5626 |
] ifFalse:[ |
|
5627 |
Dialog information:(usedColors size printString , ' colors used.') |
|
5628 |
] |
|
1930 | 5629 |
]. |
2054 | 5630 |
|
5631 |
"Modified: / 07-07-2006 / 13:10:42 / cg" |
|
1930 | 5632 |
! |
5633 |
||
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5634 |
selectColor:aColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5635 |
|idx img cMap| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5636 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5637 |
aColor isNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5638 |
idx := nil. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5639 |
] ifFalse:[ |
2791 | 5640 |
img := self image. |
5641 |
img notNil ifTrue: [ |
|
5642 |
aColor == Color noColor ifTrue:[ |
|
5643 |
(img mask notNil) ifTrue:[ |
|
5644 |
idx := 1. |
|
5645 |
] |
|
5646 |
] ifFalse:[ |
|
2447 | 5647 |
(cMap := self listOfColors) notNil ifTrue:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5648 |
idx := cMap indexOf:aColor ifAbsent:nil. |
2447 | 5649 |
]. |
5650 |
idx isNil ifTrue:[ |
|
5651 |
"/ should not happen... |
|
5652 |
(cMap := img colorMap) notNil ifTrue:[ |
|
5653 |
idx := cMap indexOf:aColor ifAbsent:nil. |
|
5654 |
idx notNil ifTrue:[ |
|
5655 |
img mask notNil ifTrue:[ |
|
5656 |
idx := idx + 1. |
|
5657 |
]. |
|
5658 |
] |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5659 |
]. |
2447 | 5660 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5661 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5662 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5663 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5664 |
self selectionOfColor value:idx. |
2790 | 5665 |
|
2791 | 5666 |
"Modified: / 02-07-2010 / 12:06:07 / cg" |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5667 |
! |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
5668 |
|
1682 | 5669 |
selectedColorIndexOrNil |
2651 | 5670 |
|img clrIndex| |
1682 | 5671 |
|
5672 |
img := self image. |
|
5673 |
img isNil ifTrue:[ |
|
2764 | 5674 |
"/ self warn:'No Image.'. |
1682 | 5675 |
^ nil |
5676 |
]. |
|
5677 |
clrIndex := self selectionOfColor value. |
|
1896 | 5678 |
self hasMask "img mask notNil" ifTrue: [ |
2449
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5679 |
(clrIndex isInteger and:[clrIndex > 1]) ifTrue:[ |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5680 |
^ clrIndex - 1 |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5681 |
]. |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
5682 |
^ nil |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5683 |
]. |
1682 | 5684 |
^ clrIndex |
5685 |
! |
|
5686 |
||
1852 | 5687 |
selectedColorOrNil |
2447 | 5688 |
|cmapIndex img cMap colorList| |
1896 | 5689 |
|
5690 |
cmapIndex := self selectedColorIndexOrNil. |
|
1900 | 5691 |
cmapIndex isNil ifTrue:[^ nil]. |
2556 | 5692 |
cmapIndex == 0 ifTrue:[^ nil]. |
1852 | 5693 |
|
5694 |
img := self image. |
|
5695 |
cMap := img colorMap. |
|
5696 |
cMap isNil ifTrue:[ |
|
2447 | 5697 |
"/ self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
5698 |
colorList := self listOfColors. |
|
5699 |
colorList notNil ifTrue:[ |
|
5700 |
^ colorList at:cmapIndex ifAbsent:nil |
|
5701 |
]. |
|
1900 | 5702 |
^ nil |
1852 | 5703 |
]. |
1896 | 5704 |
^ cMap at:cmapIndex. |
1852 | 5705 |
! |
5706 |
||
1008 | 5707 |
sortColorMap |
5708 |
"calculates a new color map for the image, sorting colors" |
|
5709 |
||
2652 | 5710 |
self sortColorMapWith:self sortBlockForColors |
1939 | 5711 |
! |
5712 |
||
5713 |
sortColorMapWith:sortBlock |
|
5714 |
"calculates a new color map for the image, sorting colors" |
|
5715 |
||
1008 | 5716 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| |
5717 |
||
5718 |
oldImage := self image. |
|
5719 |
depth := oldImage depth. |
|
5720 |
||
2652 | 5721 |
usedColors := oldImage realColorMap. |
5722 |
||
5723 |
||
5724 |
"/ translation table |
|
5725 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
5726 |
newColorMap := usedColors asArray. |
|
5727 |
newColorMap sort:sortBlock. |
|
5728 |
||
5729 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
5730 |
|newPixel| |
|
5731 |
||
5732 |
(usedColors includes:clr) ifTrue:[ |
|
5733 |
newPixel := newColorMap indexOf:clr. |
|
5734 |
oldToNew at:oldIdx put:newPixel-1. |
|
5735 |
] |
|
1008 | 5736 |
]. |
5737 |
||
2652 | 5738 |
oldBits := oldImage bits. |
5739 |
newBits := ByteArray new:(oldBits size). |
|
5740 |
depth ~~ 8 ifTrue:[ |
|
5741 |
"/ expand/compress can only handle 8bits |
|
5742 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
5743 |
oldBits |
|
5744 |
expandPixels:depth |
|
5745 |
width:oldImage width |
|
5746 |
height:oldImage height |
|
5747 |
into:tmpBits |
|
5748 |
mapping:oldToNew. |
|
5749 |
tmpBits |
|
5750 |
compressPixels:depth |
|
5751 |
width:oldImage width |
|
5752 |
height:oldImage height |
|
5753 |
into:newBits |
|
5754 |
mapping:nil |
|
5755 |
] ifFalse:[ |
|
5756 |
oldBits |
|
5757 |
expandPixels:depth |
|
5758 |
width:oldImage width |
|
5759 |
height:oldImage height |
|
5760 |
into:newBits |
|
5761 |
mapping:oldToNew. |
|
5762 |
]. |
|
5763 |
||
5764 |
newImage := oldImage species new |
|
5765 |
width:oldImage width |
|
5766 |
height:oldImage height |
|
5767 |
depth:depth |
|
5768 |
fromArray:newBits. |
|
5769 |
||
5770 |
newImage colorMap:newColorMap. |
|
5771 |
newImage fileName:oldImage fileName. |
|
5772 |
newImage mask:(oldImage mask copy). |
|
5773 |
||
5774 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5775 |
self fetchImageData. |
|
1008 | 5776 |
] |
5777 |
||
5778 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
5779 |
"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
|
5780 |
! ! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5781 |
|
1715 | 5782 |
!ImageEditor methodsFor:'user actions-editing'! |
400 | 5783 |
|
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5784 |
do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5785 |
|box dx1 dx2 image| |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5786 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5787 |
image := imageEditView image. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5788 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5789 |
box := EnterBox new. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5790 |
box title:(resources string:'dX1 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5791 |
box okText:(resources string:'OK'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5792 |
box abortText:(resources string:'Cancel'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5793 |
box initialText:'0.1'. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5794 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5795 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5796 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5797 |
and: [(dx1 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5798 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5799 |
box title:(resources string:'dX2 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5800 |
box initialText:(dx1 printString). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5801 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5802 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5803 |
and: [(dx2 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5804 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5805 |
imageEditView threeDProjection:dx1 and:dx2. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5806 |
] |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5807 |
]. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5808 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5809 |
self updateInfoLabel |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5810 |
! |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
5811 |
|
1882 | 5812 |
doBrightenImage |
5813 |
imageEditView brightenImage. |
|
5814 |
self listOfColors removeAll. |
|
5815 |
self findColorMapMode. |
|
2585 | 5816 |
"/ imageEditView removelastUndo |
1882 | 5817 |
! |
5818 |
||
767 | 5819 |
doBrowseClass |
5820 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
400 | 5821 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5822 |
|cls| |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5823 |
|
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
5824 |
cls := imageEditView resourceClass. |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5825 |
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
|
5826 |
|
1488 | 5827 |
UserPreferences systemBrowserClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5828 |
openInClass:cls class |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5829 |
selector:(imageEditView resourceSelector) |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5830 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
5831 |
"Modified: / 31.7.1998 / 02:01:15 / cg" |
400 | 5832 |
! |
5833 |
||
1703 | 5834 |
doCopyImageToClipboard |
5835 |
imageEditView copyImageToClipboard. |
|
5836 |
! |
|
5837 |
||
1045 | 5838 |
doCropAll |
986 | 5839 |
"find all borders and cut them off" |
5840 |
||
1045 | 5841 |
imageEditView cropLeft:true right:true top:true bottom:true. |
986 | 5842 |
self updateInfoLabel |
5843 |
||
5844 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
5845 |
"Created: / 7.9.1998 / 16:33:43 / cg" |
|
5846 |
! |
|
5847 |
||
1045 | 5848 |
doCropBottom |
986 | 5849 |
"find a bottom border and cut it off" |
5850 |
||
1045 | 5851 |
imageEditView cropLeft:false right:false top:false bottom:true. |
986 | 5852 |
self updateInfoLabel |
5853 |
||
5854 |
"Created: / 7.9.1998 / 13:00:20 / cg" |
|
5855 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
5856 |
! |
|
5857 |
||
1045 | 5858 |
doCropLeft |
986 | 5859 |
"find a left border and cut it off" |
5860 |
||
1045 | 5861 |
imageEditView cropLeft:true right:false top:false bottom:false. |
986 | 5862 |
self updateInfoLabel |
5863 |
||
5864 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
5865 |
"Modified: / 7.9.1998 / 14:26:34 / cg" |
|
5866 |
! |
|
5867 |
||
1045 | 5868 |
doCropManual |
986 | 5869 |
"let user specify borders and cut them off" |
5870 |
||
1502 | 5871 |
|bindings left top right bottom img firstChange gropAction acceptChannel| |
5872 |
||
5873 |
acceptChannel := TriggerValue new. |
|
1490 | 5874 |
|
5875 |
firstChange := true. |
|
5876 |
||
1502 | 5877 |
gropAction := |
5878 |
[:lV :rV :tV :bV | |l r t b| |
|
5879 |
acceptChannel value:true. |
|
5880 |
||
5881 |
l := lV value. |
|
5882 |
r := rV value. |
|
5883 |
t := tV value. |
|
5884 |
b := bV value. |
|
5885 |
(l + r + t + b) == 0 ifTrue:[ |
|
2520 | 5886 |
UserPreferences current beepInEditor ifTrue:[ |
5887 |
self window beep |
|
5888 |
] |
|
1502 | 5889 |
] ifFalse:[ |
5890 |
img := imageEditView image. |
|
5891 |
firstChange ifTrue:[ |
|
5892 |
imageEditView makeUndo. |
|
5893 |
firstChange := false. |
|
5894 |
]. |
|
5895 |
imageEditView |
|
5896 |
makeSubImageX:l y:t |
|
5897 |
width:(img width - l - r) |
|
5898 |
height:(img height - t - b). |
|
2546 | 5899 |
|
5900 |
self updateImagePreView. |
|
1502 | 5901 |
self updateInfoLabel |
5902 |
]. |
|
1490 | 5903 |
]. |
986 | 5904 |
|
5905 |
bindings := IdentityDictionary new. |
|
1507 | 5906 |
bindings at:#left put:(left := 1 asValue). |
5907 |
bindings at:#right put:(right := 1 asValue). |
|
5908 |
bindings at:#top put:(top := 1 asValue). |
|
5909 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1502 | 5910 |
bindings at:#acceptChannel put:acceptChannel. |
5911 |
||
5912 |
bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
|
5913 |
bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
|
5914 |
bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
|
5915 |
bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
|
5916 |
||
5917 |
bindings at:#applyAction put:[ gropAction value:left value:right value:top value:bottom ]. |
|
1490 | 5918 |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
5919 |
(self openDialogInterface:#cropDialogSpec withBindings:bindings) |
1507 | 5920 |
ifFalse:[ |
5921 |
firstChange ~~ true ifTrue:[ |
|
1558 | 5922 |
imageEditView undo. |
5923 |
self updateImagePreView. |
|
1507 | 5924 |
] |
5925 |
]. |
|
986 | 5926 |
|
5927 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
5928 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
5929 |
! |
|
5930 |
||
1045 | 5931 |
doCropRight |
986 | 5932 |
"find a right border and cut it off" |
5933 |
||
1045 | 5934 |
imageEditView cropLeft:false right:true top:false bottom:false. |
986 | 5935 |
self updateInfoLabel |
5936 |
||
5937 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
5938 |
"Modified: / 7.9.1998 / 14:26:44 / cg" |
|
5939 |
! |
|
5940 |
||
1045 | 5941 |
doCropTop |
986 | 5942 |
"find a top border and cut it off" |
5943 |
||
1045 | 5944 |
imageEditView cropLeft:false right:false top:true bottom:false. |
986 | 5945 |
self updateInfoLabel |
5946 |
||
5947 |
"Created: / 7.9.1998 / 13:00:19 / cg" |
|
5948 |
"Modified: / 7.9.1998 / 14:26:52 / cg" |
|
5949 |
! |
|
5950 |
||
1882 | 5951 |
doDarkenImage |
5952 |
imageEditView darkenImage. |
|
5953 |
self listOfColors removeAll. |
|
5954 |
self findColorMapMode. |
|
2585 | 5955 |
"/ imageEditView removelastUndo |
1882 | 5956 |
! |
5957 |
||
1433 | 5958 |
doEditMask |
5959 |
self image mask edit |
|
5960 |
! |
|
5961 |
||
767 | 5962 |
doFlipHorizontal |
5963 |
"flips horizontally current image" |
|
400 | 5964 |
|
911 | 5965 |
imageEditView flipHorizontal |
400 | 5966 |
! |
5967 |
||
767 | 5968 |
doFlipVertical |
5969 |
"flips vertically current image" |
|
400 | 5970 |
|
911 | 5971 |
imageEditView flipVertical |
400 | 5972 |
! |
5973 |
||
2196 | 5974 |
doInsertTextFromUser |
5975 |
|text tempForm tempImage maskImage font w h| |
|
5976 |
||
2424 | 5977 |
text := Dialog request:'Text to be inserted (placed as bitmap into clipboard for paste):'. |
5978 |
text isEmptyOrNil ifTrue:[^ self ]. |
|
2196 | 5979 |
|
5980 |
font := Font family:'arial' size:20. |
|
5981 |
font := font onDevice:Screen current. |
|
5982 |
w := font widthOf:text. |
|
5983 |
h := font heightOf:text. |
|
5984 |
||
5985 |
tempForm := Form extent:(w@h) depth:1 onDevice:(Screen current). |
|
5986 |
tempForm clear. |
|
5987 |
tempForm font:font. |
|
5988 |
tempForm paint:(Color colorId:1). |
|
5989 |
tempForm displayString:text at:(0@font ascent). |
|
5990 |
||
5991 |
tempImage := tempForm asImage. |
|
5992 |
maskImage := tempForm asImage. |
|
5993 |
tempImage |
|
5994 |
photometric:#palette; |
|
5995 |
colorMap:(Array with:Color white with:imageEditView selectedColor); |
|
5996 |
mask:maskImage. |
|
5997 |
||
5998 |
ImageEditView copyImageToClipboard:tempImage. |
|
5999 |
self editMode value:#paste. |
|
6000 |
||
6001 |
"Modified: / 11-11-2007 / 12:32:55 / cg" |
|
6002 |
! |
|
6003 |
||
1896 | 6004 |
doInspectImage |
6005 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
6006 |
||
6007 |
self image inspect |
|
6008 |
! |
|
6009 |
||
767 | 6010 |
doMagnifyDown |
1987 | 6011 |
"magnifies the current image one step down" |
400 | 6012 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6013 |
|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
|
6014 |
|
1987 | 6015 |
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
|
6016 |
(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
|
6017 |
magHolder value: mag - 1 |
400 | 6018 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6019 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6020 |
"Modified: / 26.7.1998 / 20:24:08 / cg" |
400 | 6021 |
! |
6022 |
||
767 | 6023 |
doMagnifyImage |
1479 | 6024 |
"magnifies the current image to a new size" |
400 | 6025 |
|
1353 | 6026 |
|box newSize image| |
6027 |
||
6028 |
image := imageEditView image. |
|
6029 |
||
6030 |
box := EnterBox new. |
|
6031 |
box title:(resources string:'Images new size:'). |
|
6032 |
box okText:(resources string:'OK'). |
|
6033 |
box abortText:(resources string:'Cancel'). |
|
6034 |
box initialText:image extent printString. |
|
6035 |
box showAtPointer. |
|
6036 |
(box accepted |
|
1960 | 6037 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6038 |
ifTrue:[ |
1479 | 6039 |
newSize isPoint ifFalse:[ |
6040 |
self warn:'please enter the new size as ''x @ y''.'. |
|
6041 |
^ self. |
|
6042 |
]. |
|
6043 |
imageEditView magnifyImageTo:newSize. |
|
6044 |
]. |
|
6045 |
||
6046 |
self updateInfoLabel |
|
6047 |
! |
|
6048 |
||
6049 |
doMagnifyImageBy |
|
6050 |
"magnifies the current image (by a scale)" |
|
6051 |
||
2260 | 6052 |
|box oldSize newSize scaleString scale image| |
1479 | 6053 |
|
6054 |
image := imageEditView image. |
|
6055 |
oldSize := image extent. |
|
6056 |
||
2260 | 6057 |
scaleString := Dialog |
6058 |
request:(resources string:'Scale factor (<1 to shrink; >1 to magnify):') |
|
6059 |
initialAnswer:'1' |
|
6060 |
list:#('0.25' '0.5' '2' '4'). |
|
6061 |
||
6062 |
"/ box := EnterBox new. |
|
6063 |
"/ box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):'). |
|
6064 |
"/ box okText:(resources string:'OK'). |
|
6065 |
"/ box abortText:(resources string:'Cancel'). |
|
6066 |
"/ box initialText:1 printString. |
|
6067 |
"/ box showAtPointer. |
|
6068 |
"/ box accepted ifTrue:[ |
|
6069 |
"/ scaleString := box contents. |
|
6070 |
"/ ]. |
|
6071 |
||
6072 |
scale := Object readFromString:scaleString onError:nil. |
|
6073 |
||
6074 |
scale notNil ifTrue:[ |
|
1479 | 6075 |
scale isNumber ifFalse:[ |
6076 |
self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'. |
|
6077 |
^ self. |
|
6078 |
]. |
|
6079 |
newSize := oldSize * scale. |
|
1353 | 6080 |
imageEditView magnifyImageTo:newSize. |
6081 |
]. |
|
6082 |
||
400 | 6083 |
self updateInfoLabel |
6084 |
! |
|
6085 |
||
767 | 6086 |
doMagnifyUp |
1987 | 6087 |
"magnifies the current image one step up" |
400 | 6088 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6089 |
|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
|
6090 |
|
1987 | 6091 |
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
|
6092 |
(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
|
6093 |
magHolder value: mag + 1 |
400 | 6094 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6095 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6096 |
"Modified: / 26.7.1998 / 20:23:52 / cg" |
400 | 6097 |
! |
6098 |
||
767 | 6099 |
doNegativeImage |
6100 |
"negates current image by negating the color map" |
|
400 | 6101 |
|
1598 | 6102 |
self image depth ~~ 1 ifTrue:[ |
6103 |
Dialog warn:'Only useful for depth 1 images'. |
|
6104 |
^ self |
|
6105 |
]. |
|
911 | 6106 |
imageEditView negativeImage. |
400 | 6107 |
self listOfColors removeAll. |
901 | 6108 |
self findColorMapMode. |
2585 | 6109 |
"/ imageEditView removelastUndo |
400 | 6110 |
! |
6111 |
||
767 | 6112 |
doResizeImage |
1353 | 6113 |
"resizes the current image" |
6114 |
||
6115 |
|box newSize image| |
|
6116 |
||
6117 |
image := imageEditView image. |
|
6118 |
||
6119 |
box := EnterBox new. |
|
6120 |
box title:(resources string:'Images new size:'). |
|
6121 |
box okText:(resources string:'OK'). |
|
6122 |
box abortText:(resources string:'Cancel'). |
|
6123 |
box initialText:image extent printString. |
|
6124 |
box showAtPointer. |
|
6125 |
(box accepted |
|
1960 | 6126 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6127 |
ifTrue:[ |
6128 |
imageEditView resizeImageTo:newSize. |
|
6129 |
]. |
|
400 | 6130 |
! |
6131 |
||
767 | 6132 |
doRotateImage |
6133 |
"rotates current image" |
|
400 | 6134 |
|
1353 | 6135 |
|box rotation| |
6136 |
||
6137 |
box := EnterBox new. |
|
6138 |
box title:(resources string:'Rotate by (degrees, clockwise):'). |
|
6139 |
box okText:(resources string:'OK'). |
|
6140 |
box abortText:(resources string:'Cancel'). |
|
6141 |
box initialText: '0'. |
|
6142 |
box showAtPointer. |
|
2196 | 6143 |
(box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil]) |
1353 | 6144 |
ifTrue:[ |
6145 |
imageEditView rotateImageBy:rotation. |
|
1558 | 6146 |
self updateInfoLabel. |
1353 | 6147 |
]. |
2196 | 6148 |
|
6149 |
"Modified: / 11-11-2007 / 13:21:11 / cg" |
|
400 | 6150 |
! |
6151 |
||
1557 | 6152 |
doShiftManual |
6153 |
"let user specify amount and shift" |
|
6154 |
||
1713 | 6155 |
|bindings amount img firstChange shiftAction acceptChannel wrapHolder| |
1557 | 6156 |
|
6157 |
acceptChannel := TriggerValue new. |
|
1960 | 6158 |
wrapHolder := (lastShiftUsedWrap ? true) asValue. |
1557 | 6159 |
|
6160 |
firstChange := true. |
|
6161 |
||
6162 |
shiftAction := |
|
6163 |
[:shiftH :shiftV | |
|
6164 |
acceptChannel value:true. |
|
6165 |
||
6166 |
img := imageEditView image. |
|
6167 |
firstChange ifTrue:[ |
|
6168 |
imageEditView makeUndo. |
|
6169 |
firstChange := false. |
|
6170 |
]. |
|
1713 | 6171 |
imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). |
1557 | 6172 |
self updateInfoLabel |
6173 |
]. |
|
6174 |
||
6175 |
bindings := IdentityDictionary new. |
|
6176 |
bindings at:#shiftAmount put:(amount := 1 asValue). |
|
1713 | 6177 |
bindings at:#wrap put:wrapHolder. |
1557 | 6178 |
bindings at:#acceptChannel put:acceptChannel. |
6179 |
||
6180 |
bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ]. |
|
6181 |
bindings at:#shiftRightNow put:[ shiftAction value:amount value value:0 ]. |
|
6182 |
bindings at:#shiftUpNow put:[ shiftAction value:0 value:(-1*amount value) ]. |
|
6183 |
bindings at:#shiftDownNow put:[ shiftAction value:0 value:amount value ]. |
|
6184 |
||
6185 |
(self openDialogInterface:#shiftDialogSpec withBindings:bindings) |
|
6186 |
ifFalse:[ |
|
6187 |
firstChange ~~ true ifTrue:[ |
|
6188 |
imageEditView undo |
|
6189 |
] |
|
6190 |
]. |
|
1960 | 6191 |
lastShiftUsedWrap := wrapHolder value. |
1557 | 6192 |
|
6193 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6194 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6195 |
! |
|
6196 |
||
1480 | 6197 |
doUnCropManual |
6198 |
"let user specify borders and add them" |
|
6199 |
||
6200 |
|bindings left top right bottom img| |
|
6201 |
||
6202 |
bindings := IdentityDictionary new. |
|
1704 | 6203 |
bindings at:#left put:(left := 1 asValue). |
6204 |
bindings at:#right put:(right := 1 asValue). |
|
6205 |
bindings at:#top put:(top := 1 asValue). |
|
6206 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
6207 |
(self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
1480 | 6208 |
ifTrue:[ |
6209 |
left := left value. |
|
6210 |
right := right value. |
|
6211 |
top := top value. |
|
6212 |
bottom := bottom value. |
|
6213 |
img := imageEditView image. |
|
6214 |
||
6215 |
imageEditView |
|
6216 |
makeBorderedImageX:left y:top |
|
6217 |
width:(img width + left + right) |
|
6218 |
height:(img height + top + bottom). |
|
6219 |
self updateInfoLabel |
|
6220 |
]. |
|
6221 |
||
6222 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6223 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6224 |
! |
|
6225 |
||
767 | 6226 |
doUndo |
6227 |
"reverses last edit action" |
|
400 | 6228 |
|
1436 | 6229 |
imageEditView undo. |
400 | 6230 |
! ! |
6231 |
||
2812 | 6232 |
!ImageEditor methodsFor:'user actions-image sequences'! |
6233 |
||
6234 |
editEachImageFromSequence |
|
6235 |
|seq| |
|
6236 |
||
6237 |
self checkModified ifFalse:[ ^ self ]. |
|
6238 |
||
6239 |
imageEditView releaseUndos. |
|
6240 |
||
6241 |
seq := self image imageSequence. |
|
6242 |
seq size > 10 ifTrue:[ |
|
6243 |
(Dialog confirm:(resources string:'Ok to open %1 image editor windows?' with:seq size)) |
|
6244 |
ifFalse:[^ self]. |
|
6245 |
]. |
|
6246 |
||
6247 |
seq do:[:eachFrame | |
|
6248 |
ImageEditor openOnImage:eachFrame image |
|
6249 |
]. |
|
6250 |
||
6251 |
"Modified: / 21-10-2010 / 15:01:25 / cg" |
|
6252 |
! |
|
6253 |
||
6254 |
gotoImageInSequence:index |
|
6255 |
"display the next image in the image sequence" |
|
6256 |
||
6257 |
|img seq frame listOfColors| |
|
6258 |
||
6259 |
imageEditView releaseUndos. |
|
6260 |
||
6261 |
seq := self image imageSequence. |
|
6262 |
||
6263 |
imageSeqNr := index. |
|
6264 |
frame := seq at:imageSeqNr. |
|
6265 |
imageEditView image:(frame image). |
|
6266 |
||
6267 |
(img := self image) notNil ifTrue:[ |
|
6268 |
listOfColors := self listOfColors. |
|
6269 |
img colorMap notNil ifTrue:[ |
|
6270 |
listOfColors contents:(img usedColors asSet asOrderedCollection). |
|
6271 |
] ifFalse:[ |
|
6272 |
listOfColors removeAll. |
|
6273 |
]. |
|
6274 |
self findColorMapMode. |
|
6275 |
self updateLabelsAndHistory. |
|
6276 |
img := img onDevice:device. |
|
6277 |
imageEditView image:img. |
|
6278 |
] ifFalse:[ |
|
6279 |
self updateForNoImage |
|
6280 |
]. |
|
6281 |
||
6282 |
"Created: / 21-10-2010 / 14:22:11 / cg" |
|
6283 |
! |
|
6284 |
||
6285 |
nextImageInSequence |
|
6286 |
"display the next image in the image sequence" |
|
6287 |
||
6288 |
|seq index| |
|
6289 |
||
6290 |
seq := self image imageSequence. |
|
6291 |
(index := imageSeqNr) isNil ifTrue:[ |
|
6292 |
index := 1. |
|
6293 |
]. |
|
6294 |
index := index + 1. |
|
6295 |
index > seq size ifTrue:[ |
|
6296 |
self information:'Back to first image in sequence'. |
|
6297 |
index := 1. |
|
6298 |
]. |
|
6299 |
self gotoImageInSequence:index. |
|
6300 |
||
6301 |
"Modified: / 21-10-2010 / 14:24:11 / cg" |
|
6302 |
! |
|
6303 |
||
6304 |
previousImageInSequence |
|
6305 |
"display the previous image in the image sequence" |
|
6306 |
||
6307 |
|seq index| |
|
6308 |
||
6309 |
seq := self image imageSequence. |
|
6310 |
(index := imageSeqNr) isNil ifTrue:[ |
|
6311 |
index := 1. |
|
6312 |
]. |
|
6313 |
index := index - 1. |
|
6314 |
index < 1 ifTrue:[ |
|
6315 |
self information:'Wrap to last image in sequence'. |
|
6316 |
index := seq size. |
|
6317 |
]. |
|
6318 |
self gotoImageInSequence:index. |
|
6319 |
||
6320 |
"Created: / 21-10-2010 / 14:25:03 / cg" |
|
6321 |
! ! |
|
6322 |
||
1715 | 6323 |
!ImageEditor methodsFor:'user actions-loading'! |
400 | 6324 |
|
767 | 6325 |
doLoadFromClass |
6326 |
"opens a dialog for loading an image from class and a (resource-) selector" |
|
400 | 6327 |
|
1122 | 6328 |
|img| |
6329 |
||
1975 | 6330 |
self checkModified ifFalse:[ ^ self ]. |
6331 |
||
1054 | 6332 |
(imageEditView loadFromClass) notNil ifTrue:[ |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6333 |
imageSeqNr := nil. |
1122 | 6334 |
(img := self image) notNil ifTrue: [ |
1900 | 6335 |
self updateColorsFromImage:img. |
574 | 6336 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
6337 |
self updateLabelsAndHistory. |
1054 | 6338 |
] ifFalse: [ |
6339 |
self updateForNoImage |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
6340 |
]. |
449 | 6341 |
] |
400 | 6342 |
! |
6343 |
||
767 | 6344 |
doLoadFromFile |
6345 |
"opens a dialog for loading an image from a file" |
|
400 | 6346 |
|
2820 | 6347 |
|img file filters title| |
1353 | 6348 |
|
1975 | 6349 |
self checkModified ifFalse:[ ^ self ]. |
6350 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6351 |
imageSeqNr := nil. |
1353 | 6352 |
img := self image. |
6353 |
img notNil ifTrue: [ |
|
6354 |
file := img fileName |
|
6355 |
]. |
|
6356 |
||
2820 | 6357 |
title := (resources string:'Load Image From'). |
6358 |
||
6359 |
UserPreferences current useNativeFileDialog ifTrue:[ |
|
6360 |
self withWaitCursorDo:[ |
|
6361 |
file := Display |
|
6362 |
nativeFileDialogFor:(self window topView id) |
|
6363 |
save:false |
|
6364 |
title:title |
|
6365 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
6366 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 6367 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 6368 |
filter: |
6369 |
{ |
|
6370 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp;*.jpg' } . |
|
6371 |
{ (resources string:'All Files') . '*.*' } |
|
6372 |
} |
|
2821 | 6373 |
extension:nil |
2827 | 6374 |
"blocking:false". |
2820 | 6375 |
]. |
6376 |
] ifFalse:[ |
|
6377 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
6378 |
file notNil ifTrue:[ |
|
6379 |
file := FileSelectionBrowser |
|
6380 |
request:title |
|
6381 |
fileName:file |
|
6382 |
withFileFilters:filters. |
|
6383 |
] ifFalse:[ |
|
6384 |
file := FileSelectionBrowser |
|
6385 |
request:title |
|
6386 |
inDirectory:LastDirectory |
|
6387 |
withFileFilters:filters. |
|
6388 |
]. |
|
1353 | 6389 |
]. |
2820 | 6390 |
|
1353 | 6391 |
file notNil ifTrue:[ |
6392 |
LastDirectory := file asFilename directoryName. |
|
6393 |
self loadFromFile:file |
|
6394 |
] |
|
2820 | 6395 |
|
2827 | 6396 |
"Modified: / 14-12-2010 / 13:52:11 / cg" |
400 | 6397 |
! |
6398 |
||
2796 | 6399 |
doLoadFromURL |
6400 |
"opens a dialog for loading an image from a URL" |
|
6401 |
||
2866 | 6402 |
|tempFile url response| |
2796 | 6403 |
|
6404 |
self checkModified ifFalse:[ ^ self ]. |
|
6405 |
||
6406 |
url := Dialog |
|
2866 | 6407 |
request:(resources string:'Load Image from URL') |
2796 | 6408 |
initialAnswer:LastURL. |
6409 |
||
6410 |
url notEmptyOrNil ifTrue:[ |
|
6411 |
LastURL := url. |
|
6412 |
tempFile := Filename newTemporary. |
|
2866 | 6413 |
self withWaitCursorDo:[ |
6414 |
response := HTTPInterface get:url destinationFile:tempFile. |
|
6415 |
]. |
|
6416 |
response isErrorResponse ifTrue:[ |
|
6417 |
Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText). |
|
6418 |
] ifFalse:[ |
|
6419 |
self loadFromFile:tempFile. |
|
6420 |
]. |
|
2796 | 6421 |
tempFile delete |
6422 |
] |
|
6423 |
||
6424 |
"Created: / 20-09-2010 / 11:30:59 / cg" |
|
6425 |
! |
|
6426 |
||
767 | 6427 |
doNewImage |
6428 |
"opens a dialog with choices of size and color map for creating a new image" |
|
400 | 6429 |
|
1975 | 6430 |
|dialogAspects width height cMapString cMapMode cMap imageClass image szString defaultSize ext| |
6431 |
||
6432 |
self checkModified ifFalse:[ ^ self ]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6433 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6434 |
defaultSize := (self class listOfDefaultSizes includes:'32x32') |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6435 |
ifTrue:['32x32'] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6436 |
ifFalse:[self class listOfDefaultSizes first]. |
767 | 6437 |
|
1975 | 6438 |
dialogAspects := IdentityDictionary new |
767 | 6439 |
at:#listOfSizes put: self class listOfDefaultSizes asValue; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6440 |
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
|
6441 |
at:#selectionOfSize put: (LastSizeString ? defaultSize) asValue; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6442 |
at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue; |
400 | 6443 |
yourself. |
6444 |
||
1975 | 6445 |
(self openDialogInterface:#dialogSpecForNewImage withBindings:dialogAspects) |
1383 | 6446 |
ifTrue:[ |
1975 | 6447 |
szString := (dialogAspects at:#selectionOfSize) value. |
1960 | 6448 |
ext := self pointFromString:szString. |
1962 | 6449 |
ext isNil ifTrue:[ |
6450 |
width := height := 32 |
|
6451 |
] ifFalse:[ |
|
6452 |
width := ext x. |
|
6453 |
height := ext y. |
|
6454 |
]. |
|
1960 | 6455 |
"/ width := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]). |
6456 |
"/ height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]). |
|
400 | 6457 |
|
1975 | 6458 |
cMapString := (dialogAspects at:#selectionOfColorMap) value. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6459 |
cMapMode := self class namesOfColorMaps keyAtEqualValue:cMapString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6460 |
cMap := self class listOfColorMaps at:cMapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6461 |
imageClass := Image implementorForDepth:(cMap size highBit-1). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6462 |
image := imageClass width: width height: height. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6463 |
image bits:(ByteArray new:(image bytesPerRow*height)). |
400 | 6464 |
|
1637 | 6465 |
LastSizeString := szString. |
6466 |
LastColormapMode := cMapString. |
|
6467 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6468 |
(cMapMode startsWith: 'mask') ifTrue:[ |
767 | 6469 |
image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels |
400 | 6470 |
]. |
6471 |
image colorMap: cMap. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6472 |
(imageEditView image: image) notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6473 |
self updateListOfColorsAndColormapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6474 |
self updateLabelsAndHistory. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6475 |
]. |
400 | 6476 |
image fillRectangleX:0 y:0 width:width height:height with:Color white. |
767 | 6477 |
] |
929 | 6478 |
! |
6479 |
||
2058 | 6480 |
doNewImageEditor |
6481 |
"opens a new image editor" |
|
6482 |
||
6483 |
ImageEditor open |
|
6484 |
||
6485 |
"Created: / 17-08-2006 / 09:03:14 / cg" |
|
6486 |
! |
|
6487 |
||
1682 | 6488 |
doNewImageFromClipboard |
6489 |
|image| |
|
6490 |
||
1975 | 6491 |
self checkModified ifFalse:[ ^ self ]. |
6492 |
||
1682 | 6493 |
image := imageEditView clipBoard. |
1975 | 6494 |
imageEditView image:image. |
6495 |
||
6496 |
image notNil ifTrue:[ |
|
1900 | 6497 |
self updateColorsFromImage:image. |
1682 | 6498 |
self findColorMapMode. |
6499 |
self updateLabelsAndHistory. |
|
6500 |
] |
|
6501 |
! |
|
6502 |
||
929 | 6503 |
grabScreenImage |
6504 |
"let user choose an area and grab that are for editing" |
|
6505 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6506 |
self grabScreenImageUsing:[ |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6507 |
|r| |
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 |
[Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6510 |
r := Rectangle fromUser. |
2708 | 6511 |
(r width == 0 or:[r height == 0]) ifTrue:[ |
6512 |
nil |
|
6513 |
] ifFalse:[ |
|
6514 |
lastGrabbedScreenArea := r. |
|
6515 |
Image fromScreen:r |
|
6516 |
] |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6517 |
]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6518 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6519 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6520 |
grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6521 |
"grab again from the previous area for editing" |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6522 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6523 |
self grabScreenImageUsing:[ |
2708 | 6524 |
Image fromScreen:lastGrabbedScreenArea |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
6525 |
]. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6526 |
! |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6527 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6528 |
grabScreenImageUsing:aBlock |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6529 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6530 |
|
1975 | 6531 |
self checkModified ifFalse:[ ^ self ]. |
6532 |
||
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6533 |
Processor |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6534 |
addTimedBlock:[ |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6535 |
|image d8image img| |
929 | 6536 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6537 |
imageSeqNr := nil. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6538 |
image := aBlock value. |
2708 | 6539 |
image notNil ifTrue:[ |
1121 | 6540 |
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
|
6541 |
false ifTrue:[ |
1687
f4543a556b89
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1682
diff
changeset
|
6542 |
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
|
6543 |
(sig := ex signal) == HaltInterrupt ifTrue:[ex reject]. |
1122 | 6544 |
sig == Signal noHandlerSignal ifTrue:[ex reject]. |
1121 | 6545 |
|
6546 |
self warn:'Could not convert to depth8 image (too many colors)'. |
|
6547 |
d8image := nil. |
|
6548 |
] do:[ |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
6549 |
d8image := Depth8Image fromImage:image photometric:#palette. |
1121 | 6550 |
]. |
6551 |
d8image notNil ifTrue:[ |
|
6552 |
image := d8image |
|
6553 |
] |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
6554 |
]. |
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6555 |
]. |
1121 | 6556 |
(imageEditView image:image) notNil ifTrue:[ |
6557 |
self listOfColors contents:(image colorMap). |
|
6558 |
self findColorMapMode. |
|
6559 |
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
|
6560 |
] |
1121 | 6561 |
] |
6562 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
6563 |
afterSeconds:1 |
929 | 6564 |
|
6565 |
"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
|
6566 |
"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
|
6567 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6568 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6569 |
grabWindowImage |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6570 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6571 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6572 |
self grabScreenImageUsing:[ |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6573 |
|v| |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6574 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6575 |
(v := Screen current viewFromUser) notNil ifTrue:[ |
2704 | 6576 |
v topView raise. |
6577 |
v topView makeFullyVisible. |
|
6578 |
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
|
6579 |
Image fromView:(v topView) |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6580 |
]. |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
6581 |
]. |
400 | 6582 |
! ! |
6583 |
||
1715 | 6584 |
!ImageEditor methodsFor:'user actions-saving'! |
400 | 6585 |
|
767 | 6586 |
doPrint |
6587 |
"prints current image on the current printer" |
|
400 | 6588 |
|
1734 | 6589 |
self withWaitCursorDo:[ |
6590 |
imageEditView print |
|
6591 |
] |
|
400 | 6592 |
! |
6593 |
||
1613 | 6594 |
doSaveButtonImageToFileAs |
6595 |
"opens a dialog for saving current image to a file" |
|
6596 |
||
6597 |
imageEditView saveButtonImageToFileAs. |
|
6598 |
self updateLabelsAndHistory. |
|
6599 |
! |
|
6600 |
||
767 | 6601 |
doSaveImageFile |
6602 |
"saves current image to current file" |
|
400 | 6603 |
|
1481 | 6604 |
imageEditView save. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6605 |
self clearModified. |
400 | 6606 |
! |
6607 |
||
767 | 6608 |
doSaveImageFileAs |
1922 | 6609 |
"opens a dialog for saving an image to a file" |
6610 |
||
6611 |
|img file filters| |
|
6612 |
||
6613 |
img := self image. |
|
6614 |
img notNil ifTrue: [ |
|
6615 |
file := img fileName |
|
6616 |
]. |
|
6617 |
||
2595 | 6618 |
filters := FileSelectionBrowser saveImageFileNameFilters. |
1922 | 6619 |
|
2820 | 6620 |
UserPreferences current useNativeFileDialog ifTrue:[ |
6621 |
self withWaitCursorDo:[ |
|
6622 |
file := Display |
|
6623 |
nativeFileDialogFor:(self window topView id) |
|
6624 |
save:true |
|
6625 |
title:(resources string:'Save Image To') |
|
6626 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
6627 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 6628 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 6629 |
filter: |
6630 |
{ |
|
6631 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp' } . |
|
6632 |
{ (resources string:'All Files') . '*.*' } |
|
6633 |
} |
|
2821 | 6634 |
extension:nil |
2827 | 6635 |
"blocking:false". |
2807 | 6636 |
]. |
2820 | 6637 |
] ifFalse:[ |
6638 |
(FileSelectionBrowser isNil or:[DirectoryView isNil]) ifTrue:[ |
|
6639 |
file notNil ifTrue:[ |
|
6640 |
file := Dialog requestFileName:'Save Image To' |
|
6641 |
default:file |
|
6642 |
pattern:(filters first). |
|
6643 |
] ifFalse:[ |
|
6644 |
file := Dialog |
|
6645 |
requestFileName:'Save Image To' |
|
6646 |
default:'image.png' |
|
6647 |
pattern:(filters first) |
|
6648 |
fromDirectory:LastDirectory. |
|
6649 |
]. |
|
2807 | 6650 |
] ifFalse:[ |
2820 | 6651 |
file notNil ifTrue:[ |
6652 |
file := FileSelectionBrowser |
|
6653 |
request:'Save Image To' |
|
6654 |
fileName:file |
|
6655 |
withFileFilters:filters. |
|
6656 |
] ifFalse:[ |
|
6657 |
file := FileSelectionBrowser |
|
6658 |
request:'Save Image To' |
|
6659 |
inDirectory:LastDirectory |
|
6660 |
withFileFilters:filters. |
|
6661 |
]. |
|
2807 | 6662 |
]. |
1922 | 6663 |
]. |
6664 |
file notNil ifTrue:[ |
|
6665 |
imageEditView saveImageFileAs:file. |
|
6666 |
LastDirectory := file asFilename directoryName. |
|
6667 |
self updateLabelsAndHistory. |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6668 |
self clearModified. |
1922 | 6669 |
] |
2807 | 6670 |
|
2827 | 6671 |
"Modified: / 14-12-2010 / 13:51:47 / cg" |
400 | 6672 |
! |
6673 |
||
767 | 6674 |
doSaveImageMaskFileAs |
6675 |
"opens a dialog for saving mask of current image to a file" |
|
400 | 6676 |
|
1481 | 6677 |
imageEditView saveImageMaskFileAs. |
400 | 6678 |
! |
6679 |
||
767 | 6680 |
doSaveMethod |
1975 | 6681 |
"saves the image in current class and selector" |
6682 |
||
6683 |
imageEditView saveMethod ifTrue:[ |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6684 |
self updateLabelsAndHistory. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6685 |
self clearModified. |
400 | 6686 |
] |
6687 |
! |
|
6688 |
||
767 | 6689 |
doSaveMethodAs |
6690 |
"opens a dialog for saving current image on a class and a selector" |
|
400 | 6691 |
|
1975 | 6692 |
imageEditView saveMethodAs ifTrue:[ |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6693 |
self updateLabelsAndHistory. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
6694 |
self clearModified. |
400 | 6695 |
] |
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6696 |
! |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6697 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6698 |
doShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6699 |
"opens a dialog showing the storeString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6700 |
(sometimes useful to embed an image into source code)" |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6701 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6702 |
|img| |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6703 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6704 |
img := imageEditView image. |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
6705 |
TextBox openOn:img storeString |
1975 | 6706 |
! |
6707 |
||
6708 |
save |
|
6709 |
"saves current image on current class and selector" |
|
6710 |
||
6711 |
self doSaveMethod |
|
400 | 6712 |
! ! |
6713 |
||
1715 | 6714 |
!ImageEditor methodsFor:'user actions-settings'! |
1353 | 6715 |
|
6716 |
doChangeGridMagnification |
|
6717 |
"change grid magnification" |
|
6718 |
||
6719 |
|box oldGridLimit newGridLimit| |
|
6720 |
||
6721 |
oldGridLimit := imageEditView class gridMagnificationLimit asPoint. |
|
6722 |
||
6723 |
box := EnterBox new. |
|
6724 |
box title:(resources string:'Grid Magnification Limit:'). |
|
6725 |
box okText:(resources string:'OK'). |
|
6726 |
box abortText:(resources string:'Cancel'). |
|
6727 |
box initialText:(oldGridLimit x printString). |
|
6728 |
box showAtPointer. |
|
6729 |
||
6730 |
(box accepted |
|
6731 |
and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil] |
|
6732 |
) ifTrue:[ |
|
6733 |
newGridLimit := (99 min: (2 max:newGridLimit)) asPoint. |
|
6734 |
imageEditView class gridMagnificationLimit:newGridLimit. |
|
6735 |
imageEditView invalidate |
|
6736 |
] |
|
6737 |
||
2192 | 6738 |
! |
6739 |
||
6740 |
penWidth:n |
|
6741 |
imageEditView penWidth:n |
|
6742 |
||
6743 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
2375 | 6744 |
! |
6745 |
||
6746 |
spraySpot:n |
|
6747 |
imageEditView spraySpot:n |
|
6748 |
||
6749 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
1353 | 6750 |
! ! |
6751 |
||
400 | 6752 |
!ImageEditor class methodsFor:'documentation'! |
6753 |
||
6754 |
version |
|
6755 |
^ '$Header$' |
|
2590 | 6756 |
! |
6757 |
||
6758 |
version_CVS |
|
6759 |
^ '$Header$' |
|
400 | 6760 |
! ! |