author | Stefan Vogel <sv@exept.de> |
Thu, 01 Dec 2016 11:02:41 +0100 | |
changeset 3357 | 97c7ed5950e5 |
parent 3356 | 10e247f059f1 |
child 3359 | 258a64461215 |
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 |
|
3180 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
1975 | 16 |
ResourceSpecEditor subclass:#ImageEditor |
975 | 17 |
instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode |
1960 | 18 |
selectedColorIndex postOpenAction imageSeqNr drawingColormap |
2767 | 19 |
lastShiftUsedWrap lastGrabbedScreenArea |
20 |
allowedToChangeImageDimensionAndDepth' |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
21 |
classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode |
2796 | 22 |
DefaultRelativeSizes LastURL' |
929 | 23 |
poolDictionaries:'' |
24 |
category:'Interface-UIPainter' |
|
400 | 25 |
! |
26 |
||
27 |
!ImageEditor class methodsFor:'documentation'! |
|
28 |
||
29 |
copyright |
|
30 |
" |
|
767 | 31 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 32 |
All Rights Reserved |
33 |
||
34 |
This software is furnished under a license and may be used |
|
35 |
only in accordance with the terms of that license and with the |
|
405 | 36 |
inclusion of the above copyright notice. This software may not |
400 | 37 |
be provided or otherwise made available to, or used by, any |
405 | 38 |
other person. No title to or ownership of the software is |
400 | 39 |
hereby transferred. |
40 |
" |
|
41 |
! |
|
42 |
||
43 |
documentation |
|
44 |
" |
|
737 | 45 |
Image Editor allows you to create, design, modify or just inspect images. |
400 | 46 |
|
47 |
[start with:] |
|
48 |
ImageEditor open |
|
941 | 49 |
ImageEditor openOnClass:Icon andSelector:#startIcon |
400 | 50 |
|
51 |
[see also:] |
|
52 |
ImageEditView Image |
|
53 |
||
54 |
[author:] |
|
544 | 55 |
Thomas Zwick, eXept Software AG |
1806 | 56 |
Claus Gittinger, eXept Software AG |
400 | 57 |
" |
58 |
! ! |
|
59 |
||
60 |
!ImageEditor class methodsFor:'instance creation'! |
|
61 |
||
3357 | 62 |
openLoadingImageWith:aBlock modal:modalBoolean |
1975 | 63 |
"opens an Image Editor on anImage" |
64 |
||
65 |
|editor| |
|
66 |
||
67 |
editor := self new. |
|
68 |
editor allButOpen. |
|
69 |
aBlock value:editor. |
|
3357 | 70 |
modalBoolean ifTrue:[ |
71 |
editor openWindowModal. |
|
72 |
] ifFalse:[ |
|
73 |
editor openWindow. |
|
74 |
]. |
|
2764 | 75 |
^ editor |
1975 | 76 |
! |
77 |
||
400 | 78 |
openModalOnClass: aClass andSelector: aSelector |
1975 | 79 |
"opens a modal Image Editor on aClass and aSelector. |
80 |
Returns the real name of the edited resource method (in case, user changed it)." |
|
81 |
||
82 |
|imageEditor imageEditView className resourceClass resourceSelector| |
|
767 | 83 |
|
400 | 84 |
imageEditor := self new. |
767 | 85 |
|
900 | 86 |
aClass isClass ifTrue: [className := aClass name]. |
87 |
aClass isString ifTrue: [className := aClass]. |
|
903 | 88 |
aClass isNil ifTrue: [className := '']. |
400 | 89 |
|
2764 | 90 |
imageEditor postOpenAction: [ |
91 |
imageEditView := imageEditor imageEditView. |
|
92 |
imageEditor loadFromOrPrepareForClass: aClass andSelector: aSelector |
|
93 |
]. |
|
400 | 94 |
imageEditor openModal. |
95 |
||
1975 | 96 |
resourceClass := imageEditView resourceClass. |
97 |
resourceSelector := imageEditView resourceSelector. |
|
98 |
||
99 |
(resourceClass isNil or:[resourceSelector isNil]) ifTrue:[^ nil]. |
|
100 |
^ Array with:resourceClass with:resourceSelector |
|
1966 | 101 |
|
102 |
" |
|
103 |
self openModalOnClass: self andSelector: #leftMouseKeyIcon |
|
104 |
" |
|
400 | 105 |
! |
106 |
||
3357 | 107 |
openModalOnFile:aFileName |
108 |
"opens an Image Editor on aFileName" |
|
109 |
||
110 |
self openLoadingImageWith:[:editor | |
|
111 |
editor loadFromFile:aFileName. |
|
112 |
] modal:true. |
|
113 |
||
114 |
" |
|
115 |
self openModalOnFile: '../../goodies/bitmaps/gifImages/back.gif' |
|
116 |
" |
|
117 |
! |
|
118 |
||
2764 | 119 |
openModalOnImage:anImage |
120 |
"opens a modal Image Editor on an image. |
|
121 |
Returns the modified image or nil if unsaved/unchanged" |
|
122 |
||
123 |
|imageEditor imageEditView newImage| |
|
124 |
||
125 |
imageEditor := self new. |
|
2767 | 126 |
imageEditor allowedToChangeImageDimensionAndDepth:false. |
2764 | 127 |
imageEditor postOpenAction: [ |
128 |
imageEditView := imageEditor imageEditView. |
|
129 |
imageEditor loadFromImage: anImage |
|
130 |
]. |
|
131 |
imageEditor openModal. |
|
132 |
||
2766 | 133 |
newImage := imageEditor savedImage. |
2764 | 134 |
^ newImage |
135 |
! |
|
136 |
||
1966 | 137 |
openOnClass:aClass andSelector:aSelector |
138 |
"opens an Image Editor on aClass and aSelector" |
|
400 | 139 |
|
2764 | 140 |
self openLoadingImageWith:[:editor | |
141 |
editor loadFromClass:aClass theNonMetaclass andSelector:aSelector. |
|
3357 | 142 |
] modal:false. |
1057 | 143 |
|
1966 | 144 |
" |
145 |
self openOnClass:self andSelector:#leftMouseKeyIcon |
|
146 |
self openOnClass:self andSelector:nil |
|
147 |
" |
|
148 |
||
1057 | 149 |
"Modified: / 16.3.1999 / 21:33:49 / cg" |
400 | 150 |
! |
151 |
||
1966 | 152 |
openOnFile:aFileName |
153 |
"opens an Image Editor on aFileName" |
|
400 | 154 |
|
2764 | 155 |
self openLoadingImageWith:[:editor | |
156 |
editor loadFromFile:aFileName. |
|
3357 | 157 |
] modal:false. |
1057 | 158 |
|
1966 | 159 |
" |
1975 | 160 |
self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' |
1966 | 161 |
" |
162 |
||
1057 | 163 |
"Modified: / 16.3.1999 / 21:33:25 / cg" |
400 | 164 |
! |
165 |
||
1966 | 166 |
openOnImage:anImage |
167 |
"opens an Image Editor on anImage" |
|
400 | 168 |
|
2764 | 169 |
self openLoadingImageWith:[:editor | |
170 |
editor loadFromImage: anImage. |
|
3357 | 171 |
] modal:false |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
172 |
|
1966 | 173 |
" |
174 |
self openOnImage: Icon startIcon |
|
175 |
" |
|
176 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
177 |
"Modified: / 11.3.1999 / 16:18:33 / cg" |
400 | 178 |
! ! |
179 |
||
180 |
!ImageEditor class methodsFor:'accessing'! |
|
181 |
||
182 |
listOfColorMaps |
|
767 | 183 |
"returns the list of default color maps for a new image" |
400 | 184 |
|
185 |
|colorMap| |
|
898 | 186 |
|
400 | 187 |
(colorMap := OrderedCollection new) |
188 |
add: Color black; |
|
189 |
add: Color white; |
|
190 |
add: Color red; |
|
191 |
add: Color green; |
|
192 |
add: Color blue; |
|
193 |
add: Color cyan; |
|
194 |
add: Color yellow; |
|
195 |
add: Color magenta; |
|
898 | 196 |
add: (Color redByte: 127 greenByte: 0 blueByte: 0); |
197 |
add: (Color redByte: 0 greenByte: 127 blueByte: 0); |
|
198 |
add: (Color redByte: 0 greenByte: 0 blueByte: 127); |
|
199 |
add: (Color redByte: 0 greenByte: 127 blueByte: 127); |
|
200 |
add: (Color redByte: 127 greenByte: 127 blueByte: 0); |
|
201 |
add: (Color redByte: 127 greenByte: 0 blueByte: 127); |
|
202 |
add: (Color redByte: 127 greenByte: 127 blueByte: 127); |
|
203 |
add: (Color redByte: 170 greenByte: 170 blueByte: 170). |
|
204 |
||
3346 | 205 |
0 to: 5 do: [:r| |
206 |
0 to: 5 do: [:g| |
|
207 |
0 to: 5 do: [:b| |
|
898 | 208 |
colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling) |
400 | 209 |
] |
210 |
] |
|
211 |
]. |
|
212 |
||
3346 | 213 |
1 to: 25 do: [:g| |
898 | 214 |
colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling) |
400 | 215 |
]. |
216 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
217 |
^ Dictionary new |
2571 | 218 |
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
|
219 |
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
|
220 |
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
|
221 |
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
|
222 |
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
|
223 |
at: #depth8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
224 |
at: #masked8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
225 |
at: #depth4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
226 |
at: #masked4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
227 |
at: #depth2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
228 |
at: #masked2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
229 |
at: #depth1 put: (colorMap copyFrom: 1 to: 2); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
230 |
at: #masked1 put: (colorMap copyFrom: 1 to: 2); |
400 | 231 |
yourself |
232 |
! |
|
233 |
||
234 |
listOfDefaultSizes |
|
767 | 235 |
"returns the list of default sizes for a new image" |
400 | 236 |
|
1960 | 237 |
^ #('8x8' '16x16' '22x22' '32x32' '48x48' '64x64') |
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
238 |
|
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
239 |
"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
|
240 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
241 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
242 |
namesOfColorMaps |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
243 |
^ Dictionary new |
2571 | 244 |
at: #depth32 put: '32-plane (rgba)'; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
245 |
at: #depth24 put: '24-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
246 |
at: #masked24 put: '24-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
247 |
at: #depth16 put: '16-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
248 |
at: #masked16 put: '16-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
249 |
at: #depth8 put: ' 8-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
250 |
at: #masked8 put: ' 8-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
251 |
at: #depth4 put: ' 4-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
252 |
at: #masked4 put: ' 4-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
253 |
at: #depth2 put: ' 2-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
254 |
at: #masked2 put: ' 2-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
255 |
at: #depth1 put: ' 1-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
256 |
at: #masked1 put: ' 1-plane + mask' ; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
257 |
yourself |
400 | 258 |
! ! |
259 |
||
460 | 260 |
!ImageEditor class methodsFor:'help specs'! |
261 |
||
1545 | 262 |
flyByHelpSpec |
263 |
<resource: #help> |
|
264 |
||
2871 | 265 |
^super flyByHelpSpec addPairsFrom:(self localHelpTexts) |
266 |
||
267 |
"Modified: / 19-01-2012 / 13:29:48 / cg" |
|
1545 | 268 |
! |
269 |
||
460 | 270 |
helpSpec |
737 | 271 |
"This resource specification was automatically generated |
272 |
by the UIHelpTool of ST/X." |
|
273 |
||
274 |
"Do not manually edit this!! If it is corrupted, |
|
275 |
the UIHelpTool may not be able to read the specification." |
|
460 | 276 |
|
277 |
" |
|
737 | 278 |
UIHelpTool openOnClass:ImageEditor |
460 | 279 |
" |
280 |
||
737 | 281 |
<resource: #help> |
282 |
||
2871 | 283 |
^ super helpSpec addPairsFrom:(self localHelpTexts) |
284 |
||
285 |
"Modified: / 19-01-2012 / 13:29:42 / cg" |
|
286 |
! |
|
287 |
||
288 |
localHelpTexts |
|
289 |
"This resource specification was automatically generated |
|
290 |
by the UIHelpTool of ST/X." |
|
291 |
||
292 |
"Do not manually edit this!! If it is corrupted, |
|
293 |
the UIHelpTool may not be able to read the specification." |
|
294 |
||
295 |
" |
|
296 |
UIHelpTool openOnClass:ImageEditor |
|
297 |
" |
|
298 |
||
299 |
<resource: #help> |
|
300 |
||
301 |
^ #( |
|
302 |
||
303 |
#xdrawModeBox |
|
304 |
'Rectangle' |
|
305 |
||
306 |
#xdrawModeCopy |
|
307 |
'Copy' |
|
308 |
||
309 |
#xdrawModeFill |
|
310 |
'Flood-fill' |
|
311 |
||
312 |
#xdrawModeFilledBox |
|
313 |
'Filled rectangle' |
|
314 |
||
315 |
#xdrawModePaste |
|
316 |
'Paste' |
|
317 |
||
318 |
#xdrawModePasteUnder |
|
319 |
'Paste under' |
|
320 |
||
321 |
#xdrawModePasteWithMask |
|
322 |
'Paste with Mask' |
|
323 |
||
324 |
#xdrawModePoint |
|
325 |
'Point' |
|
326 |
||
327 |
#xfileGrabImage |
|
328 |
'Pick from screen' |
|
329 |
||
330 |
#xfileLoadFromClass |
|
331 |
'Load from method...' |
|
332 |
||
333 |
#xfileLoadFromFile |
|
334 |
'Load from file...' |
|
335 |
||
336 |
#xfileNewImage |
|
337 |
'New image' |
|
338 |
||
339 |
#filePrint |
|
340 |
'Print' |
|
341 |
||
342 |
#xfileSaveAs |
|
343 |
'Save to file...' |
|
344 |
||
345 |
#xfileSaveMaskAs |
|
346 |
'Save mask to file...' |
|
347 |
||
348 |
#xfileSaveMethod |
|
349 |
'Save as method' |
|
350 |
||
351 |
#xfileSaveMethodAs |
|
352 |
'Save as Method...' |
|
353 |
||
354 |
#nextImageInSequence |
|
355 |
'Go to the next image in the animated gif image sequence.' |
|
356 |
||
357 |
#previousImageInSequence |
|
358 |
'Go to the previous image in the animated gif image sequence.' |
|
460 | 359 |
|
360 |
#colorMap |
|
2765 | 361 |
'ColorMap functions' |
929 | 362 |
|
363 |
#colorMap1 |
|
2765 | 364 |
'Convert to depth-1 image' |
929 | 365 |
|
986 | 366 |
#colorMap1M |
2765 | 367 |
'Convert to depth-1 image plus mask' |
986 | 368 |
|
929 | 369 |
#colorMap2 |
2765 | 370 |
'Convert to depth-2 image' |
371 |
||
372 |
#colorMap24 |
|
373 |
'Convert to depth-24 image (rgb)' |
|
929 | 374 |
|
986 | 375 |
#colorMap2M |
2765 | 376 |
'Convert to depth-2 image plus mask' |
377 |
||
378 |
#colorMap32 |
|
379 |
'Convert to depth-32 image (rgba)' |
|
986 | 380 |
|
929 | 381 |
#colorMap4 |
2765 | 382 |
'Convert to depth-4 image' |
929 | 383 |
|
986 | 384 |
#colorMap4M |
2765 | 385 |
'Convert to depth-4 image plus mask' |
986 | 386 |
|
929 | 387 |
#colorMap8 |
2765 | 388 |
'Convert to depth-8 image' |
929 | 389 |
|
390 |
#colorMap8M |
|
2765 | 391 |
'Convert to depth-8 image plus mask' |
2571 | 392 |
|
986 | 393 |
#colorMapTable |
2765 | 394 |
'Shows a list of used colors of the image' |
986 | 395 |
|
929 | 396 |
#compressColormap |
2765 | 397 |
'Remove unneeded entries from the colorMap' |
460 | 398 |
|
1045 | 399 |
#cropAll |
2765 | 400 |
'Find and remove all borders' |
986 | 401 |
|
1045 | 402 |
#cropBottom |
2765 | 403 |
'Find and remove bottom border' |
986 | 404 |
|
1045 | 405 |
#cropLeft |
2765 | 406 |
'Find and remove left border' |
986 | 407 |
|
1045 | 408 |
#cropManual |
986 | 409 |
'Specify border(s) to remove.' |
410 |
||
1045 | 411 |
#cropRight |
2765 | 412 |
'Find and remove right border' |
986 | 413 |
|
1045 | 414 |
#cropTop |
2765 | 415 |
'Find and remove top border' |
487 | 416 |
|
460 | 417 |
#drawModeBox |
2765 | 418 |
'Rectangle Drawing Mode' |
460 | 419 |
|
2375 | 420 |
#drawModeCircle |
2765 | 421 |
'Circle Drawing Mode' |
2375 | 422 |
|
460 | 423 |
#drawModeCopy |
2765 | 424 |
'Area Copy Mode' |
460 | 425 |
|
426 |
#drawModeFill |
|
2765 | 427 |
'Flood Fill Mode' |
460 | 428 |
|
429 |
#drawModeFilledBox |
|
2765 | 430 |
'Filled Rectangle Drawing Mode' |
460 | 431 |
|
432 |
#drawModePaste |
|
2765 | 433 |
'Paste Mode' |
914 | 434 |
|
435 |
#drawModePasteUnder |
|
2765 | 436 |
'Paste-Under Mode' |
1637 | 437 |
|
438 |
#drawModePasteWithMask |
|
2765 | 439 |
'Paste-with-Mask Mode' |
460 | 440 |
|
441 |
#drawModePoint |
|
2765 | 442 |
'Point Drawing Mode' |
2375 | 443 |
|
1639 | 444 |
#drawModeSpecial |
2871 | 445 |
'Special operations (select rectangle, then choose operation)' |
1639 | 446 |
|
2765 | 447 |
#drawModeSpray |
448 |
'Spray Drawing Mode' |
|
449 |
||
460 | 450 |
#editFlipHorizontal |
2765 | 451 |
'Flip the image horizontally' |
460 | 452 |
|
453 |
#editFlipVertical |
|
2765 | 454 |
'Flip the image vertically' |
460 | 455 |
|
456 |
#editMagnifyImage |
|
2765 | 457 |
'Magnify the image' |
460 | 458 |
|
459 |
#editNegate |
|
2765 | 460 |
'Invert the images colors' |
460 | 461 |
|
462 |
#editResize |
|
2765 | 463 |
'Resize the image (preserving the old image)' |
460 | 464 |
|
465 |
#editRotate |
|
2765 | 466 |
'Rotate the image' |
460 | 467 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
468 |
#fileGrabImageFromScreen |
2765 | 469 |
'Pick an image from the screen (specify area)' |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
470 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
471 |
#fileGrabImageFromWindow |
2765 | 472 |
'Pick an image from a window on the screen (click on window)' |
929 | 473 |
|
460 | 474 |
#fileLoadFromClass |
2765 | 475 |
'Select and load an image from a resource method' |
460 | 476 |
|
477 |
#fileLoadFromFile |
|
2765 | 478 |
'Select and load an image from a file' |
460 | 479 |
|
2796 | 480 |
#fileLoadFromURL |
481 |
'Load an image from the net, given its URL' |
|
482 |
||
460 | 483 |
#fileNewImage |
914 | 484 |
'Create a new image' |
460 | 485 |
|
3200 | 486 |
#fileNewImageFromClipboard |
487 |
'Create a new image and initialize it from the clipboard' |
|
488 |
||
489 |
#fileNewMaskFromClipboard |
|
490 |
'Paste the image in the clipboard as a mask. Must be a depth-1 image' |
|
491 |
||
460 | 492 |
#filePrint |
2765 | 493 |
'Print the image on a postscript printer' |
494 |
||
495 |
#fileSave |
|
496 |
'Save the image' |
|
460 | 497 |
|
498 |
#fileSaveAs |
|
2765 | 499 |
'Save the image to a file' |
500 |
||
501 |
#fileSaveButtonImageAs |
|
502 |
'Save an image of a button with the image to a file (for html use)' |
|
460 | 503 |
|
504 |
#fileSaveMaskAs |
|
2765 | 505 |
'Save the mask of the image to a file' |
1613 | 506 |
|
460 | 507 |
#fileSaveMethod |
2765 | 508 |
'Save the image as resource method in the current class and selector' |
460 | 509 |
|
510 |
#fileSaveMethodAs |
|
2765 | 511 |
'Save the image as resource method in a class' |
460 | 512 |
|
487 | 513 |
#magnificationNumber |
2765 | 514 |
'Shows the current magnification' |
487 | 515 |
|
516 |
#magnifyImageDown |
|
2765 | 517 |
'Decrease magnification' |
487 | 518 |
|
519 |
#magnifyImageUp |
|
2765 | 520 |
'Increase magnification' |
487 | 521 |
|
522 |
#mouseKeyColorMode |
|
2765 | 523 |
'Toggle between left and right mouse button color' |
487 | 524 |
|
525 |
#previewView |
|
2765 | 526 |
'Shows a preview of the image' |
487 | 527 |
|
905 | 528 |
#settingsGridMagnification |
2765 | 529 |
'Change the grid magnification of the edit view' |
905 | 530 |
|
460 | 531 |
) |
2871 | 532 |
|
533 |
"Created: / 19-01-2012 / 13:29:31 / cg" |
|
460 | 534 |
! ! |
535 |
||
737 | 536 |
!ImageEditor class methodsFor:'image specs'! |
537 |
||
2272 | 538 |
circleIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
539 |
<resource: #image> |
2272 | 540 |
"This resource specification was automatically generated |
541 |
by the ImageEditor of ST/X." |
|
542 |
"Do not manually edit this!! If it is corrupted, |
|
543 |
the ImageEditor may not be able to read the specification." |
|
544 |
" |
|
545 |
self circleIcon inspect |
|
546 |
ImageEditor openOnClass:self andSelector:#circleIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
547 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
548 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
549 |
^ Icon constantNamed:'ImageEditor class circleIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
550 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
551 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
552 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
553 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
554 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
555 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
556 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
557 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
558 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
559 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
560 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
561 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
562 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
563 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
564 |
fromPackedString:'@@@@@@N@CF@PDA@PH@ BB@HDA@PD@1 @8@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
565 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
566 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
567 |
] |
2272 | 568 |
! |
569 |
||
1637 | 570 |
copyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
571 |
<resource: #image> |
1637 | 572 |
"This resource specification was automatically generated |
573 |
by the ImageEditor of ST/X." |
|
574 |
"Do not manually edit this!! If it is corrupted, |
|
575 |
the ImageEditor may not be able to read the specification." |
|
576 |
" |
|
577 |
self copyIcon inspect |
|
578 |
ImageEditor openOnClass:self andSelector:#copyIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
579 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
580 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
581 |
^ Icon constantNamed:'ImageEditor class copyIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
582 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
583 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
584 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
585 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
586 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
587 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
588 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
589 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
590 |
fromPackedString:'@@@@@@@@@@@** @@J)UUTB*Z*)@*&**PJ)**$B*Z*)@*&**PJ)**$@@Z*)@@F**P@AUUT@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
591 |
colorMapFromArray:#[ 0 0 0 0 0 128 255 255 255 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
592 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
593 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
594 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
595 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
596 |
fromPackedString:'@@C? O>@??3??O?<??3??O?<??3??@_<A?0@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
597 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
598 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
599 |
] |
1637 | 600 |
! |
601 |
||
2155 | 602 |
defaultIcon |
603 |
<resource: #programImage> |
|
604 |
||
605 |
^ ToolbarIconLibrary startImageEditorIcon |
|
606 |
! |
|
607 |
||
2871 | 608 |
fillGradientRectIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
609 |
<resource: #image> |
2871 | 610 |
"This resource specification was automatically generated |
611 |
by the ImageEditor of ST/X." |
|
612 |
"Do not manually edit this!! If it is corrupted, |
|
613 |
the ImageEditor may not be able to read the specification." |
|
614 |
" |
|
615 |
self fillGradientRectIcon inspect |
|
616 |
ImageEditor openOnClass:self andSelector:#fillGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
617 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
618 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
619 |
^ Icon constantNamed:'ImageEditor class fillGradientRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
620 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
621 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
622 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
623 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
624 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
625 |
bitsPerSample:(#[ 4 ]); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
626 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
627 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
628 |
fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ADQDQDQ@@@QDQDQDP@@BH"H"H"@@@"H"H"H @@L3L3L3L@@CL3L3L3@@@QDQDQDP@@DQDQDQD@@@@@@@@@ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
629 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
630 |
colorMapFromArray:#[ 0 0 0 255 0 0 127 0 0 191 0 0 63 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
631 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
632 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
633 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
634 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
635 |
fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
636 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
637 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
638 |
] |
2871 | 639 |
! |
640 |
||
641 |
fillHorizontalGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
642 |
<resource: #image> |
2871 | 643 |
"This resource specification was automatically generated |
644 |
by the ImageEditor of ST/X." |
|
645 |
"Do not manually edit this!! If it is corrupted, |
|
646 |
the ImageEditor may not be able to read the specification." |
|
647 |
" |
|
648 |
self fillHorizontalGradientRectIcon inspect |
|
649 |
ImageEditor openOnClass:self andSelector:#fillHorizontalGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
650 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
651 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
652 |
^ Icon constantNamed:'ImageEditor class fillHorizontalGradientRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
653 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
654 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
655 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
656 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
657 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
658 |
bitsPerSample:(#[ 4 ]); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
659 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
660 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
661 |
fromPackedString:'@@@@@@@@@@@@@@@@@@@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@ADH#LQ@@@@QBH3DP@@@DP"L1D@@@@@@@@@ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
662 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
663 |
colorMapFromArray:#[ 0 0 0 255 0 0 127 0 0 191 0 0 63 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
664 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
665 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
666 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
667 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
668 |
fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
669 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
670 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
671 |
] |
2871 | 672 |
! |
673 |
||
1637 | 674 |
fillIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
675 |
<resource: #image> |
1637 | 676 |
"This resource specification was automatically generated |
677 |
by the ImageEditor of ST/X." |
|
678 |
"Do not manually edit this!! If it is corrupted, |
|
679 |
the ImageEditor may not be able to read the specification." |
|
680 |
" |
|
681 |
self fillIcon inspect |
|
682 |
ImageEditor openOnClass:self andSelector:#fillIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
683 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
684 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
685 |
^ Icon constantNamed:'ImageEditor class fillIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
686 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
687 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
688 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
689 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
690 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
691 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
692 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
693 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
694 |
fromPackedString:'@@@@@@@@@@@@@ @@@@*H@@D*(@@DUUP@EAUU@AAEU@@@@U@@DDA@@@@@@@@PP@@@@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
695 |
colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
696 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
697 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
698 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
699 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
700 |
fromPackedString:'C @Q@BN@I<@?8C?0[?!!G<@O P\@@ D@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
701 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
702 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
703 |
] |
1637 | 704 |
! |
705 |
||
706 |
fillRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
707 |
<resource: #image> |
1637 | 708 |
"This resource specification was automatically generated |
709 |
by the ImageEditor of ST/X." |
|
710 |
"Do not manually edit this!! If it is corrupted, |
|
711 |
the ImageEditor may not be able to read the specification." |
|
712 |
" |
|
713 |
self fillRectIcon inspect |
|
714 |
ImageEditor openOnClass:self andSelector:#fillRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
715 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
716 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
717 |
^ Icon constantNamed:'ImageEditor class fillRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
718 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
719 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
720 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
721 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
722 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
723 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
724 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
725 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
726 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
727 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
728 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
729 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
730 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
731 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
732 |
fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
733 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
734 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
735 |
] |
1637 | 736 |
! |
737 |
||
2871 | 738 |
fillVerticalGradientRectIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
739 |
<resource: #image> |
2871 | 740 |
"This resource specification was automatically generated |
741 |
by the ImageEditor of ST/X." |
|
742 |
"Do not manually edit this!! If it is corrupted, |
|
743 |
the ImageEditor may not be able to read the specification." |
|
744 |
" |
|
745 |
self fillGradientRectIcon inspect |
|
746 |
ImageEditor openOnClass:self andSelector:#fillGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
747 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
748 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
749 |
^ Icon constantNamed:'ImageEditor class fillGradientRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
750 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
751 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
752 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
753 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
754 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
755 |
bitsPerSample:(#[ 4 ]); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
756 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
757 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
758 |
fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ADQDQDQ@@@QDQDQDP@@BH"H"H"@@@"H"H"H @@L3L3L3L@@CL3L3L3@@@QDQDQDP@@DQDQDQD@@@@@@@@@ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
759 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
760 |
colorMapFromArray:#[ 0 0 0 255 0 0 127 0 0 191 0 0 63 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
761 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
762 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
763 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
764 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
765 |
fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
766 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
767 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
768 |
] |
2871 | 769 |
|
770 |
"Created: / 19-01-2012 / 13:44:51 / cg" |
|
771 |
! |
|
772 |
||
2837 | 773 |
flipHorizontalIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
774 |
<resource: #image> |
2837 | 775 |
"This resource specification was automatically generated |
776 |
by the ImageEditor of ST/X." |
|
777 |
"Do not manually edit this!! If it is corrupted, |
|
778 |
the ImageEditor may not be able to read the specification." |
|
779 |
" |
|
780 |
self flipHorizontalIcon inspect |
|
781 |
ImageEditor openOnClass:self andSelector:#flipHorizontalIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
782 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
783 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
784 |
^ Icon constantNamed:'ImageEditor class flipHorizontalIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
785 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
786 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
787 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
788 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
789 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
790 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
791 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
792 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
793 |
fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
794 |
colorMapFromArray:#[ 0 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
795 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
796 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
797 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
798 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
799 |
fromPackedString:'@@@A@C?8HP )JC$8_?1??C$8JR !!BC?8@P@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
800 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
801 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
802 |
] |
2837 | 803 |
! |
804 |
||
805 |
flipVerticalIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
806 |
<resource: #image> |
2837 | 807 |
"This resource specification was automatically generated |
808 |
by the ImageEditor of ST/X." |
|
809 |
"Do not manually edit this!! If it is corrupted, |
|
810 |
the ImageEditor may not be able to read the specification." |
|
811 |
" |
|
812 |
self flipVerticalIcon inspect |
|
813 |
ImageEditor openOnClass:self andSelector:#flipVerticalIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
814 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
815 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
816 |
^ Icon constantNamed:'ImageEditor class flipVerticalIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
817 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
818 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
819 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
820 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
821 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
822 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
823 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
824 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
825 |
fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
826 |
colorMapFromArray:#[ 0 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
827 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
828 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
829 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
830 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
831 |
fromPackedString:'@@@C@C?0I9@/4BLPH1A?>BLPH1@/4B^PO?@C@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
832 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
833 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
834 |
] |
2837 | 835 |
! |
836 |
||
737 | 837 |
leftMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
838 |
<resource: #image> |
737 | 839 |
"This resource specification was automatically generated |
840 |
by the ImageEditor of ST/X." |
|
841 |
"Do not manually edit this!! If it is corrupted, |
|
842 |
the ImageEditor may not be able to read the specification." |
|
843 |
" |
|
1405 | 844 |
self leftMouseKeyIcon inspect |
737 | 845 |
ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
846 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
847 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
848 |
^ Icon constantNamed:'ImageEditor class leftMouseKeyIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
849 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
850 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
851 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
852 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
853 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
854 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
855 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
856 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
857 |
fromPackedString:'@@@@@@@@@@@@@@@@@EJJ@@AR" @@T((@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
858 |
colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
859 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
860 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
861 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
862 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
863 |
fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
864 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
865 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
866 |
] |
1433 | 867 |
! |
737 | 868 |
|
1637 | 869 |
pasteIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
870 |
<resource: #image> |
1637 | 871 |
"This resource specification was automatically generated |
872 |
by the ImageEditor of ST/X." |
|
873 |
"Do not manually edit this!! If it is corrupted, |
|
874 |
the ImageEditor may not be able to read the specification." |
|
875 |
" |
|
876 |
self pasteIcon inspect |
|
877 |
ImageEditor openOnClass:self andSelector:#pasteIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
878 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
879 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
880 |
^ Icon constantNamed:'ImageEditor class pasteIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
881 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
882 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
883 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
884 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
885 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
886 |
bitsPerSample:(#( 4 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
887 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
888 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
889 |
fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3A&Y&X@@SL0Y A&@@D3LF@@A @AL3A&@FX@@QDPY&Y& |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
890 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
891 |
colorMapFromArray:#[ 0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
892 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
893 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
894 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
895 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
896 |
fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
897 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
898 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
899 |
] |
1637 | 900 |
! |
901 |
||
902 |
pasteUnderIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
903 |
<resource: #image> |
1637 | 904 |
"This resource specification was automatically generated |
905 |
by the ImageEditor of ST/X." |
|
906 |
"Do not manually edit this!! If it is corrupted, |
|
907 |
the ImageEditor may not be able to read the specification." |
|
908 |
" |
|
909 |
self pasteUnderIcon inspect |
|
910 |
ImageEditor openOnClass:self andSelector:#pasteUnderIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
911 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
912 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
913 |
^ Icon constantNamed:'ImageEditor class pasteUnderIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
914 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
915 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
916 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
917 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
918 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
919 |
bitsPerSample:(#( 4 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
920 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
921 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
922 |
fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L3LP@@@AL3L3E&X@@SL3L0A&@@D3L3@@A @AL3L3@FX@@QDQDQY& |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
923 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
924 |
colorMapFromArray:#[ 0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
925 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
926 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
927 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
928 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
929 |
fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
930 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
931 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
932 |
] |
1637 | 933 |
! |
934 |
||
935 |
pasteWithMaskIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
936 |
<resource: #image> |
1637 | 937 |
"This resource specification was automatically generated |
938 |
by the ImageEditor of ST/X." |
|
939 |
"Do not manually edit this!! If it is corrupted, |
|
940 |
the ImageEditor may not be able to read the specification." |
|
941 |
" |
|
942 |
self pasteWithMaskIcon inspect |
|
943 |
ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
944 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
945 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
946 |
^ Icon constantNamed:'ImageEditor class pasteWithMaskIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
947 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
948 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
949 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
950 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
951 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
952 |
bitsPerSample:(#( 4 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
953 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
954 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
955 |
fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L3A&@@D3LCL0A @AL3@3LFX@@QDPY&Y& |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
956 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
957 |
colorMapFromArray:#[ 0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
958 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
959 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
960 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
961 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
962 |
fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
963 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
964 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
965 |
] |
1637 | 966 |
! |
967 |
||
968 |
pointIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
969 |
<resource: #image> |
1637 | 970 |
"This resource specification was automatically generated |
971 |
by the ImageEditor of ST/X." |
|
972 |
"Do not manually edit this!! If it is corrupted, |
|
973 |
the ImageEditor may not be able to read the specification." |
|
974 |
" |
|
975 |
self pointIcon inspect |
|
976 |
ImageEditor openOnClass:self andSelector:#pointIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
977 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
978 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
979 |
^ Icon constantNamed:'ImageEditor class pointIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
980 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
981 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
982 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
983 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
984 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
985 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
986 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
987 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
988 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
989 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
990 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
991 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
992 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
993 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
994 |
fromPackedString:'@@@@@@@0@G@@8@G@@8@G@@8@G@@X@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
995 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
996 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
997 |
] |
1637 | 998 |
! |
999 |
||
1000 |
rectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1001 |
<resource: #image> |
1637 | 1002 |
"This resource specification was automatically generated |
1003 |
by the ImageEditor of ST/X." |
|
1004 |
"Do not manually edit this!! If it is corrupted, |
|
1005 |
the ImageEditor may not be able to read the specification." |
|
1006 |
" |
|
1007 |
self rectIcon inspect |
|
1008 |
ImageEditor openOnClass:self andSelector:#rectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1009 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1010 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1011 |
^ Icon constantNamed:'ImageEditor class rectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1012 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1013 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1014 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1015 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1016 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1017 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1018 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1019 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1020 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1021 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1022 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1023 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1024 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1025 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1026 |
fromPackedString:'@@@@@C?0HA@ DB@PHA@ DB@PHA@ DC?0@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1027 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1028 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1029 |
] |
1637 | 1030 |
! |
1031 |
||
737 | 1032 |
rightMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1033 |
<resource: #image> |
737 | 1034 |
"This resource specification was automatically generated |
1035 |
by the ImageEditor of ST/X." |
|
1036 |
"Do not manually edit this!! If it is corrupted, |
|
1037 |
the ImageEditor may not be able to read the specification." |
|
1038 |
" |
|
1405 | 1039 |
self rightMouseKeyIcon inspect |
737 | 1040 |
ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1041 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1042 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1043 |
^ Icon constantNamed:'ImageEditor class rightMouseKeyIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1044 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1045 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1046 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1047 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1048 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1049 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1050 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1051 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1052 |
fromPackedString:'@@@@@@@@@@@@@@@@@JJE@@B"!!P@@((T@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1053 |
colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1054 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1055 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1056 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1057 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1058 |
fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1059 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1060 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1061 |
] |
1637 | 1062 |
! |
1063 |
||
3191 | 1064 |
smoothIcon |
1065 |
"This resource specification was automatically generated |
|
1066 |
by the ImageEditor of ST/X." |
|
1067 |
||
1068 |
"Do not manually edit this!! If it is corrupted, |
|
1069 |
the ImageEditor may not be able to read the specification." |
|
1070 |
||
1071 |
" |
|
1072 |
self smoothIcon inspect |
|
1073 |
ImageEditor openOnClass:self andSelector:#smoothIcon |
|
1074 |
Icon flushCachedIcons |
|
1075 |
" |
|
1076 |
||
1077 |
<resource: #image> |
|
1078 |
||
1079 |
^Icon |
|
1080 |
constantNamed:'ImageEditor smoothIcon' |
|
1081 |
ifAbsentPut:[(Depth4Image new) width:14; height:14; bits:(ByteArray fromPackedString:'@@@@@@@@@@@RH@@@H!!@@HRD@@RD @BHQ@@DRH@@ADP@ADP@@@@@QD@@@@@@@DQ@@@@@@@ADP@@@@@QD@@QD@@BHQ@@DRH@@!!HP@AHR@@D"@@@BHP@@@@@@@@ |
|
1082 |
@@@@@@@@@@@b') ; colorMapFromArray:#[127 126 127 255 0 0 255 255 255]; mask:((ImageMask new) width:14; height:14; bits:(ByteArray fromPackedString:'_?1<_G1<_G1??D_DQ<QG1G?<_G1<_G1<_?0@@@@a') ; yourself); yourself] |
|
1083 |
! |
|
1084 |
||
2881 | 1085 |
specialCircleIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1086 |
<resource: #image> |
2881 | 1087 |
"This resource specification was automatically generated |
1088 |
by the ImageEditor of ST/X." |
|
1089 |
"Do not manually edit this!! If it is corrupted, |
|
1090 |
the ImageEditor may not be able to read the specification." |
|
1091 |
" |
|
1092 |
self specialCircleIcon inspect |
|
1093 |
ImageEditor openOnClass:self andSelector:#specialCircleIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1094 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1095 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1096 |
^ Icon constantNamed:'ImageEditor class specialCircleIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1097 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1098 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1099 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1100 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1101 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1102 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1103 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1104 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1105 |
fromPackedString:'@@L@@@!!BDB@ D4@HP@!!@BD@HHA@PHP!!@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1106 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1107 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1108 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1109 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1110 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1111 |
fromPackedString:'@@@@@@-@D2@''$D^HQ8!!G"DLHH1@PH@-@@0@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1112 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1113 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1114 |
] |
2881 | 1115 |
! |
1116 |
||
1637 | 1117 |
specialIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1118 |
<resource: #image> |
1637 | 1119 |
"This resource specification was automatically generated |
1120 |
by the ImageEditor of ST/X." |
|
1121 |
"Do not manually edit this!! If it is corrupted, |
|
1122 |
the ImageEditor may not be able to read the specification." |
|
1123 |
" |
|
1124 |
self specialIcon inspect |
|
1125 |
ImageEditor openOnClass:self andSelector:#specialIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1126 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1127 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1128 |
^ Icon constantNamed:'ImageEditor class specialIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1129 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1130 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1131 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1132 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1133 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1134 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1135 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1136 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1137 |
fromPackedString:'@@L@@G!!:P@!!@B4@HP@!!@BD@HP@!!@BW!!8@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1138 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1139 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1140 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1141 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1142 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1143 |
fromPackedString:'@@@@@G-8P0!!G"D^HQ8!!G"DLHP0!!@BG-8@0@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1144 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1145 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1146 |
] |
2375 | 1147 |
! |
1148 |
||
1149 |
sprayIcon |
|
1150 |
"This resource specification was automatically generated |
|
1151 |
by the ImageEditor of ST/X." |
|
3191 | 1152 |
|
2375 | 1153 |
"Do not manually edit this!! If it is corrupted, |
1154 |
the ImageEditor may not be able to read the specification." |
|
3191 | 1155 |
|
2375 | 1156 |
" |
1157 |
self sprayIcon inspect |
|
1158 |
ImageEditor openOnClass:self andSelector:#sprayIcon |
|
3191 | 1159 |
Icon flushCachedIcons |
1160 |
" |
|
1161 |
||
1162 |
<resource: #image> |
|
1163 |
||
1164 |
^Icon |
|
1165 |
constantNamed:'ImageEditor sprayIcon' |
|
1166 |
ifAbsentPut:[(Depth4Image new) width:14; height:14; bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@DA@P@@@@@PDA@@@@@@@PDA@@@@@@@PD@@@@"H@@PD@@@H"@@@@@@@ADP@@@@@@@QD@@@@@@@DQ@@@@@@@ADP@@ |
|
1167 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((ImageMask new) width:14; height:14; bits:(ByteArray fromPackedString:'@@@@@@@HA%PF*@ITA2 O%@>@C8@O @>@C8@O @@a') ; yourself); yourself] |
|
1433 | 1168 |
! ! |
737 | 1169 |
|
400 | 1170 |
!ImageEditor class methodsFor:'interface specs'! |
1171 |
||
1650 | 1172 |
changeHLSDialogSpec |
1173 |
"This resource specification was automatically generated |
|
1174 |
by the UIPainter of ST/X." |
|
1175 |
||
1176 |
"Do not manually edit this!! If it is corrupted, |
|
1177 |
the UIPainter may not be able to read the specification." |
|
1178 |
||
1179 |
" |
|
1180 |
UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec |
|
1181 |
ImageEditor new openInterface:#changeHLSDialogSpec |
|
1182 |
" |
|
1183 |
||
1184 |
<resource: #canvas> |
|
1185 |
||
1186 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1187 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1188 |
name: changeHLSDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1189 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1190 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1191 |
label: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1192 |
name: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1193 |
min: (Point 10 10) |
2438 | 1194 |
bounds: (Rectangle 0 0 312 258) |
1650 | 1195 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1196 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1197 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1198 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1199 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1200 |
label: 'Hue-Shift:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1201 |
name: 'HueLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1202 |
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
|
1203 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1204 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1205 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1206 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1207 |
name: 'HueShiftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1208 |
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
|
1209 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1210 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1211 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1212 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1213 |
maxValue: 360 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1214 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1215 |
acceptOnPointerLeave: false |
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 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1218 |
name: 'HueWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1219 |
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
|
1220 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1221 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1222 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1223 |
endlessRotation: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1224 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1225 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1226 |
label: 'Light Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1227 |
name: 'LightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1228 |
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
|
1229 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1230 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1231 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1232 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1233 |
name: 'LightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1234 |
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
|
1235 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1236 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1237 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1238 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1239 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1240 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1241 |
acceptOnPointerLeave: false |
1650 | 1242 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1243 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1244 |
name: 'LightWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1245 |
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
|
1246 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1247 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1248 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1249 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1250 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1251 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1252 |
label: 'Saturation Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1253 |
name: 'SaturationLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1254 |
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
|
1255 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1256 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1257 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1258 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1259 |
name: 'SaturationEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1260 |
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
|
1261 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1262 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1263 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1264 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1265 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1266 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1267 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1268 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1269 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1270 |
name: 'SaturationWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1271 |
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
|
1272 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1273 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1274 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1275 |
step: 1 |
1650 | 1276 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1277 |
(LabelSpec |
2438 | 1278 |
label: 'Color Shift' |
1279 |
name: 'Label2' |
|
1280 |
layout: (LayoutFrame 5 0 110 0 -15 0.5 132 0) |
|
1281 |
translateLabel: true |
|
1282 |
) |
|
1283 |
(LabelSpec |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1284 |
name: 'HueColorLabel' |
2438 | 1285 |
layout: (LayoutFrame 18 0.0 133 0 -41 0.5 217 0) |
1286 |
level: -1 |
|
1975 | 1287 |
backgroundChannel: hlsColor |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1288 |
translateLabel: true |
1650 | 1289 |
) |
2438 | 1290 |
(LabelSpec |
1291 |
label: 'Preview' |
|
1292 |
name: 'Label3' |
|
1293 |
layout: (LayoutFrame 5 0.5 110 0 -5 1 132 0) |
|
1294 |
translateLabel: true |
|
1295 |
) |
|
1296 |
(LabelSpec |
|
1297 |
name: 'PreviewLabel' |
|
1298 |
layout: (LayoutFrame 36 0.5 133 0 -23 1.0 217 0) |
|
1299 |
level: -1 |
|
1300 |
translateLabel: true |
|
1301 |
labelChannel: previewImageHolder |
|
1302 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1303 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1304 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1305 |
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
|
1306 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1307 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1308 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1309 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1310 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1311 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1312 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1313 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1314 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1315 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1316 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1317 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1318 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1319 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1320 |
extent: (Point 151 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1321 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1322 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1323 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1324 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1325 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1326 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1327 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1328 |
extent: (Point 152 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1329 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1330 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1331 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1332 |
) |
1650 | 1333 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1334 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1335 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1336 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1337 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1338 |
! |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1339 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1340 |
cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1341 |
"This resource specification was automatically generated |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1342 |
by the UIPainter of ST/X." |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1343 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1344 |
"Do not manually edit this!! If it is corrupted, |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1345 |
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
|
1346 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1347 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1348 |
UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1349 |
ImageEditor new openInterface:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1350 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1351 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1352 |
<resource: #canvas> |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1353 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1354 |
^ |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1355 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1356 |
name: cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1357 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1358 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1359 |
label: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1360 |
name: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1361 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1362 |
bounds: (Rectangle 14 46 259 229) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1363 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1364 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1365 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1366 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1367 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1368 |
label: 'Left:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1369 |
name: 'GropLeftLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1370 |
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
|
1371 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1372 |
adjust: right |
1650 | 1373 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1374 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1375 |
name: 'GropLeftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1376 |
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
|
1377 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1378 |
model: left |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1379 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1380 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1381 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1382 |
) |
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: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1385 |
name: 'GropLeftNowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1386 |
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
|
1387 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1388 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1389 |
model: gropLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1390 |
autoRepeat: true |
1650 | 1391 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1392 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1393 |
label: 'Right:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1394 |
name: 'GropRightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1395 |
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
|
1396 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1397 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1398 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1399 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1400 |
name: 'GropRightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1401 |
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
|
1402 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1403 |
model: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1404 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1405 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1406 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1407 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1408 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1409 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1410 |
name: 'GropRightButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1411 |
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
|
1412 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1413 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1414 |
model: gropRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1415 |
autoRepeat: true |
1650 | 1416 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1417 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1418 |
label: 'Top:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1419 |
name: 'GropTopLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1420 |
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
|
1421 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1422 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1423 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1424 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1425 |
name: 'GropTopEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1426 |
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
|
1427 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1428 |
model: top |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1429 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1430 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1431 |
acceptOnPointerLeave: false |
1650 | 1432 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1433 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1434 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1435 |
name: 'GropTopButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1436 |
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
|
1437 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1438 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1439 |
model: gropTopNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1440 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1441 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1442 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1443 |
label: 'Bottom:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1444 |
name: 'GropBottomLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1445 |
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
|
1446 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1447 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1448 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1449 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1450 |
name: 'GropBottomEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1451 |
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
|
1452 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1453 |
model: bottom |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1454 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1455 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1456 |
acceptOnPointerLeave: false |
1650 | 1457 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1458 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1459 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1460 |
name: 'GropBottomButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1461 |
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
|
1462 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1463 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1464 |
model: gropBottomNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1465 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1466 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1467 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1468 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1469 |
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
|
1470 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1471 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1472 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1473 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1474 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1475 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1476 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1477 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1478 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1479 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1480 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1481 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1482 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1483 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1484 |
extent: (Point 77 22) |
1650 | 1485 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1486 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1487 |
label: 'Apply' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1488 |
name: 'Button3' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1489 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1490 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1491 |
model: applyAction |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1492 |
extent: (Point 78 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1493 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1494 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1495 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1496 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1497 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1498 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1499 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1500 |
extent: (Point 78 22) |
1650 | 1501 |
) |
1502 |
) |
|
1503 |
||
1504 |
) |
|
1505 |
) |
|
1506 |
) |
|
1507 |
||
1508 |
) |
|
1509 |
) |
|
1510 |
! |
|
1511 |
||
767 | 1512 |
dialogSpecForNewImage |
737 | 1513 |
"This resource specification was automatically generated |
1514 |
by the UIPainter of ST/X." |
|
519 | 1515 |
|
737 | 1516 |
"Do not manually edit this!! If it is corrupted, |
1517 |
the UIPainter may not be able to read the specification." |
|
519 | 1518 |
|
1519 |
" |
|
767 | 1520 |
UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage |
1521 |
ImageEditor new openInterface:#dialogSpecForNewImage |
|
519 | 1522 |
" |
1523 |
||
1524 |
<resource: #canvas> |
|
1525 |
||
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1526 |
^ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1527 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1528 |
name: dialogSpecForNewImage |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1529 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1530 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1531 |
label: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1532 |
name: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1533 |
min: (Point 10 10) |
1806 | 1534 |
bounds: (Rectangle 0 0 301 119) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1535 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1536 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1537 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1538 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1539 |
(ViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1540 |
name: 'View' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1541 |
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
|
1542 |
level: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1543 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1544 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1545 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1546 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1547 |
label: 'Size' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1548 |
name: 'framedBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1549 |
layout: (LayoutFrame 1 0.0 7 0.0 0 0.4 76 0) |
1806 | 1550 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1551 |
labelPosition: topLeft |
1806 | 1552 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1553 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1554 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1555 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1556 |
(ComboBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1557 |
name: 'defaultSizesComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1558 |
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
|
1559 |
model: selectionOfSize |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1560 |
type: string |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1561 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1562 |
comboList: listOfDefaultSizes |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1563 |
isFilenameBox: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1564 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1565 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1566 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1567 |
) |
1490 | 1568 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1569 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1570 |
label: 'Color Map' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1571 |
name: 'framedBox2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1572 |
layout: (LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0) |
1806 | 1573 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1574 |
labelPosition: topLeft |
1806 | 1575 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1576 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1577 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1578 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1579 |
(ComboListSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1580 |
name: 'colorMapComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1581 |
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
|
1582 |
model: selectionOfColorMap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1583 |
comboList: listOfColorMaps |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1584 |
useIndex: false |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1585 |
hidePullDownMenuButton: false |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1586 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1587 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1588 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1589 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1590 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1591 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1592 |
|
986 | 1593 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1594 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1595 |
(UISubSpecification |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1596 |
name: 'windowSpecForCommitWithoutChannels' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1597 |
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
|
1598 |
minorKey: windowSpecForCommitWithoutChannels |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1599 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1600 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1601 |
|
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1602 |
) |
986 | 1603 |
) |
1604 |
! |
|
1605 |
||
1557 | 1606 |
shiftDialogSpec |
1607 |
"This resource specification was automatically generated |
|
1608 |
by the UIPainter of ST/X." |
|
1609 |
||
1610 |
"Do not manually edit this!! If it is corrupted, |
|
1611 |
the UIPainter may not be able to read the specification." |
|
1612 |
||
1613 |
" |
|
1614 |
UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec |
|
1615 |
ImageEditor new openInterface:#shiftDialogSpec |
|
1616 |
" |
|
1617 |
||
1618 |
<resource: #canvas> |
|
1619 |
||
1620 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1621 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1622 |
name: shiftDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1623 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1624 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1625 |
label: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1626 |
name: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1627 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1628 |
bounds: (Rectangle 14 46 259 229) |
1557 | 1629 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1630 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1631 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1632 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1633 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1634 |
label: 'Amount:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1635 |
name: 'AmountLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1636 |
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
|
1637 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1638 |
adjust: right |
1557 | 1639 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1640 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1641 |
name: 'AmountEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1642 |
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
|
1643 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1644 |
model: shiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1645 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1646 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1647 |
acceptOnPointerLeave: false |
1557 | 1648 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1649 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1650 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1651 |
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
|
1652 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1653 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1654 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1655 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1656 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1657 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1658 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1659 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1660 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1661 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1662 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1663 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1664 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1665 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1666 |
extent: (Point 118 22) |
1557 | 1667 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1668 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1669 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1670 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1671 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1672 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1673 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1674 |
extent: (Point 118 22) |
1557 | 1675 |
) |
1676 |
) |
|
1677 |
||
1678 |
) |
|
1679 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1680 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1681 |
name: 'upArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1682 |
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
|
1683 |
model: shiftUpNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1684 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1685 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1686 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1687 |
direction: up |
1557 | 1688 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1689 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1690 |
name: 'leftArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1691 |
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
|
1692 |
model: shiftLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1693 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1694 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1695 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1696 |
direction: left |
1557 | 1697 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1698 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1699 |
name: 'rightArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1700 |
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
|
1701 |
model: shiftRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1702 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1703 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1704 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1705 |
direction: right |
1557 | 1706 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1707 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1708 |
name: 'downArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1709 |
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
|
1710 |
model: shiftDownNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1711 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1712 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1713 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1714 |
direction: down |
1557 | 1715 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1716 |
(CheckBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1717 |
label: 'Wrap' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1718 |
name: 'CheckBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1719 |
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
|
1720 |
model: wrap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1721 |
translateLabel: true |
1713 | 1722 |
) |
1557 | 1723 |
) |
1724 |
||
1725 |
) |
|
1726 |
) |
|
1727 |
! |
|
1728 |
||
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1729 |
uncropDialogSpec |
1480 | 1730 |
"This resource specification was automatically generated |
1731 |
by the UIPainter of ST/X." |
|
1796 | 1732 |
|
1480 | 1733 |
"Do not manually edit this!! If it is corrupted, |
1734 |
the UIPainter may not be able to read the specification." |
|
1796 | 1735 |
|
1480 | 1736 |
" |
1796 | 1737 |
UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec |
1738 |
ImageEditor new openInterface:#uncropDialogSpec |
|
1480 | 1739 |
" |
1796 | 1740 |
|
1741 |
<resource: #canvas> |
|
1742 |
||
1743 |
^ |
|
1744 |
#(FullSpec |
|
1745 |
name: uncropDialogSpec |
|
1746 |
window: |
|
1747 |
(WindowSpec |
|
1748 |
label: 'Add Border(s)' |
|
1749 |
name: 'Add Border(s)' |
|
1750 |
min: (Point 10 10) |
|
1751 |
max: (Point 800 478) |
|
1752 |
bounds: (Rectangle 0 0 261 228) |
|
1753 |
) |
|
1754 |
component: |
|
1755 |
(SpecCollection |
|
1756 |
collection: ( |
|
1757 |
(LabelSpec |
|
1758 |
label: 'Left:' |
|
1759 |
name: 'Label1' |
|
1760 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
|
1761 |
translateLabel: true |
|
1762 |
adjust: right |
|
1763 |
) |
|
1764 |
(InputFieldSpec |
|
1765 |
name: 'EntryField1' |
|
1766 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
|
1767 |
model: left |
|
1768 |
type: number |
|
1769 |
acceptOnPointerLeave: false |
|
1770 |
) |
|
1771 |
(LabelSpec |
|
1772 |
label: 'Right:' |
|
1773 |
name: 'Label2' |
|
1774 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
|
1775 |
translateLabel: true |
|
1776 |
adjust: right |
|
1777 |
) |
|
1778 |
(InputFieldSpec |
|
1779 |
name: 'EntryField2' |
|
1780 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
|
1781 |
model: right |
|
1782 |
type: number |
|
1783 |
acceptOnPointerLeave: false |
|
1784 |
) |
|
1785 |
(LabelSpec |
|
1786 |
label: 'Top:' |
|
1787 |
name: 'Label3' |
|
1788 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
|
1789 |
translateLabel: true |
|
1790 |
adjust: right |
|
1791 |
) |
|
1792 |
(InputFieldSpec |
|
1793 |
name: 'EntryField3' |
|
1794 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
|
1795 |
model: top |
|
1796 |
type: number |
|
1797 |
acceptOnPointerLeave: false |
|
1798 |
) |
|
1799 |
(LabelSpec |
|
1800 |
label: 'Bottom:' |
|
1801 |
name: 'Label4' |
|
1802 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
|
1803 |
translateLabel: true |
|
1804 |
adjust: right |
|
1805 |
) |
|
1806 |
(InputFieldSpec |
|
1807 |
name: 'EntryField4' |
|
1808 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
|
1809 |
model: bottom |
|
1810 |
type: number |
|
1811 |
acceptOnPointerLeave: false |
|
1812 |
) |
|
1813 |
(HorizontalPanelViewSpec |
|
1814 |
name: 'HorizontalPanel1' |
|
1815 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
|
1816 |
horizontalLayout: fitSpace |
|
1817 |
verticalLayout: center |
|
1818 |
horizontalSpace: 3 |
|
1819 |
verticalSpace: 3 |
|
1820 |
reverseOrderIfOKAtLeft: true |
|
1821 |
component: |
|
1822 |
(SpecCollection |
|
1823 |
collection: ( |
|
1824 |
(ActionButtonSpec |
|
1825 |
label: 'Cancel' |
|
1826 |
name: 'Button1' |
|
1827 |
translateLabel: true |
|
1828 |
model: cancel |
|
1829 |
extent: (Point 118 22) |
|
1830 |
) |
|
1831 |
(ActionButtonSpec |
|
1832 |
label: 'OK' |
|
1833 |
name: 'Button2' |
|
1834 |
translateLabel: true |
|
1835 |
model: accept |
|
1836 |
extent: (Point 118 22) |
|
1837 |
) |
|
1838 |
) |
|
1839 |
||
1840 |
) |
|
1841 |
) |
|
1842 |
) |
|
1843 |
||
1844 |
) |
|
1845 |
) |
|
1480 | 1846 |
! |
1847 |
||
767 | 1848 |
windowSpec |
1849 |
"This resource specification was automatically generated |
|
1850 |
by the UIPainter of ST/X." |
|
1851 |
||
1852 |
"Do not manually edit this!! If it is corrupted, |
|
1853 |
the UIPainter may not be able to read the specification." |
|
1854 |
||
1855 |
" |
|
1856 |
UIPainter new openOnClass:ImageEditor andSelector:#windowSpec |
|
1857 |
ImageEditor new openInterface:#windowSpec |
|
1858 |
ImageEditor open |
|
1859 |
" |
|
1860 |
||
1861 |
<resource: #canvas> |
|
1862 |
||
1558 | 1863 |
^ |
3195 | 1864 |
#(FullSpec |
1865 |
name: windowSpec |
|
1866 |
window: |
|
1867 |
(WindowSpec |
|
1868 |
label: 'Image Editor' |
|
1869 |
name: 'Image Editor' |
|
1870 |
min: (Point 400 320) |
|
1871 |
bounds: (Rectangle 0 0 450 350) |
|
1872 |
menu: menu |
|
1873 |
icon: defaultIcon |
|
1874 |
) |
|
1875 |
component: |
|
1876 |
(SpecCollection |
|
1877 |
collection: ( |
|
1878 |
(MenuPanelSpec |
|
1879 |
name: 'menuToolbarView' |
|
1880 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1881 |
style: (FontDescription helvetica medium roman 10) |
|
1882 |
menu: menuToolbar |
|
1883 |
showSeparatingLines: true |
|
1884 |
) |
|
1885 |
(VariableHorizontalPanelSpec |
|
1886 |
name: 'mainPanel' |
|
1887 |
layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
1888 |
snapMode: both |
|
1889 |
barLevel: 0 |
|
1890 |
component: |
|
1891 |
(SpecCollection |
|
1892 |
collection: ( |
|
1893 |
(ViewSpec |
|
1894 |
name: 'leftView' |
|
1895 |
level: 1 |
|
1896 |
component: |
|
1897 |
(SpecCollection |
|
1898 |
collection: ( |
|
1899 |
(VariableVerticalPanelSpec |
|
1900 |
name: 'verticalPanel' |
|
1901 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1902 |
level: 0 |
|
1903 |
snapMode: both |
|
1904 |
component: |
|
1905 |
(SpecCollection |
|
1906 |
collection: ( |
|
1907 |
(ViewSpec |
|
1908 |
name: 'View1' |
|
1909 |
component: |
|
1910 |
(SpecCollection |
|
1911 |
collection: ( |
|
1912 |
(MenuPanelSpec |
|
1913 |
name: 'MouseButtonColorToolBar' |
|
1914 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
1915 |
level: 0 |
|
1916 |
menu: menuMouseButtonColors |
|
1558 | 1917 |
) |
3195 | 1918 |
(DataSetSpec |
1919 |
name: 'colorDataSetView' |
|
1920 |
layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
1921 |
activeHelpKey: colorMapTable |
|
1922 |
style: (FontDescription helvetica medium roman 10) |
|
1923 |
model: selectedColors |
|
1924 |
menu: colorMapMenu |
|
1925 |
hasHorizontalScrollBar: true |
|
1926 |
hasVerticalScrollBar: true |
|
1927 |
miniScrollerHorizontal: true |
|
1928 |
miniScrollerVertical: true |
|
1929 |
dataList: listOfColors |
|
1930 |
has3Dseparators: true |
|
1931 |
doubleClickSelector: doubleClickOnColor: |
|
1932 |
columnHolder: colorTableColumns |
|
1933 |
multipleSelectOk: true |
|
1934 |
verticalSpacing: 1 |
|
1935 |
columnAdaptor: colorColumnAdaptor |
|
1936 |
) |
|
1937 |
) |
|
1938 |
||
1939 |
) |
|
1558 | 1940 |
) |
3195 | 1941 |
(ArbitraryComponentSpec |
1942 |
name: 'imagePreView' |
|
1943 |
activeHelpKey: previewView |
|
1944 |
menu: previewMenu |
|
1945 |
hasHorizontalScrollBar: true |
|
1946 |
hasVerticalScrollBar: true |
|
1947 |
miniScrollerHorizontal: false |
|
1948 |
miniScrollerVertical: false |
|
1949 |
hasBorder: false |
|
1950 |
component: ImageView |
|
1951 |
) |
|
1952 |
) |
|
1953 |
||
1954 |
) |
|
1955 |
handles: (Any 0.5 1.0) |
|
1558 | 1956 |
) |
3195 | 1957 |
) |
1958 |
||
1959 |
) |
|
1960 |
) |
|
1961 |
(ViewSpec |
|
1962 |
name: 'rightView' |
|
1963 |
component: |
|
1964 |
(SpecCollection |
|
1965 |
collection: ( |
|
1966 |
(MenuPanelSpec |
|
1967 |
name: 'ToolBar1' |
|
1968 |
layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0) |
|
1969 |
level: 1 |
|
1970 |
menu: toolsMenuToolbar |
|
1971 |
verticalLayout: true |
|
1972 |
centerItems: true |
|
1973 |
textDefault: true |
|
1974 |
) |
|
1975 |
(ViewSpec |
|
1976 |
name: 'editingView' |
|
1977 |
layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0) |
|
1978 |
level: 1 |
|
1979 |
component: |
|
1980 |
(SpecCollection |
|
1981 |
collection: ( |
|
1982 |
(ArbitraryComponentSpec |
|
1983 |
name: 'imageEditView' |
|
1984 |
layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0) |
|
1985 |
hasHorizontalScrollBar: true |
|
1986 |
hasVerticalScrollBar: true |
|
1987 |
hasBorder: false |
|
1988 |
component: ImageEditView |
|
1989 |
) |
|
1990 |
(LabelSpec |
|
1991 |
name: 'coordLabel' |
|
1992 |
layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0) |
|
1993 |
level: -1 |
|
1994 |
translateLabel: true |
|
1995 |
labelChannel: imageInfoHolder |
|
1996 |
resizeForLabel: false |
|
1997 |
adjust: left |
|
1637 | 1998 |
) |
3195 | 1999 |
(ArrowButtonSpec |
2000 |
name: 'magnifyDownButton' |
|
2001 |
layout: (LayoutFrame -80 1 -22 1 -58 1 0 1) |
|
2002 |
activeHelpKey: magnifyImageDown |
|
2003 |
translateLabel: true |
|
2004 |
model: doMagnifyDown |
|
2005 |
enableChannel: imageIsLoadedHolder |
|
2006 |
isTriggerOnDown: true |
|
2007 |
direction: left |
|
2008 |
) |
|
2009 |
(ArrowButtonSpec |
|
2010 |
name: 'magnifyUpButton' |
|
2011 |
layout: (LayoutFrame -24 1 -22 1 -2 1 0 1) |
|
2012 |
activeHelpKey: magnifyImageUp |
|
2013 |
translateLabel: true |
|
2014 |
model: doMagnifyUp |
|
2015 |
enableChannel: imageIsLoadedHolder |
|
2016 |
isTriggerOnDown: true |
|
2017 |
direction: right |
|
2018 |
) |
|
2019 |
(InputFieldSpec |
|
2020 |
name: 'magnificationInputField' |
|
2021 |
layout: (LayoutFrame -57 1 -22 1 -26 1 0 1) |
|
2022 |
activeHelpKey: magnificationNumber |
|
2023 |
enableChannel: imageIsLoadedHolder |
|
2024 |
model: magnificationHolder |
|
2025 |
type: numberInRange |
|
2026 |
acceptOnReturn: true |
|
2027 |
acceptOnTab: true |
|
2028 |
numChars: 2 |
|
2029 |
minValue: 1 |
|
2030 |
maxValue: 99 |
|
2031 |
acceptOnPointerLeave: true |
|
2032 |
) |
|
2033 |
) |
|
2034 |
||
2035 |
) |
|
1558 | 2036 |
) |
3195 | 2037 |
) |
2038 |
||
2039 |
) |
|
1558 | 2040 |
) |
3195 | 2041 |
) |
2042 |
||
2043 |
) |
|
2044 |
handles: (Any 0.28888900000000006 1.0) |
|
1558 | 2045 |
) |
3195 | 2046 |
(UISubSpecification |
2047 |
name: 'infoBarSubSpec' |
|
2048 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
2049 |
majorKey: ToolApplicationModel |
|
2050 |
minorKey: windowSpecForInfoBar |
|
2051 |
) |
|
2052 |
) |
|
2053 |
||
2054 |
) |
|
2055 |
) |
|
519 | 2056 |
! ! |
2057 |
||
2058 |
!ImageEditor class methodsFor:'menu specs'! |
|
2059 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2060 |
colorMapMenu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2061 |
"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
|
2062 |
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
|
2063 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2064 |
"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
|
2065 |
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
|
2066 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2067 |
" |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2068 |
MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2069 |
(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
|
2070 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2071 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2072 |
<resource: #menu> |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2073 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2074 |
^ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2075 |
#(Menu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2076 |
( |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2077 |
(MenuItem |
2792 | 2078 |
enabled: hasColormapHolder |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2079 |
label: 'Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2080 |
itemValue: addColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2081 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2082 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2083 |
(MenuItem |
2792 | 2084 |
enabled: hasColormapHolder |
2539 | 2085 |
label: 'Pick and Add Color...' |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2086 |
itemValue: pickAndAddColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2087 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2088 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2089 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2090 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2091 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2092 |
(MenuItem |
3195 | 2093 |
enabled: hasColormapAndSingleColorSelected |
1852 | 2094 |
label: 'Cut Color' |
2095 |
itemValue: cutColorFromColormap |
|
2096 |
translateLabel: true |
|
2097 |
isVisible: false |
|
2098 |
) |
|
2099 |
(MenuItem |
|
3195 | 2100 |
enabled: hasSingleColorSelectedHolder |
1852 | 2101 |
label: 'Copy Color' |
2102 |
itemValue: copyColorFromColormap |
|
2103 |
translateLabel: true |
|
2841 | 2104 |
shortcutKey: Copy |
1852 | 2105 |
) |
2106 |
(MenuItem |
|
3195 | 2107 |
enabled: hasColormapAndSingleColorSelected |
2539 | 2108 |
label: 'Pick and Paste Color...' |
1933 | 2109 |
itemValue: pickAndPasteColor |
1852 | 2110 |
translateLabel: true |
2111 |
) |
|
2112 |
(MenuItem |
|
2113 |
label: 'Paste Color' |
|
2114 |
itemValue: pasteColorIntoColormap |
|
2115 |
translateLabel: true |
|
2841 | 2116 |
shortcutKey: Paste |
1852 | 2117 |
) |
2118 |
(MenuItem |
|
2119 |
label: '-' |
|
2120 |
) |
|
2121 |
(MenuItem |
|
3195 | 2122 |
enabled: hasColormapAndSingleColorSelected |
2539 | 2123 |
label: 'Edit Color...' |
1931 | 2124 |
itemValue: editSelectedColor |
2125 |
translateLabel: true |
|
2126 |
) |
|
2127 |
(MenuItem |
|
2651 | 2128 |
enabled: hasColormapAndColorSelected |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2129 |
label: 'Brighter' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2130 |
itemValue: makeSelectedColorBrighter |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2131 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2132 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2133 |
(MenuItem |
2651 | 2134 |
enabled: hasColormapAndColorSelected |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2135 |
label: 'Darker' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2136 |
itemValue: makeSelectedColorDarker |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2137 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2138 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2139 |
(MenuItem |
2651 | 2140 |
enabled: hasColormapAndColorSelected |
1884 | 2141 |
label: 'Make Gray' |
2142 |
itemValue: makeSelectedColorGray |
|
2143 |
translateLabel: true |
|
2144 |
) |
|
2145 |
(MenuItem |
|
3195 | 2146 |
enabled: hasColormapAndColorSelected |
2147 |
label: 'Color Shift' |
|
2148 |
itemValue: makeSelectedColorShifted |
|
2149 |
translateLabel: true |
|
2150 |
) |
|
2151 |
(MenuItem |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2152 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2153 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2154 |
(MenuItem |
3195 | 2155 |
enabled: hasSingleColorSelectedHolder |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2156 |
label: 'Inspect Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2157 |
itemValue: inspectColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2158 |
translateLabel: true |
2651 | 2159 |
) |
2160 |
(MenuItem |
|
2792 | 2161 |
enabled: hasColormapHolder |
2651 | 2162 |
label: 'Inspect Colormap' |
2163 |
itemValue: inspectColormap |
|
2164 |
translateLabel: true |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2165 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2166 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2167 |
nil |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2168 |
nil |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2169 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2170 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2171 |
|
400 | 2172 |
menu |
737 | 2173 |
"This resource specification was automatically generated |
2174 |
by the MenuEditor of ST/X." |
|
400 | 2175 |
|
737 | 2176 |
"Do not manually edit this!! If it is corrupted, |
2177 |
the MenuEditor may not be able to read the specification." |
|
400 | 2178 |
|
2179 |
" |
|
2180 |
MenuEditor new openOnClass:ImageEditor andSelector:#menu |
|
2181 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp |
|
2182 |
" |
|
2183 |
||
2184 |
<resource: #menu> |
|
2185 |
||
1124 | 2186 |
^ |
1882 | 2187 |
#(Menu |
2188 |
( |
|
2189 |
(MenuItem |
|
2190 |
label: '&File' |
|
2191 |
translateLabel: true |
|
2196 | 2192 |
submenuChannel: menuFile |
2585 | 2193 |
"/ keepLinkedMenu: true |
1124 | 2194 |
) |
1882 | 2195 |
(MenuItem |
2196 |
label: 'Edit' |
|
2197 |
translateLabel: true |
|
2196 | 2198 |
submenuChannel: menuEdit |
2585 | 2199 |
"/ keepLinkedMenu: true |
1124 | 2200 |
) |
1882 | 2201 |
(MenuItem |
2202 |
label: 'Mode' |
|
2203 |
translateLabel: true |
|
2204 |
submenuChannel: modeMenu |
|
1637 | 2205 |
) |
1882 | 2206 |
(MenuItem |
1924 | 2207 |
label: 'Colors' |
1882 | 2208 |
translateLabel: true |
2585 | 2209 |
submenuChannel: menuColors |
1124 | 2210 |
) |
1882 | 2211 |
(MenuItem |
2212 |
label: 'Settings' |
|
2213 |
translateLabel: true |
|
2585 | 2214 |
submenuChannel: menuSettings |
1124 | 2215 |
) |
1882 | 2216 |
(MenuItem |
2217 |
label: 'History' |
|
2218 |
translateLabel: true |
|
1975 | 2219 |
isVisible: isStandAlone |
1882 | 2220 |
submenuChannel: menuHistory |
1124 | 2221 |
) |
1882 | 2222 |
(MenuItem |
2136
bb10485fa455
support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents:
2125
diff
changeset
|
2223 |
label: 'MENU_Help' |
1882 | 2224 |
translateLabel: true |
2125 | 2225 |
startGroup: conditionalRight |
1882 | 2226 |
submenuChannel: menuHelp |
1124 | 2227 |
) |
2228 |
) |
|
2229 |
nil |
|
2230 |
nil |
|
400 | 2231 |
) |
2232 |
! |
|
2233 |
||
2585 | 2234 |
menuColors |
2235 |
"This resource specification was automatically generated |
|
2236 |
by the MenuEditor of ST/X." |
|
2237 |
||
2238 |
"Do not manually edit this!! If it is corrupted, |
|
2239 |
the MenuEditor may not be able to read the specification." |
|
2240 |
||
2241 |
" |
|
2242 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuColors |
|
2243 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuColors)) startUp |
|
2244 |
" |
|
2245 |
||
2246 |
<resource: #menu> |
|
2247 |
||
2248 |
^ |
|
2249 |
#(Menu |
|
2250 |
( |
|
2251 |
(MenuItem |
|
2767 | 2252 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2585 | 2253 |
label: 'Depth' |
2254 |
translateLabel: true |
|
2255 |
submenu: |
|
2256 |
(Menu |
|
2257 |
( |
|
2258 |
(MenuItem |
|
2259 |
activeHelpKey: colorMap1 |
|
2260 |
label: '1-Plane' |
|
2261 |
itemValue: colorMapMode: |
|
2262 |
translateLabel: true |
|
2263 |
argument: depth1 |
|
2264 |
choice: colorMapMode |
|
2265 |
choiceValue: depth1 |
|
2266 |
) |
|
2267 |
(MenuItem |
|
2268 |
activeHelpKey: colorMap1M |
|
2269 |
label: '1-Plane + Mask' |
|
2270 |
itemValue: colorMapMode: |
|
2271 |
translateLabel: true |
|
2272 |
argument: masked1 |
|
2273 |
choice: colorMapMode |
|
2274 |
choiceValue: masked1 |
|
2275 |
) |
|
2276 |
(MenuItem |
|
2277 |
label: '-' |
|
2278 |
) |
|
2279 |
(MenuItem |
|
2280 |
activeHelpKey: colorMap2 |
|
2281 |
label: '2-Plane' |
|
2282 |
itemValue: colorMapMode: |
|
2283 |
translateLabel: true |
|
2284 |
argument: depth2 |
|
2285 |
choice: colorMapMode |
|
2286 |
choiceValue: depth2 |
|
2287 |
) |
|
2288 |
(MenuItem |
|
2289 |
activeHelpKey: colorMap2M |
|
2290 |
label: '2-Plane + Mask' |
|
2291 |
itemValue: colorMapMode: |
|
2292 |
translateLabel: true |
|
2293 |
argument: masked2 |
|
2294 |
choice: colorMapMode |
|
2295 |
choiceValue: masked2 |
|
2296 |
) |
|
2297 |
(MenuItem |
|
2298 |
label: '-' |
|
2299 |
) |
|
2300 |
(MenuItem |
|
2301 |
activeHelpKey: colorMap4 |
|
2302 |
label: '4-Plane' |
|
2303 |
itemValue: colorMapMode: |
|
2304 |
translateLabel: true |
|
2305 |
argument: depth4 |
|
2306 |
choice: colorMapMode |
|
2307 |
choiceValue: depth4 |
|
2308 |
) |
|
2309 |
(MenuItem |
|
2310 |
activeHelpKey: colorMap4M |
|
2311 |
label: '4-Plane + Mask' |
|
2312 |
itemValue: colorMapMode: |
|
2313 |
translateLabel: true |
|
2314 |
argument: masked4 |
|
2315 |
choice: colorMapMode |
|
2316 |
choiceValue: masked4 |
|
2317 |
) |
|
2318 |
(MenuItem |
|
2319 |
label: '-' |
|
2320 |
) |
|
2321 |
(MenuItem |
|
2322 |
activeHelpKey: colorMap8 |
|
2323 |
label: '8-Plane' |
|
2324 |
itemValue: colorMapMode: |
|
2325 |
translateLabel: true |
|
2326 |
argument: depth8 |
|
2327 |
choice: colorMapMode |
|
2328 |
choiceValue: depth8 |
|
2329 |
) |
|
2330 |
(MenuItem |
|
2331 |
activeHelpKey: colorMap8M |
|
2332 |
label: '8-Plane + Mask' |
|
2333 |
itemValue: colorMapMode: |
|
2334 |
translateLabel: true |
|
2335 |
argument: masked8 |
|
2336 |
choice: colorMapMode |
|
2337 |
choiceValue: masked8 |
|
2338 |
) |
|
2339 |
(MenuItem |
|
2340 |
label: '-' |
|
2341 |
) |
|
2342 |
(MenuItem |
|
2343 |
activeHelpKey: colorMap16 |
|
2344 |
label: '16-Plane' |
|
2345 |
itemValue: colorMapMode: |
|
2346 |
translateLabel: true |
|
2347 |
argument: depth16 |
|
2348 |
choice: colorMapMode |
|
2349 |
choiceValue: depth16 |
|
2350 |
) |
|
2351 |
(MenuItem |
|
2352 |
activeHelpKey: colorMap16M |
|
2353 |
label: '16-Plane + Mask' |
|
2354 |
itemValue: colorMapMode: |
|
2355 |
translateLabel: true |
|
2356 |
argument: masked16 |
|
2357 |
choice: colorMapMode |
|
2358 |
choiceValue: masked16 |
|
2359 |
) |
|
2360 |
(MenuItem |
|
2361 |
label: '-' |
|
2362 |
) |
|
2363 |
(MenuItem |
|
2364 |
activeHelpKey: colorMap24 |
|
2365 |
label: '24-Plane' |
|
2366 |
itemValue: colorMapMode: |
|
2367 |
translateLabel: true |
|
2368 |
argument: depth24 |
|
2369 |
choice: colorMapMode |
|
2370 |
choiceValue: depth24 |
|
2371 |
) |
|
2372 |
(MenuItem |
|
2373 |
activeHelpKey: colorMap24M |
|
2374 |
label: '24-Plane + Mask' |
|
2375 |
itemValue: colorMapMode: |
|
2376 |
translateLabel: true |
|
2377 |
argument: masked24 |
|
2378 |
choice: colorMapMode |
|
2379 |
choiceValue: masked24 |
|
2380 |
) |
|
2381 |
(MenuItem |
|
2382 |
label: '-' |
|
2383 |
) |
|
2384 |
(MenuItem |
|
2385 |
activeHelpKey: colorMap32 |
|
2386 |
label: '32-Plane (rgba)' |
|
2387 |
itemValue: colorMapMode: |
|
2388 |
translateLabel: true |
|
2389 |
argument: depth32 |
|
2390 |
choice: colorMapMode |
|
2391 |
choiceValue: depth32 |
|
2392 |
) |
|
2393 |
) |
|
2394 |
nil |
|
2395 |
nil |
|
2396 |
) |
|
2397 |
) |
|
2398 |
(MenuItem |
|
2792 | 2399 |
enabled: imageIsLoadedHolder |
2585 | 2400 |
label: 'ColorMap' |
2401 |
translateLabel: true |
|
2402 |
submenu: |
|
2403 |
(Menu |
|
2404 |
( |
|
2405 |
(MenuItem |
|
2406 |
activeHelpKey: compressColormap |
|
2792 | 2407 |
enabled: hasColormapHolder |
2585 | 2408 |
label: 'Compress Colormap' |
2826 | 2409 |
itemValue: #'menu_compressColorMap' |
2585 | 2410 |
translateLabel: true |
2411 |
) |
|
2412 |
(MenuItem |
|
2792 | 2413 |
enabled: hasColormapHolder |
2585 | 2414 |
label: 'Sort Colormap' |
2826 | 2415 |
itemValue: #'menu_sortColorMap' |
2585 | 2416 |
translateLabel: true |
2417 |
) |
|
2418 |
(MenuItem |
|
2419 |
label: 'Reduce Number of Colors by Rounding...' |
|
2420 |
itemValue: reduceNumberOfColors2 |
|
2421 |
translateLabel: true |
|
2422 |
) |
|
2423 |
(MenuItem |
|
2424 |
label: 'Reduce Number of Colors by Masking Bits...' |
|
2425 |
itemValue: reduceNumberOfColors |
|
2426 |
translateLabel: true |
|
2427 |
) |
|
2428 |
(MenuItem |
|
2429 |
label: 'Dither to Depth...' |
|
2430 |
itemValue: ditherToDepth |
|
2431 |
translateLabel: true |
|
2432 |
) |
|
2433 |
(MenuItem |
|
2434 |
label: '-' |
|
2435 |
) |
|
2436 |
(MenuItem |
|
2792 | 2437 |
enabled: imageIsLoadedHolder |
2585 | 2438 |
label: 'Brighten' |
2439 |
itemValue: doBrightenImage |
|
2440 |
translateLabel: true |
|
2441 |
) |
|
2442 |
(MenuItem |
|
2792 | 2443 |
enabled: imageIsLoadedHolder |
2585 | 2444 |
label: 'Darken' |
2445 |
itemValue: doDarkenImage |
|
2446 |
translateLabel: true |
|
2447 |
) |
|
2652 | 2448 |
(MenuItem |
2792 | 2449 |
enabled: imageIsLoadedHolder |
2652 | 2450 |
label: 'Invert' |
2451 |
itemValue: doNegativeImage |
|
2452 |
translateLabel: true |
|
2453 |
) |
|
2585 | 2454 |
) |
2455 |
nil |
|
2456 |
nil |
|
2457 |
) |
|
2458 |
) |
|
2459 |
(MenuItem |
|
2792 | 2460 |
enabled: imageIsLoadedHolder |
2585 | 2461 |
label: 'Process' |
2462 |
translateLabel: true |
|
2463 |
submenu: |
|
2464 |
(Menu |
|
2465 |
( |
|
2466 |
(MenuItem |
|
2467 |
label: 'Make GrayScale' |
|
2468 |
itemValue: makeGrayScaleImage |
|
2469 |
translateLabel: true |
|
2470 |
) |
|
2471 |
(MenuItem |
|
2826 | 2472 |
enabled: allowedToChangeImageDimensionAndDepth |
2585 | 2473 |
label: 'Make dithered 8Bit Palette' |
2474 |
itemValue: makeDitheredPaletteImage |
|
2475 |
translateLabel: true |
|
2476 |
isVisible: false |
|
2477 |
) |
|
2478 |
(MenuItem |
|
2826 | 2479 |
label: 'Make Inverse' |
2480 |
itemValue: makeInverse |
|
2481 |
translateLabel: true |
|
2482 |
) |
|
2483 |
(MenuItem |
|
2484 |
label: '-' |
|
2485 |
) |
|
2486 |
(MenuItem |
|
2487 |
label: 'Make Slightly Brighter' |
|
2488 |
itemValue: makeSlightlyBrighter |
|
2489 |
translateLabel: true |
|
2490 |
) |
|
2491 |
(MenuItem |
|
2492 |
label: 'Make Slightly Darker' |
|
2493 |
itemValue: makeSlightlyDarker |
|
2494 |
translateLabel: true |
|
2495 |
) |
|
2496 |
(MenuItem |
|
2497 |
label: '-' |
|
2498 |
) |
|
2499 |
(MenuItem |
|
2585 | 2500 |
label: 'Make Brighter' |
2501 |
itemValue: makeBrighter |
|
2502 |
translateLabel: true |
|
2503 |
) |
|
2504 |
(MenuItem |
|
2505 |
label: 'Make Darker' |
|
2506 |
itemValue: makeDarker |
|
2507 |
translateLabel: true |
|
2508 |
) |
|
2509 |
(MenuItem |
|
2510 |
label: '-' |
|
2511 |
) |
|
2512 |
(MenuItem |
|
2513 |
label: 'Change HLS...' |
|
2514 |
itemValue: changeHLS |
|
2515 |
translateLabel: true |
|
2516 |
) |
|
2517 |
(MenuItem |
|
2518 |
label: 'Colorize...' |
|
2519 |
itemValue: colorize |
|
2520 |
translateLabel: true |
|
2521 |
) |
|
2522 |
) |
|
2523 |
nil |
|
2524 |
nil |
|
2525 |
) |
|
2526 |
) |
|
2527 |
(MenuItem |
|
2792 | 2528 |
enabled: imageIsLoadedHolder |
2585 | 2529 |
label: 'Mask' |
2530 |
translateLabel: true |
|
2531 |
submenu: |
|
2532 |
(Menu |
|
2533 |
( |
|
2534 |
(MenuItem |
|
2535 |
activeHelpKey: copyMask |
|
2536 |
enabled: hasMask |
|
2537 |
label: 'Copy Mask' |
|
2826 | 2538 |
itemValue: #'menu_copyMask' |
2585 | 2539 |
translateLabel: true |
2540 |
) |
|
2541 |
(MenuItem |
|
2542 |
activeHelpKey: pasteMask |
|
2543 |
enabled: hasMask |
|
2544 |
label: 'Paste Mask' |
|
2826 | 2545 |
itemValue: #'menu_pasteMask' |
2585 | 2546 |
translateLabel: true |
2547 |
) |
|
2548 |
(MenuItem |
|
2549 |
enabled: hasMask |
|
2550 |
label: 'Clear Masked Pixels' |
|
2826 | 2551 |
itemValue: #'menu_clearMaskedPixels' |
2652 | 2552 |
translateLabel: true |
2553 |
) |
|
2554 |
(MenuItem |
|
2555 |
enabled: hasMask |
|
2653 | 2556 |
label: 'Clear Colormap Entry for Masked Pixels' |
2826 | 2557 |
itemValue: #'menu_clearColormapEntry0AndMaskedPixels' |
2585 | 2558 |
translateLabel: true |
2559 |
) |
|
2560 |
) |
|
2561 |
nil |
|
2562 |
nil |
|
2563 |
) |
|
2564 |
) |
|
2565 |
) |
|
2566 |
nil |
|
2567 |
nil |
|
2568 |
) |
|
2569 |
! |
|
2570 |
||
2196 | 2571 |
menuEdit |
2572 |
"This resource specification was automatically generated |
|
2573 |
by the MenuEditor of ST/X." |
|
2574 |
||
2575 |
"Do not manually edit this!! If it is corrupted, |
|
2576 |
the MenuEditor may not be able to read the specification." |
|
2577 |
||
2578 |
" |
|
2579 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuEdit |
|
2580 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuEdit)) startUp |
|
2581 |
" |
|
2582 |
||
2583 |
<resource: #menu> |
|
2584 |
||
2585 |
^ |
|
2586 |
#(Menu |
|
2587 |
( |
|
2588 |
(MenuItem |
|
2589 |
activeHelpKey: editUndo |
|
2590 |
enabled: canUndoHolder |
|
2591 |
label: 'Undo' |
|
2592 |
itemValue: doUndo |
|
2593 |
translateLabel: true |
|
2594 |
) |
|
2595 |
(MenuItem |
|
2596 |
label: '-' |
|
2597 |
) |
|
2598 |
(MenuItem |
|
2812 | 2599 |
enabled: imageIsLoadedHolder |
2600 |
label: 'Copy to Clipboard' |
|
2601 |
itemValue: doCopyImageToClipboard |
|
2602 |
translateLabel: true |
|
2603 |
) |
|
2604 |
(MenuItem |
|
2605 |
label: '-' |
|
2606 |
) |
|
2607 |
(MenuItem |
|
2608 |
activeHelpKey: editResize |
|
2767 | 2609 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2610 |
label: 'Resize...' |
2611 |
itemValue: doResizeImage |
|
2612 |
translateLabel: true |
|
2613 |
) |
|
2614 |
(MenuItem |
|
2812 | 2615 |
activeHelpKey: editMagnifyImage |
2767 | 2616 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2617 |
label: 'Magnify...' |
2618 |
itemValue: doMagnifyImage |
|
2619 |
translateLabel: true |
|
2620 |
) |
|
2621 |
(MenuItem |
|
2812 | 2622 |
activeHelpKey: editMagnifyImage |
2767 | 2623 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2624 |
label: 'Magnify By...' |
2625 |
itemValue: doMagnifyImageBy |
|
2626 |
translateLabel: true |
|
2627 |
) |
|
2628 |
(MenuItem |
|
2812 | 2629 |
activeHelpKey: editRotate |
2767 | 2630 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2631 |
label: 'Rotate...' |
2632 |
itemValue: doRotateImage |
|
2633 |
translateLabel: true |
|
2634 |
) |
|
2635 |
(MenuItem |
|
2812 | 2636 |
activeHelpKey: edit3DProjection |
2767 | 2637 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2638 |
label: '3D Projection...' |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2639 |
itemValue: do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2640 |
translateLabel: true |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2641 |
) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2642 |
(MenuItem |
2792 | 2643 |
enabled: imageIsLoadedHolder |
2196 | 2644 |
label: 'Flip' |
2645 |
translateLabel: true |
|
2646 |
submenu: |
|
2647 |
(Menu |
|
2648 |
( |
|
2649 |
(MenuItem |
|
2650 |
activeHelpKey: editFlipVertical |
|
2812 | 2651 |
enabled: imageIsLoadedHolder |
2196 | 2652 |
label: 'Flip - Vertical' |
2653 |
itemValue: doFlipVertical |
|
2654 |
translateLabel: true |
|
2837 | 2655 |
labelImage: (ResourceRetriever ImageEditor flipVerticalIcon 'Flip - Vertical') |
2196 | 2656 |
) |
2657 |
(MenuItem |
|
2658 |
activeHelpKey: editFlipHorizontal |
|
2812 | 2659 |
enabled: imageIsLoadedHolder |
2196 | 2660 |
label: 'Flip - Horizontal' |
2661 |
itemValue: doFlipHorizontal |
|
2662 |
translateLabel: true |
|
2837 | 2663 |
labelImage: (ResourceRetriever ImageEditor flipHorizontalIcon 'Flip - Horizontal') |
2196 | 2664 |
) |
2665 |
) |
|
2666 |
nil |
|
2667 |
nil |
|
2668 |
) |
|
2669 |
) |
|
2670 |
(MenuItem |
|
2671 |
label: '-' |
|
2672 |
) |
|
2673 |
(MenuItem |
|
2767 | 2674 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2675 |
label: 'Crop' |
2676 |
translateLabel: true |
|
2677 |
submenu: |
|
2678 |
(Menu |
|
2679 |
( |
|
2680 |
(MenuItem |
|
2681 |
activeHelpKey: cropManual |
|
2682 |
label: 'Manual...' |
|
2683 |
itemValue: doCropManual |
|
2684 |
translateLabel: true |
|
2685 |
) |
|
2686 |
(MenuItem |
|
2687 |
label: '-' |
|
2688 |
) |
|
2689 |
(MenuItem |
|
2690 |
activeHelpKey: cropAll |
|
2691 |
label: 'All' |
|
2692 |
itemValue: doCropAll |
|
2693 |
translateLabel: true |
|
2694 |
) |
|
2695 |
(MenuItem |
|
2696 |
label: '-' |
|
2697 |
) |
|
2698 |
(MenuItem |
|
2699 |
activeHelpKey: cropLeft |
|
2700 |
label: 'Left' |
|
2701 |
itemValue: doCropLeft |
|
2702 |
translateLabel: true |
|
2703 |
) |
|
2704 |
(MenuItem |
|
2705 |
activeHelpKey: cropRight |
|
2706 |
label: 'Right' |
|
2707 |
itemValue: doCropRight |
|
2708 |
translateLabel: true |
|
2709 |
) |
|
2710 |
(MenuItem |
|
2711 |
activeHelpKey: cropTop |
|
2712 |
label: 'Top' |
|
2713 |
itemValue: doCropTop |
|
2714 |
translateLabel: true |
|
2715 |
) |
|
2716 |
(MenuItem |
|
2717 |
activeHelpKey: cropBottom |
|
2718 |
label: 'Bottom' |
|
2719 |
itemValue: doCropBottom |
|
2720 |
translateLabel: true |
|
2721 |
) |
|
2722 |
) |
|
2723 |
nil |
|
2724 |
nil |
|
2725 |
) |
|
2726 |
) |
|
2727 |
(MenuItem |
|
2812 | 2728 |
activeHelpKey: uncropManual |
2767 | 2729 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2730 |
label: 'Uncrop (Add Border)...' |
2731 |
itemValue: doUnCropManual |
|
2732 |
translateLabel: true |
|
2733 |
) |
|
2734 |
(MenuItem |
|
2812 | 2735 |
activeHelpKey: shiftManual |
2792 | 2736 |
enabled: imageIsLoadedHolder |
2196 | 2737 |
label: 'Shift...' |
2738 |
itemValue: doShiftManual |
|
2739 |
translateLabel: true |
|
2740 |
) |
|
2741 |
(MenuItem |
|
2742 |
label: '-' |
|
2743 |
) |
|
2744 |
(MenuItem |
|
2585 | 2745 |
activeHelpKey: fileEditMask |
2792 | 2746 |
enabled: imageIsLoadedHolder |
2585 | 2747 |
label: 'Edit Mask' |
2748 |
itemValue: doEditMask |
|
2749 |
translateLabel: true |
|
2750 |
) |
|
2751 |
(MenuItem |
|
2792 | 2752 |
enabled: imageIsLoadedHolder |
2196 | 2753 |
label: 'Text...' |
2754 |
itemValue: doInsertTextFromUser |
|
2755 |
translateLabel: true |
|
2756 |
) |
|
2812 | 2757 |
(MenuItem |
2758 |
label: '-' |
|
2759 |
) |
|
2760 |
(MenuItem |
|
2814 | 2761 |
label: 'Animation Sequence' |
2812 | 2762 |
translateLabel: true |
2763 |
submenu: |
|
2764 |
(Menu |
|
2765 |
( |
|
2766 |
(MenuItem |
|
2767 |
enabled: imageHasNextImageHolder |
|
2768 |
label: 'Next in Sequence' |
|
2769 |
itemValue: nextImageInSequence |
|
2770 |
translateLabel: true |
|
2771 |
) |
|
2772 |
(MenuItem |
|
2773 |
enabled: imageHasPreviousImageHolder |
|
2813 | 2774 |
label: 'Previous in Sequence' |
2812 | 2775 |
itemValue: previousImageInSequence |
2776 |
translateLabel: true |
|
2777 |
) |
|
2778 |
(MenuItem |
|
2779 |
label: '-' |
|
2780 |
) |
|
2781 |
(MenuItem |
|
2782 |
enabled: imageHasImageSequenceHolder |
|
2783 |
label: 'Edit each from Sequence' |
|
2784 |
itemValue: editEachImageFromSequence |
|
2785 |
translateLabel: true |
|
2786 |
) |
|
2787 |
) |
|
2788 |
nil |
|
2789 |
nil |
|
2790 |
) |
|
2791 |
) |
|
2196 | 2792 |
) |
2793 |
nil |
|
2794 |
nil |
|
2795 |
) |
|
2796 |
! |
|
2797 |
||
2798 |
menuFile |
|
2799 |
"This resource specification was automatically generated |
|
2800 |
by the MenuEditor of ST/X." |
|
2801 |
||
2802 |
"Do not manually edit this!! If it is corrupted, |
|
2803 |
the MenuEditor may not be able to read the specification." |
|
2804 |
||
3022 | 2805 |
|
2196 | 2806 |
" |
2807 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuFile |
|
2808 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuFile)) startUp |
|
2809 |
" |
|
2810 |
||
2811 |
<resource: #menu> |
|
2812 |
||
2813 |
^ |
|
2814 |
#(Menu |
|
2815 |
( |
|
2816 |
(MenuItem |
|
2817 |
activeHelpKey: fileNewImageEditor |
|
2818 |
label: 'New ImageEditor' |
|
2819 |
itemValue: doNewImageEditor |
|
2820 |
) |
|
2821 |
(MenuItem |
|
2876 | 2822 |
label: '-' |
2823 |
) |
|
2824 |
(MenuItem |
|
2196 | 2825 |
activeHelpKey: fileNewImage |
2826 |
label: 'New...' |
|
2827 |
itemValue: doNewImage |
|
2828 |
) |
|
2829 |
(MenuItem |
|
3200 | 2830 |
activeHelpKey: fileNewImageFromClipboard |
2196 | 2831 |
label: 'New from ClipBoard' |
2832 |
itemValue: doNewImageFromClipboard |
|
2833 |
) |
|
2834 |
(MenuItem |
|
3200 | 2835 |
activeHelpKey: fileNewMaskFromClipboard |
2836 |
label: 'Mask from ClipBoard' |
|
2837 |
itemValue: doNewMaskFromClipboard |
|
2838 |
) |
|
2839 |
(MenuItem |
|
2196 | 2840 |
label: '-' |
2841 |
) |
|
2842 |
(MenuItem |
|
2843 |
activeHelpKey: fileLoadFromClass |
|
2844 |
label: 'Load...' |
|
2845 |
itemValue: doLoadFromClass |
|
2846 |
) |
|
2847 |
(MenuItem |
|
2848 |
activeHelpKey: fileLoadFromFile |
|
2849 |
label: 'Load from File...' |
|
2850 |
itemValue: doLoadFromFile |
|
2851 |
) |
|
2852 |
(MenuItem |
|
2796 | 2853 |
activeHelpKey: fileLoadFromURL |
2854 |
label: 'Load from URL...' |
|
2855 |
itemValue: doLoadFromURL |
|
2856 |
) |
|
2857 |
(MenuItem |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2858 |
label: 'Grab' |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2859 |
submenu: |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2860 |
(Menu |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2861 |
( |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2862 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2863 |
activeHelpKey: fileGrabImageFromScreen |
2717 | 2864 |
label: 'Grab from Screen Area...' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2865 |
itemValue: grabScreenImage |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2866 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2867 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2868 |
activeHelpKey: fileGrabImageFromScreen |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2869 |
enabled: hasLastGrabScreenArea |
2711 | 2870 |
label: 'Grab again from same Screen Area' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2871 |
itemValue: grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2872 |
) |
2771 | 2873 |
(MenuItem |
2874 |
label: '-' |
|
2875 |
) |
|
2876 |
(MenuItem |
|
2877 |
activeHelpKey: fileGrabImageFromWindow |
|
2878 |
label: 'Grab from Window...' |
|
2879 |
itemValue: grabWindowImage |
|
2880 |
) |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2881 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2882 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2883 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2884 |
) |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
2885 |
) |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
2886 |
(MenuItem |
2196 | 2887 |
label: '-' |
2888 |
) |
|
2889 |
(MenuItem |
|
2890 |
activeHelpKey: fileSaveMethod |
|
2891 |
enabled: imageIsLoadedAndClassDefined |
|
2892 |
label: 'Save' |
|
2893 |
itemValue: doSaveMethod |
|
2894 |
) |
|
2895 |
(MenuItem |
|
2896 |
activeHelpKey: fileSaveMethodAs |
|
2792 | 2897 |
enabled: imageIsLoadedHolder |
2196 | 2898 |
label: 'Save As...' |
2899 |
itemValue: doSaveMethodAs |
|
2900 |
) |
|
2901 |
(MenuItem |
|
2902 |
activeHelpKey: fileSaveAs |
|
2792 | 2903 |
enabled: imageIsLoadedHolder |
2196 | 2904 |
label: 'Save to File...' |
2905 |
itemValue: doSaveImageFileAs |
|
2906 |
) |
|
2907 |
(MenuItem |
|
2908 |
activeHelpKey: fileSaveMaskAs |
|
2792 | 2909 |
enabled: imageIsLoadedHolder |
2196 | 2910 |
label: 'Save Mask to File...' |
2911 |
itemValue: doSaveImageMaskFileAs |
|
2912 |
) |
|
2913 |
(MenuItem |
|
2914 |
activeHelpKey: fileSaveButtonImageAs |
|
2792 | 2915 |
enabled: imageIsLoadedHolder |
2196 | 2916 |
label: 'Save as Button to File...' |
2917 |
itemValue: doSaveButtonImageToFileAs |
|
2918 |
) |
|
2919 |
(MenuItem |
|
2920 |
label: '-' |
|
2921 |
) |
|
2922 |
(MenuItem |
|
2923 |
activeHelpKey: filePrint |
|
2792 | 2924 |
enabled: imageIsLoadedHolder |
2196 | 2925 |
label: 'Print' |
2926 |
itemValue: doPrint |
|
2927 |
) |
|
2928 |
(MenuItem |
|
2929 |
label: '-' |
|
2930 |
isVisible: isStandAlone |
|
2931 |
) |
|
2932 |
(MenuItem |
|
2933 |
activeHelpKey: fileBrowseClass |
|
2792 | 2934 |
enabled: hasClassDefinedHolder |
2196 | 2935 |
label: 'Browse Class' |
2936 |
itemValue: doBrowseClass |
|
2937 |
isVisible: isStandAlone |
|
2938 |
) |
|
2939 |
(MenuItem |
|
2792 | 2940 |
enabled: imageIsLoadedHolder |
2196 | 2941 |
label: 'Inspect Image' |
2942 |
itemValue: doInspectImage |
|
2943 |
isVisible: isStandAlone |
|
2944 |
) |
|
2945 |
(MenuItem |
|
2585 | 2946 |
activeHelpKey: fileShowStoreString |
2792 | 2947 |
enabled: imageIsLoadedHolder |
2585 | 2948 |
label: 'Show storeString' |
2949 |
itemValue: doShowStoreString |
|
3022 | 2950 |
) |
2951 |
(MenuItem |
|
2952 |
activeHelpKey: fileShowStoreString |
|
2953 |
enabled: imageIsLoadedHolder |
|
2954 |
label: 'Show Pixel Array Literal String' |
|
2955 |
itemValue: doShowPixelArrayLiteralString |
|
2585 | 2956 |
) |
2957 |
(MenuItem |
|
2196 | 2958 |
label: '-' |
2959 |
isVisible: isStandAlone |
|
2960 |
) |
|
2961 |
(MenuItem |
|
2962 |
activeHelpKey: fileExit |
|
2963 |
label: 'Exit' |
|
2964 |
itemValue: closeRequest |
|
2965 |
isVisible: isStandAlone |
|
2966 |
) |
|
2967 |
) |
|
2968 |
nil |
|
2969 |
nil |
|
2970 |
) |
|
2971 |
! |
|
2972 |
||
679 | 2973 |
menuMouseButtonColors |
737 | 2974 |
"This resource specification was automatically generated |
2975 |
by the MenuEditor of ST/X." |
|
679 | 2976 |
|
737 | 2977 |
"Do not manually edit this!! If it is corrupted, |
2978 |
the MenuEditor may not be able to read the specification." |
|
679 | 2979 |
|
2980 |
" |
|
2981 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
2982 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
2983 |
" |
|
2984 |
||
2985 |
<resource: #menu> |
|
2986 |
||
2987 |
^ |
|
2988 |
||
2989 |
#(#Menu |
|
2990 |
||
2991 |
#( |
|
2992 |
#(#MenuItem |
|
2993 |
#label: 'Left Mouse Button' |
|
2994 |
#nameKey: #leftMouseKeyButton |
|
2995 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 2996 |
#enabled: #imageIsLoadedHolder |
679 | 2997 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 2998 |
#choice: #mouseKeyColorMode |
2999 |
#choiceValue: 1 |
|
679 | 3000 |
) |
3001 |
#(#MenuItem |
|
3002 |
#label: 'Right Mouse Button' |
|
3003 |
#nameKey: #rightMouseKeyButton |
|
3004 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 3005 |
#enabled: #imageIsLoadedHolder |
679 | 3006 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 3007 |
#choice: #mouseKeyColorMode |
3008 |
#choiceValue: 2 |
|
679 | 3009 |
) |
3010 |
) nil |
|
3011 |
nil |
|
3012 |
) |
|
2792 | 3013 |
|
3014 |
"Modified: / 04-07-2010 / 10:17:37 / cg" |
|
679 | 3015 |
! |
3016 |
||
2585 | 3017 |
menuSettings |
3018 |
"This resource specification was automatically generated |
|
3019 |
by the MenuEditor of ST/X." |
|
3020 |
||
3021 |
"Do not manually edit this!! If it is corrupted, |
|
3022 |
the MenuEditor may not be able to read the specification." |
|
3023 |
||
2881 | 3024 |
|
2585 | 3025 |
" |
3026 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuSettings |
|
3027 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuSettings)) startUp |
|
3028 |
" |
|
3029 |
||
3030 |
<resource: #menu> |
|
3031 |
||
3032 |
^ |
|
3033 |
#(Menu |
|
3034 |
( |
|
3035 |
(MenuItem |
|
3036 |
activeHelpKey: settingsGridMagnification |
|
3037 |
label: 'Grid Magnification Limit...' |
|
3038 |
itemValue: doChangeGridMagnification |
|
3039 |
translateLabel: true |
|
3040 |
) |
|
3041 |
(MenuItem |
|
3042 |
label: 'Pen' |
|
3043 |
translateLabel: true |
|
3044 |
submenu: |
|
3045 |
(Menu |
|
3046 |
( |
|
3047 |
(MenuItem |
|
3048 |
label: '1' |
|
3049 |
translateLabel: true |
|
2881 | 3050 |
choice: penWidthHolder |
3051 |
choiceValue: 1 |
|
2585 | 3052 |
) |
3053 |
(MenuItem |
|
3054 |
label: '5' |
|
3055 |
translateLabel: true |
|
2881 | 3056 |
choice: penWidthHolder |
3057 |
choiceValue: 5 |
|
2585 | 3058 |
) |
3059 |
(MenuItem |
|
3060 |
label: '10' |
|
3061 |
translateLabel: true |
|
2881 | 3062 |
choice: penWidthHolder |
3063 |
choiceValue: 10 |
|
2585 | 3064 |
) |
3065 |
) |
|
3066 |
nil |
|
3067 |
nil |
|
3068 |
) |
|
3069 |
) |
|
3070 |
(MenuItem |
|
3071 |
label: 'Spray' |
|
3072 |
translateLabel: true |
|
3073 |
submenu: |
|
3074 |
(Menu |
|
3075 |
( |
|
3076 |
(MenuItem |
|
3077 |
label: '4' |
|
3078 |
translateLabel: true |
|
2881 | 3079 |
choice: spraySpotHolder |
3080 |
choiceValue: 4 |
|
2585 | 3081 |
) |
3082 |
(MenuItem |
|
3083 |
label: '8' |
|
3084 |
translateLabel: true |
|
2881 | 3085 |
choice: spraySpotHolder |
3086 |
choiceValue: 8 |
|
2585 | 3087 |
) |
3088 |
(MenuItem |
|
3089 |
label: '16' |
|
3090 |
translateLabel: true |
|
2881 | 3091 |
choice: spraySpotHolder |
3092 |
choiceValue: 16 |
|
2585 | 3093 |
) |
3094 |
(MenuItem |
|
3095 |
label: '32' |
|
3096 |
translateLabel: true |
|
2881 | 3097 |
choice: spraySpotHolder |
3098 |
choiceValue: 32 |
|
2585 | 3099 |
) |
3100 |
) |
|
3101 |
nil |
|
3102 |
nil |
|
3103 |
) |
|
3104 |
) |
|
3105 |
) |
|
3106 |
nil |
|
3107 |
nil |
|
3108 |
) |
|
3109 |
! |
|
3110 |
||
400 | 3111 |
menuToolbar |
737 | 3112 |
"This resource specification was automatically generated |
3113 |
by the MenuEditor of ST/X." |
|
400 | 3114 |
|
737 | 3115 |
"Do not manually edit this!! If it is corrupted, |
3116 |
the MenuEditor may not be able to read the specification." |
|
400 | 3117 |
|
2876 | 3118 |
|
400 | 3119 |
" |
3120 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
3121 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
3122 |
" |
|
3123 |
||
3124 |
<resource: #menu> |
|
3125 |
||
1196 | 3126 |
^ |
1820 | 3127 |
#(Menu |
3128 |
( |
|
3129 |
(MenuItem |
|
3130 |
activeHelpKey: fileNewImage |
|
3131 |
label: 'newImage' |
|
3132 |
itemValue: doNewImage |
|
3133 |
translateLabel: true |
|
3134 |
isButton: true |
|
1883 | 3135 |
labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon) |
1196 | 3136 |
) |
1820 | 3137 |
(MenuItem |
2876 | 3138 |
activeHelpKey: fileGrabImageFromScreen |
3139 |
label: 'grabScreenImage' |
|
3140 |
itemValue: grabScreenImage |
|
3141 |
translateLabel: true |
|
3142 |
isButton: true |
|
2877 | 3143 |
labelImage: (ResourceRetriever ToolbarIconLibrary snapshot24x24Icon) |
2876 | 3144 |
) |
3145 |
(MenuItem |
|
1949 | 3146 |
label: '-' |
3147 |
) |
|
3148 |
(MenuItem |
|
1970 | 3149 |
activeHelpKey: fileLoadFromClass |
3150 |
label: 'loadFromClass' |
|
3151 |
itemValue: doLoadFromClass |
|
3152 |
translateLabel: true |
|
3153 |
isButton: true |
|
1975 | 3154 |
isVisible: isStandAlone |
1970 | 3155 |
submenuChannel: menuHistory |
3156 |
labelImage: (ResourceRetriever XPToolbarIconLibrary loadImageFromMethodIcon) |
|
3157 |
keepLinkedMenu: true |
|
3158 |
) |
|
3159 |
(MenuItem |
|
2567 | 3160 |
activeHelpKey: fileSaveMethodAs |
2792 | 3161 |
enabled: imageIsLoadedHolder |
2567 | 3162 |
label: 'fileSaveMethodAs' |
1970 | 3163 |
itemValue: doSaveMethodAs |
3164 |
translateLabel: true |
|
3165 |
isButton: true |
|
1975 | 3166 |
isVisible: isStandAlone |
1970 | 3167 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon) |
3168 |
) |
|
3169 |
(MenuItem |
|
3170 |
activeHelpKey: fileSaveMethod |
|
2792 | 3171 |
enabled: imageIsLoadedHolder |
1970 | 3172 |
label: 'saveAsMethod' |
3173 |
itemValue: doSaveMethod |
|
3174 |
translateLabel: true |
|
3175 |
isButton: true |
|
1975 | 3176 |
isVisible: isNotStandAlone |
2590 | 3177 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodIcon) |
1970 | 3178 |
) |
3179 |
(MenuItem |
|
3180 |
label: '-' |
|
3181 |
) |
|
3182 |
(MenuItem |
|
1820 | 3183 |
activeHelpKey: fileLoadFromFile |
3184 |
label: 'loadFromFile' |
|
3185 |
itemValue: doLoadFromFile |
|
3186 |
translateLabel: true |
|
3187 |
isButton: true |
|
1884 | 3188 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon) |
1820 | 3189 |
) |
3190 |
(MenuItem |
|
3191 |
activeHelpKey: fileSaveAs |
|
2792 | 3192 |
enabled: imageIsLoadedHolder |
1820 | 3193 |
label: 'saveAsFile' |
3194 |
itemValue: doSaveImageFileAs |
|
3195 |
translateLabel: true |
|
3196 |
isButton: true |
|
1885 | 3197 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon) |
1820 | 3198 |
) |
3199 |
(MenuItem |
|
1949 | 3200 |
label: '-' |
1196 | 3201 |
) |
1820 | 3202 |
(MenuItem |
3203 |
activeHelpKey: editUndo |
|
1987 | 3204 |
enabled: canUndoHolder |
1820 | 3205 |
label: 'Undo' |
3206 |
itemValue: doUndo |
|
3207 |
translateLabel: true |
|
3208 |
isButton: true |
|
1883 | 3209 |
labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
1196 | 3210 |
) |
2812 | 3211 |
(MenuItem |
3212 |
label: '-' |
|
3213 |
isVisible: imageHasImageSequenceHolder |
|
3214 |
) |
|
3215 |
(MenuItem |
|
3216 |
activeHelpKey: previousImageInSequence |
|
3217 |
enabled: imageHasPreviousImageHolder |
|
3218 |
label: 'Previous Image' |
|
3219 |
itemValue: previousImageInSequence |
|
3220 |
translateLabel: true |
|
3221 |
isVisible: imageHasImageSequenceHolder |
|
3222 |
labelImage: (ResourceRetriever ToolbarIconLibrary leftArrow24x24Icon) |
|
3223 |
) |
|
3224 |
(MenuItem |
|
3225 |
activeHelpKey: nextImageInSequence |
|
3226 |
enabled: imageHasNextImageHolder |
|
3227 |
label: 'Next Image' |
|
3228 |
itemValue: nextImageInSequence |
|
3229 |
translateLabel: true |
|
3230 |
isVisible: imageHasImageSequenceHolder |
|
3231 |
labelImage: (ResourceRetriever ToolbarIconLibrary rightArrow24x24Icon) |
|
3232 |
) |
|
1637 | 3233 |
) |
3234 |
nil |
|
3235 |
nil |
|
3236 |
) |
|
3237 |
! |
|
3238 |
||
3239 |
modeMenu |
|
3240 |
"This resource specification was automatically generated |
|
3241 |
by the MenuEditor of ST/X." |
|
3242 |
||
3243 |
"Do not manually edit this!! If it is corrupted, |
|
3244 |
the MenuEditor may not be able to read the specification." |
|
3245 |
||
3246 |
" |
|
3247 |
MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu |
|
3248 |
(Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp |
|
3249 |
" |
|
3250 |
||
3251 |
<resource: #menu> |
|
3252 |
||
3253 |
^ |
|
2592 | 3254 |
#(Menu |
3255 |
( |
|
3256 |
(MenuItem |
|
3257 |
activeHelpKey: drawModePoint |
|
2792 | 3258 |
enabled: imageIsLoadedHolder |
2592 | 3259 |
label: 'Point' |
3260 |
translateLabel: true |
|
3261 |
labelImage: (ResourceRetriever ImageEditor pointIcon 'Point') |
|
3262 |
choice: editMode |
|
3263 |
choiceValue: point |
|
3264 |
) |
|
3265 |
(MenuItem |
|
3266 |
activeHelpKey: drawModePoint |
|
2792 | 3267 |
enabled: imageIsLoadedHolder |
2592 | 3268 |
label: 'Spray' |
3269 |
translateLabel: true |
|
3270 |
labelImage: (ResourceRetriever ImageEditor sprayIcon 'Spray') |
|
3271 |
choice: editMode |
|
3272 |
choiceValue: spray |
|
1196 | 3273 |
) |
2592 | 3274 |
(MenuItem |
3191 | 3275 |
activeHelpKey: drawModeSmooth |
3276 |
enabled: imageIsLoadedHolder |
|
3277 |
label: 'Smooth' |
|
3278 |
translateLabel: true |
|
3279 |
labelImage: (ResourceRetriever ImageEditor smoothIcon 'Smooth') |
|
3280 |
choice: editMode |
|
3281 |
choiceValue: smooth |
|
3282 |
) |
|
3283 |
(MenuItem |
|
2592 | 3284 |
activeHelpKey: drawModeBox |
2792 | 3285 |
enabled: imageIsLoadedHolder |
2592 | 3286 |
label: 'Rect' |
3287 |
translateLabel: true |
|
3288 |
labelImage: (ResourceRetriever ImageEditor rectIcon 'Rect') |
|
3289 |
choice: editMode |
|
3290 |
choiceValue: box |
|
1196 | 3291 |
) |
2592 | 3292 |
(MenuItem |
3293 |
activeHelpKey: drawModeFilledBox |
|
2792 | 3294 |
enabled: imageIsLoadedHolder |
2592 | 3295 |
label: 'Filled Rectangle' |
3296 |
translateLabel: true |
|
3297 |
labelImage: (ResourceRetriever ImageEditor fillRectIcon 'Filled Rectangle') |
|
3298 |
choice: editMode |
|
3299 |
choiceValue: filledBox |
|
1196 | 3300 |
) |
2592 | 3301 |
(MenuItem |
3302 |
activeHelpKey: drawModeBox |
|
2792 | 3303 |
enabled: imageIsLoadedHolder |
2592 | 3304 |
label: 'Circle' |
3305 |
translateLabel: true |
|
3306 |
labelImage: (ResourceRetriever ImageEditor circleIcon 'Circle') |
|
3307 |
choice: editMode |
|
3308 |
choiceValue: circle |
|
1196 | 3309 |
) |
2592 | 3310 |
(MenuItem |
3311 |
activeHelpKey: drawModeFill |
|
2792 | 3312 |
enabled: imageIsLoadedHolder |
2592 | 3313 |
label: 'Fill' |
3314 |
translateLabel: true |
|
3315 |
labelImage: (ResourceRetriever ImageEditor fillIcon 'Fill') |
|
3316 |
choice: editMode |
|
3317 |
choiceValue: fill |
|
1196 | 3318 |
) |
2592 | 3319 |
(MenuItem |
3320 |
activeHelpKey: drawModeCopy |
|
2792 | 3321 |
enabled: imageIsLoadedHolder |
2592 | 3322 |
label: 'Copy' |
3323 |
translateLabel: true |
|
3324 |
labelImage: (ResourceRetriever ImageEditor copyIcon 'Copy') |
|
3325 |
choice: editMode |
|
3326 |
choiceValue: copy |
|
3327 |
) |
|
3328 |
(MenuItem |
|
3329 |
activeHelpKey: drawModePaste |
|
2792 | 3330 |
enabled: imageIsLoadedHolder |
2592 | 3331 |
label: 'Paste' |
3332 |
translateLabel: true |
|
3333 |
labelImage: (ResourceRetriever ImageEditor pasteIcon 'Paste') |
|
3334 |
choice: editMode |
|
3335 |
choiceValue: paste |
|
1196 | 3336 |
) |
2592 | 3337 |
(MenuItem |
3338 |
activeHelpKey: drawModePasteUnder |
|
2792 | 3339 |
enabled: imageIsLoadedHolder |
2592 | 3340 |
label: 'Paste Under' |
3341 |
translateLabel: true |
|
3342 |
labelImage: (ResourceRetriever ImageEditor pasteUnderIcon 'Paste Under') |
|
3343 |
choice: editMode |
|
3344 |
choiceValue: pasteUnder |
|
1196 | 3345 |
) |
2592 | 3346 |
(MenuItem |
3347 |
activeHelpKey: drawModePasteWithMask |
|
2792 | 3348 |
enabled: imageIsLoadedHolder |
2592 | 3349 |
label: 'Paste with Mask' |
3350 |
translateLabel: true |
|
3351 |
labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon 'Paste with Mask') |
|
3352 |
choice: editMode |
|
3353 |
choiceValue: pasteWithMask |
|
1579 | 3354 |
) |
2592 | 3355 |
(MenuItem |
3356 |
activeHelpKey: drawModeSpecial |
|
2792 | 3357 |
enabled: imageIsLoadedHolder |
2592 | 3358 |
label: 'Special' |
3359 |
translateLabel: true |
|
3360 |
labelImage: (ResourceRetriever ImageEditor specialIcon 'Special') |
|
3361 |
choice: editMode |
|
3362 |
choiceValue: specialOperation |
|
1411 | 3363 |
) |
1196 | 3364 |
) |
3365 |
nil |
|
3366 |
nil |
|
400 | 3367 |
) |
2792 | 3368 |
|
3369 |
"Modified: / 04-07-2010 / 10:18:08 / cg" |
|
1558 | 3370 |
! |
3371 |
||
3372 |
previewMenu |
|
3373 |
"This resource specification was automatically generated |
|
3374 |
by the MenuEditor of ST/X." |
|
3375 |
||
3376 |
"Do not manually edit this!! If it is corrupted, |
|
3377 |
the MenuEditor may not be able to read the specification." |
|
3378 |
||
3379 |
" |
|
3380 |
MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu |
|
3381 |
(Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp |
|
3382 |
" |
|
3383 |
||
3384 |
<resource: #menu> |
|
3385 |
||
3386 |
^ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3387 |
#(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3388 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3389 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3390 |
label: 'TileMode' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3391 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3392 |
indication: tileModeHolder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3393 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3394 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3395 |
label: '-' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3396 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3397 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3398 |
label: 'Background Color' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3399 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3400 |
submenu: |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3401 |
(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3402 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3403 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3404 |
label: 'Gray' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3405 |
translateLabel: true |
2792 | 3406 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3407 |
choiceValue: nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3408 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3409 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3410 |
label: 'Black' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3411 |
translateLabel: true |
2792 | 3412 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3413 |
choiceValue: black |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3414 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3415 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3416 |
label: 'White' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3417 |
translateLabel: true |
2792 | 3418 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3419 |
choiceValue: white |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3420 |
) |
1774 | 3421 |
(MenuItem |
3422 |
label: '-' |
|
3423 |
) |
|
3424 |
(MenuItem |
|
3425 |
label: 'Red' |
|
3426 |
translateLabel: true |
|
2792 | 3427 |
choice: previewBackgroundColorHolder |
1774 | 3428 |
choiceValue: red |
3429 |
) |
|
3430 |
(MenuItem |
|
3431 |
label: 'Green' |
|
3432 |
translateLabel: true |
|
2792 | 3433 |
choice: previewBackgroundColorHolder |
1774 | 3434 |
choiceValue: green |
3435 |
) |
|
3436 |
(MenuItem |
|
3437 |
label: 'Blue' |
|
3438 |
translateLabel: true |
|
2792 | 3439 |
choice: previewBackgroundColorHolder |
1774 | 3440 |
choiceValue: blue |
3441 |
) |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3442 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3443 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3444 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3445 |
) |
1558 | 3446 |
) |
3447 |
) |
|
3448 |
nil |
|
3449 |
nil |
|
3450 |
) |
|
2792 | 3451 |
|
3452 |
"Modified: / 04-07-2010 / 10:20:09 / cg" |
|
1637 | 3453 |
! |
3454 |
||
3455 |
toolsMenuToolbar |
|
3456 |
"This resource specification was automatically generated |
|
3457 |
by the MenuEditor of ST/X." |
|
3458 |
||
3459 |
"Do not manually edit this!! If it is corrupted, |
|
3460 |
the MenuEditor may not be able to read the specification." |
|
3461 |
||
2881 | 3462 |
|
1637 | 3463 |
" |
3464 |
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar |
|
3465 |
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp |
|
3466 |
" |
|
3467 |
||
3468 |
<resource: #menu> |
|
3469 |
||
3470 |
^ |
|
2881 | 3471 |
#(Menu |
3472 |
( |
|
3473 |
(MenuItem |
|
3474 |
activeHelpKey: drawModePoint |
|
3475 |
enabled: imageIsLoadedHolder |
|
3476 |
label: 'Point' |
|
3477 |
translateLabel: true |
|
3478 |
isButton: true |
|
3479 |
labelImage: (ResourceRetriever ImageEditor pointIcon) |
|
3480 |
choice: editMode |
|
3481 |
choiceValue: point |
|
1637 | 3482 |
) |
2881 | 3483 |
(MenuItem |
3484 |
activeHelpKey: drawModeSpray |
|
3485 |
enabled: imageIsLoadedHolder |
|
3486 |
label: 'Spray' |
|
3487 |
translateLabel: true |
|
3488 |
isButton: true |
|
3489 |
labelImage: (ResourceRetriever ImageEditor sprayIcon) |
|
3490 |
choice: editMode |
|
3491 |
choiceValue: spray |
|
2375 | 3492 |
) |
2881 | 3493 |
(MenuItem |
3494 |
activeHelpKey: drawModeBox |
|
3495 |
enabled: imageIsLoadedHolder |
|
3496 |
label: 'Rect' |
|
3497 |
translateLabel: true |
|
3498 |
isButton: true |
|
3499 |
labelImage: (ResourceRetriever ImageEditor rectIcon) |
|
3500 |
choice: editMode |
|
3501 |
choiceValue: box |
|
1637 | 3502 |
) |
2881 | 3503 |
(MenuItem |
3504 |
activeHelpKey: drawModeFilledBox |
|
3505 |
enabled: imageIsLoadedHolder |
|
3506 |
label: 'FillRect' |
|
3507 |
translateLabel: true |
|
3508 |
isButton: true |
|
3509 |
labelImage: (ResourceRetriever ImageEditor fillRectIcon) |
|
3510 |
choice: editMode |
|
3511 |
choiceValue: filledBox |
|
1637 | 3512 |
) |
2881 | 3513 |
(MenuItem |
3514 |
activeHelpKey: drawModeCircle |
|
3515 |
enabled: imageIsLoadedHolder |
|
3516 |
label: 'Circle' |
|
3517 |
translateLabel: true |
|
3518 |
isButton: true |
|
3519 |
labelImage: (ResourceRetriever ImageEditor circleIcon) |
|
3520 |
choice: editMode |
|
3521 |
choiceValue: circle |
|
2375 | 3522 |
) |
2881 | 3523 |
(MenuItem |
3524 |
activeHelpKey: drawModeFill |
|
3525 |
enabled: imageIsLoadedHolder |
|
3526 |
label: 'Fill' |
|
3527 |
translateLabel: true |
|
3528 |
isButton: true |
|
3529 |
labelImage: (ResourceRetriever ImageEditor fillIcon) |
|
3530 |
choice: editMode |
|
3531 |
choiceValue: fill |
|
1637 | 3532 |
) |
2881 | 3533 |
(MenuItem |
3534 |
activeHelpKey: drawModeCopy |
|
3535 |
enabled: imageIsLoadedHolder |
|
3536 |
label: 'Copy' |
|
3537 |
translateLabel: true |
|
3538 |
isButton: true |
|
3539 |
labelImage: (ResourceRetriever ImageEditor copyIcon) |
|
3540 |
choice: editMode |
|
3541 |
choiceValue: copy |
|
1637 | 3542 |
) |
2881 | 3543 |
(MenuItem |
3544 |
activeHelpKey: drawModePasteWithMask |
|
3545 |
enabled: imageIsLoadedHolder |
|
3546 |
label: 'Paste With Mask' |
|
3547 |
translateLabel: true |
|
3548 |
isButton: true |
|
3549 |
labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon) |
|
3550 |
choice: editMode |
|
3551 |
choiceValue: pasteWithMask |
|
1637 | 3552 |
) |
2881 | 3553 |
(MenuItem |
3554 |
activeHelpKey: drawModePaste |
|
3555 |
enabled: imageIsLoadedHolder |
|
3556 |
label: 'Paste' |
|
3557 |
translateLabel: true |
|
3558 |
isButton: true |
|
3559 |
labelImage: (ResourceRetriever ImageEditor pasteIcon) |
|
3560 |
choice: editMode |
|
3561 |
choiceValue: paste |
|
1637 | 3562 |
) |
2881 | 3563 |
(MenuItem |
3564 |
activeHelpKey: drawModePasteUnder |
|
3565 |
enabled: imageIsLoadedHolder |
|
3566 |
label: 'Paste Under' |
|
3567 |
translateLabel: true |
|
3568 |
isButton: true |
|
3569 |
labelImage: (ResourceRetriever ImageEditor pasteUnderIcon) |
|
3570 |
choice: editMode |
|
3571 |
choiceValue: pasteUnder |
|
1637 | 3572 |
) |
2881 | 3573 |
(MenuItem |
3574 |
activeHelpKey: drawModeSpecial |
|
3575 |
enabled: imageIsLoadedHolder |
|
3576 |
label: 'Special' |
|
3577 |
translateLabel: true |
|
3578 |
isButton: true |
|
3579 |
labelImage: (ResourceRetriever ImageEditor specialIcon) |
|
3580 |
choice: editMode |
|
3581 |
choiceValue: specialOperation |
|
1637 | 3582 |
) |
3583 |
) |
|
3584 |
nil |
|
3585 |
nil |
|
3586 |
) |
|
400 | 3587 |
! ! |
3588 |
||
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3589 |
!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
|
3590 |
|
1900 | 3591 |
colorTableColumns |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3592 |
"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
|
3593 |
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
|
3594 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3595 |
"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
|
3596 |
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
|
3597 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3598 |
" |
1975 | 3599 |
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
|
3600 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3601 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3602 |
<resource: #tableColumns> |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3603 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3604 |
^#( |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3605 |
(DataSetColumnSpec |
2174 | 3606 |
activeHelpKey: '' |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3607 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3608 |
rendererType: rowSelector |
2712 | 3609 |
backgroundSelector: theColorItself: |
3610 |
selectedBackgroundSelector: theColorItself: |
|
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3611 |
isResizeable: false |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3612 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3613 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3614 |
label: 'R' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3615 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3616 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3617 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3618 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3619 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3620 |
model: redFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3621 |
writeSelector: redAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3622 |
selectSelector: canSelectRedInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3623 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3624 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3625 |
label: 'G' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3626 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3627 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3628 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3629 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3630 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3631 |
model: greenFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3632 |
writeSelector: greenAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3633 |
selectSelector: canSelectGreenInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3634 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3635 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3636 |
label: 'B' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3637 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3638 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3639 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3640 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3641 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3642 |
model: blueFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3643 |
writeSelector: blueAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3644 |
selectSelector: canSelectBlueInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3645 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3646 |
) |
2174 | 3647 |
|
3648 |
"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
|
3649 |
! ! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3650 |
|
400 | 3651 |
!ImageEditor methodsFor:'accessing'! |
3652 |
||
3653 |
image |
|
767 | 3654 |
"returns the current editing image" |
400 | 3655 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3656 |
^ imageEditView image |
400 | 3657 |
! |
3658 |
||
3659 |
postOpenAction: anAction |
|
767 | 3660 |
"sets an action which is evaluated after opening" |
400 | 3661 |
|
3662 |
postOpenAction := anAction |
|
1381 | 3663 |
! |
3664 |
||
3665 |
resourceClass:aClass |
|
3666 |
imageEditView resourceClass:aClass |
|
400 | 3667 |
! ! |
3668 |
||
2767 | 3669 |
!ImageEditor methodsFor:'accessing-behavior'! |
3670 |
||
3671 |
allowedToChangeImageDimensionAndDepth |
|
3672 |
"used to edit an existing image's contents only (Expecco)" |
|
3673 |
||
3674 |
^ allowedToChangeImageDimensionAndDepth ? true |
|
3675 |
! |
|
3676 |
||
3677 |
allowedToChangeImageDimensionAndDepth:aBoolean |
|
3678 |
"used to edit an existing image's contents only (Expecco)" |
|
3679 |
||
3680 |
allowedToChangeImageDimensionAndDepth := aBoolean |
|
3681 |
! ! |
|
3682 |
||
1398 | 3683 |
!ImageEditor methodsFor:'accessing-views'! |
400 | 3684 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3685 |
colorDataSetView |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3686 |
"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
|
3687 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3688 |
^(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
|
3689 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3690 |
"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
|
3691 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3692 |
|
487 | 3693 |
coordLabel |
767 | 3694 |
"returns the view the coord label" |
487 | 3695 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3696 |
^self componentAt: #coordLabel |
487 | 3697 |
! |
3698 |
||
400 | 3699 |
imageEditView |
911 | 3700 |
"returns the view of the image" |
400 | 3701 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3702 |
imageEditView isNil ifTrue:[ |
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3703 |
imageEditView := (self componentAt: #imageEditView) scrolledView. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3704 |
imageEditView addDependent:self. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3705 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3706 |
^ imageEditView |
1345 | 3707 |
|
3708 |
"Modified: / 10.2.2000 / 23:19:20 / cg" |
|
400 | 3709 |
! |
3710 |
||
3711 |
imagePreView |
|
767 | 3712 |
"returns the preview of the image" |
400 | 3713 |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3714 |
|imagePreViewSubViews| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3715 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3716 |
imagePreViewSubViews := (self componentAt: #imagePreView) subViews. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3717 |
|
2043 | 3718 |
"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
|
3719 |
imagePreViewSubViews isEmptyOrNil ifTrue:[ |
2043 | 3720 |
^ nil |
3721 |
]. |
|
3722 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3723 |
^ imagePreViewSubViews first |
475 | 3724 |
! ! |
3725 |
||
400 | 3726 |
!ImageEditor methodsFor:'aspects'! |
3727 |
||
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3728 |
activityInfoHolder |
1987 | 3729 |
^ self infoLabelHolder |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3730 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3731 |
"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
|
3732 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3733 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3734 |
colorColumnAdaptor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3735 |
^ self |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3736 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3737 |
"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
|
3738 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3739 |
|
2792 | 3740 |
hasClassAndSelectorDefinedHolder |
1054 | 3741 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3742 |
|cls| |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3743 |
|
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3744 |
(cls := imageEditView resourceClass) notNil |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3745 |
and:[imageEditView resourceSelector notNil] |
1054 | 3746 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3747 |
|
2792 | 3748 |
"Created: / 04-07-2010 / 10:11:10 / cg" |
3749 |
! |
|
3750 |
||
3751 |
hasClassDefinedHolder |
|
1054 | 3752 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3753 |
imageEditView resourceClass notNil |
1054 | 3754 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3755 |
|
2792 | 3756 |
"Created: / 04-07-2010 / 10:11:47 / cg" |
3757 |
! |
|
3758 |
||
3759 |
hasColorSelectedHolder |
|
3195 | 3760 |
^ [ self selectedColors value notEmptyOrNil "self selectedColorIndexOrNil notNil" ] |
2792 | 3761 |
|
3762 |
"Created: / 04-07-2010 / 10:12:22 / cg" |
|
2651 | 3763 |
! |
3764 |
||
1008 | 3765 |
hasColormap |
2792 | 3766 |
^ self image notNil and:[self image colorMap notNil] |
3767 |
||
3768 |
"Created: / 30-09-1998 / 23:53:55 / cg" |
|
3769 |
"Modified: / 04-07-2010 / 10:13:26 / cg" |
|
1008 | 3770 |
! |
3771 |
||
2651 | 3772 |
hasColormapAndColorSelected |
2792 | 3773 |
^ [ self hasColormapHolder value and:[self hasColorSelectedHolder value]] |
3774 |
||
3775 |
"Modified: / 04-07-2010 / 10:13:13 / cg" |
|
3776 |
! |
|
3777 |
||
3195 | 3778 |
hasColormapAndSingleColorSelected |
3779 |
^ [ self hasColormapHolder value and:[self hasSingleColorSelectedHolder value]] |
|
3780 |
||
3781 |
"Modified: / 04-07-2010 / 10:13:13 / cg" |
|
3782 |
! |
|
3783 |
||
2792 | 3784 |
hasColormapHolder |
3785 |
^ [self hasColormap] |
|
3786 |
||
3787 |
"Created: / 04-07-2010 / 10:13:05 / cg" |
|
3788 |
! |
|
3789 |
||
3195 | 3790 |
hasSingleColorSelectedHolder |
3791 |
^ [ self selectedColors value size == 1 "self selectedColorIndexOrNil notNil" ] |
|
3792 |
||
3793 |
"Created: / 04-07-2010 / 10:12:22 / cg" |
|
3794 |
! |
|
3795 |
||
2812 | 3796 |
imageHasImageSequence |
3080 | 3797 |
|img| |
3798 |
||
3799 |
^ (img := self image) notNil and:[img imageSequence notNil] |
|
2812 | 3800 |
|
3801 |
"Created: / 21-10-2010 / 14:35:45 / cg" |
|
3802 |
! |
|
3803 |
||
3804 |
imageHasImageSequenceHolder |
|
3805 |
|holder| |
|
3806 |
||
3807 |
(holder := builder bindingAt:#imageHasImageSequenceHolder) isNil ifTrue:[ |
|
3808 |
builder aspectAt:#imageHasImageSequenceHolder put:(holder := false asValue). |
|
3809 |
holder value:(self imageHasImageSequence). |
|
3810 |
]. |
|
3811 |
^ holder |
|
3812 |
||
3813 |
"Modified: / 21-10-2010 / 14:36:57 / cg" |
|
3814 |
! |
|
3815 |
||
3816 |
imageHasNextImage |
|
3817 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) < self image imageSequence size ] |
|
3818 |
||
3819 |
"Created: / 21-10-2010 / 14:37:10 / cg" |
|
3820 |
! |
|
3821 |
||
2792 | 3822 |
imageHasNextImageHolder |
2812 | 3823 |
|holder| |
3824 |
||
3825 |
(holder := builder bindingAt:#imageHasNextImageHolder) isNil ifTrue:[ |
|
3826 |
builder aspectAt:#imageHasNextImageHolder put:(holder := false asValue). |
|
3827 |
holder value:(self imageHasNextImage). |
|
3828 |
]. |
|
3829 |
^ holder |
|
3830 |
||
3831 |
"Modified: / 21-10-2010 / 14:37:40 / cg" |
|
3832 |
! |
|
3833 |
||
3834 |
imageHasPreviousImage |
|
3835 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) > 1 ] |
|
3836 |
||
3837 |
"Created: / 21-10-2010 / 14:37:21 / cg" |
|
3838 |
! |
|
3839 |
||
3840 |
imageHasPreviousImageHolder |
|
3841 |
|holder| |
|
3842 |
||
3843 |
(holder := builder bindingAt:#imageHasPreviousImageHolder) isNil ifTrue:[ |
|
3844 |
builder aspectAt:#imageHasPreviousImageHolder put:(holder := false asValue). |
|
3845 |
holder value:(self imageHasPreviousImage). |
|
3846 |
]. |
|
3847 |
^ holder |
|
3848 |
||
3849 |
"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
|
3850 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
3851 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3852 |
imageInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3853 |
|holder| |
2792 | 3854 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3855 |
(holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3856 |
builder aspectAt:#imageInfoHolder put:(holder := '' asValue). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3857 |
]. |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3858 |
^ holder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3859 |
|
2792 | 3860 |
"Modified: / 04-07-2010 / 10:15:14 / cg" |
400 | 3861 |
! |
3862 |
||
2767 | 3863 |
imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
3864 |
"returns whether an image is loaded as value holder" |
|
3865 |
||
3866 |
^ [ |
|
2792 | 3867 |
self imageIsLoadedHolder value |
2767 | 3868 |
and:[ self allowedToChangeImageDimensionAndDepth ] |
3869 |
] |
|
2792 | 3870 |
|
3871 |
"Modified: / 04-07-2010 / 10:15:43 / cg" |
|
2767 | 3872 |
! |
3873 |
||
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3874 |
imageIsLoadedAndClassDefined |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3875 |
"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
|
3876 |
|
2792 | 3877 |
^ [self hasClassAndSelectorDefinedHolder value |
3878 |
and:[self imageIsLoadedHolder value]] |
|
3879 |
||
3880 |
"Created: / 31-07-1998 / 02:04:18 / cg" |
|
3881 |
"Modified: / 04-07-2010 / 10:15:48 / cg" |
|
3882 |
! |
|
3883 |
||
3884 |
imageIsLoadedHolder |
|
3885 |
"returns whether an image is loaded as value holder" |
|
3886 |
||
3887 |
|holder| |
|
3888 |
||
3889 |
(holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
3890 |
builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
3891 |
]. |
|
3892 |
^ holder |
|
3893 |
||
3894 |
"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
|
3895 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3896 |
|
400 | 3897 |
listOfColors |
1896 | 3898 |
"returns the list of colors" |
3899 |
||
3900 |
|list| |
|
3901 |
||
3902 |
(list := builder bindingAt:#listOfColors) isNil ifTrue:[ |
|
3903 |
builder aspectAt:#listOfColors put:(list := List new). |
|
3904 |
list addDependent:self. |
|
400 | 3905 |
]. |
1896 | 3906 |
^ list |
400 | 3907 |
! |
3908 |
||
1987 | 3909 |
magnificationHolder |
3910 |
"returns current magnification of the image as an AspectAdaptor" |
|
3911 |
||
3912 |
|holder| |
|
3913 |
(holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[ |
|
3914 |
builder aspectAt:#valueOfMagnification put:( |
|
3915 |
holder := AspectAdaptor new subject:self; forAspect:#magnification) |
|
3916 |
]. |
|
3917 |
^ holder |
|
3918 |
! |
|
3919 |
||
2881 | 3920 |
penWidthHolder |
3921 |
|holder| |
|
3922 |
||
3923 |
(holder := builder bindingAt:#penWidthHolder) isNil ifTrue:[ |
|
3924 |
builder aspectAt:#penWidthHolder put:(holder := imageEditView penWidth asValue). |
|
3925 |
holder onChangeSend:#penWidthHolderChanged to:self. |
|
3926 |
]. |
|
3927 |
^ holder |
|
3928 |
||
3929 |
"Created: / 15-02-2012 / 22:30:58 / cg" |
|
3930 |
! |
|
3931 |
||
2792 | 3932 |
previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3933 |
|holder| |
2792 | 3934 |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3935 |
(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
|
3936 |
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
|
3937 |
holder addDependent:self. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3938 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3939 |
^ holder |
2792 | 3940 |
|
3941 |
"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
|
3942 |
! |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3943 |
|
3195 | 3944 |
selectedColors |
3945 |
"returns a valueHolder for the current set of selected colors." |
|
3946 |
||
3947 |
|holder| |
|
3948 |
||
3949 |
(holder := builder bindingAt:#selectedColors) isNil ifTrue:[ |
|
3950 |
builder aspectAt:#selectedColors put:(holder := nil asValue). |
|
3951 |
holder onChangeSend:#selectedColorsChanged to:self. |
|
3952 |
]. |
|
3953 |
^ holder |
|
3954 |
! |
|
3955 |
||
400 | 3956 |
selectionOfColor |
1682 | 3957 |
"returns a valueHolder for the current selection of the edit color. |
3958 |
Here, an AspectAdaptor which accesses selectedColorIndex is returned." |
|
400 | 3959 |
|
3960 |
|holder| |
|
1682 | 3961 |
|
400 | 3962 |
(holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[ |
3963 |
builder aspectAt:#selectionOfColor put:( |
|
1682 | 3964 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ). |
400 | 3965 |
]. |
3966 |
^ holder |
|
3967 |
! |
|
3968 |
||
2881 | 3969 |
spraySpotHolder |
3970 |
|holder| |
|
3971 |
||
3972 |
(holder := builder bindingAt:#spraySpotHolder) isNil ifTrue:[ |
|
3973 |
builder aspectAt:#spraySpotHolder put:(holder := imageEditView spraySpot asValue). |
|
3974 |
holder onChangeSend:#spraySpotHolderChanged to:self. |
|
3975 |
]. |
|
3976 |
^ holder |
|
3977 |
||
3978 |
"Created: / 15-02-2012 / 22:36:38 / cg" |
|
3979 |
! |
|
3980 |
||
1558 | 3981 |
tileModeHolder |
3982 |
|holder| |
|
2812 | 3983 |
|
1558 | 3984 |
(holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[ |
3985 |
builder aspectAt:#tileModeHolder put:(holder := false asValue). |
|
3986 |
holder addDependent:self. |
|
3987 |
]. |
|
3988 |
^ holder |
|
2812 | 3989 |
|
3990 |
"Modified: / 21-10-2010 / 14:35:24 / cg" |
|
1558 | 3991 |
! |
3992 |
||
400 | 3993 |
valueOfMagnification |
2308 | 3994 |
<resource: #obsolete> |
767 | 3995 |
"returns current magnification of the image as an AspectAdaptor" |
400 | 3996 |
|
1987 | 3997 |
self obsoleteMethodWarning:'stupid method name - use #magnificationHolder'. |
3998 |
^ self magnificationHolder |
|
400 | 3999 |
! ! |
4000 |
||
767 | 4001 |
!ImageEditor methodsFor:'change & update'! |
4002 |
||
4003 |
findColorMapMode |
|
899 | 4004 |
"finds the colorMapMode for a new image" |
767 | 4005 |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4006 |
|image newListOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors| |
1054 | 4007 |
|
4008 |
image := self image. |
|
1975 | 4009 |
image isNil ifTrue:[^ self ]. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4010 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4011 |
image mask notNil ifTrue: [ |
1896 | 4012 |
colorMapModeKey := 'masked'. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4013 |
] ifFalse:[ |
1896 | 4014 |
colorMapModeKey := 'depth'. |
1054 | 4015 |
]. |
1896 | 4016 |
colorMapModeKey := colorMapModeKey , image depth printString. |
1967 | 4017 |
self colorMapMode setValue:colorMapModeKey. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4018 |
|
1928 | 4019 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4020 |
image depth > 12 ifTrue:[ |
2447 | 4021 |
newListOfColors := OrderedCollection new. |
2870 | 4022 |
(image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[ |
1927 | 4023 |
someOrAllUsedColors := image usedColorsMax:10000. |
2054 | 4024 |
someOrAllUsedColors notNil ifTrue:[ |
4025 |
someOrAllUsedColors := someOrAllUsedColors asArray. |
|
4026 |
someOrAllUsedColors sort:self sortBlockForColors. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4027 |
newListOfColors addAll:someOrAllUsedColors. |
2054 | 4028 |
"/ listOfColors add:Color black; add:Color white. |
3317 | 4029 |
]. |
4030 |
image mask notNil ifTrue:[ |
|
4031 |
newListOfColors := (Array with:(Color noColor)),newListOfColors. |
|
4032 |
]. |
|
1904 | 4033 |
] ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4034 |
newListOfColors addAll:(image colorMap). |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4035 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4036 |
] ifFalse:[ |
2447 | 4037 |
newListOfColors := OrderedCollection withAll:(self listOfColors). |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4038 |
newListOfColors isEmpty ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4039 |
self colorMapMode: colorMapMode value. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4040 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4041 |
]. |
3317 | 4042 |
"/ image mask notNil ifTrue:[ |
4043 |
"/ newListOfColors := (Array with:(Color noColor)),newListOfColors. |
|
4044 |
"/ ]. |
|
2054 | 4045 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4046 |
newListOfColors notEmptyOrNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4047 |
drawColor1 := newListOfColors at:1. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4048 |
drawColor2 := newListOfColors at:2 ifAbsent:drawColor1. |
2054 | 4049 |
|
4050 |
self hasMask ifTrue: [ |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4051 |
(newListOfColors contains: [:clr| clr = (Color colorId:0)]) |
2054 | 4052 |
ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4053 |
newListOfColors addFirst:(Color colorId:0). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4054 |
drawColor1 := newListOfColors at:2. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4055 |
drawColor2 := newListOfColors at:3 ifAbsent:drawColor1. |
2054 | 4056 |
] |
4057 |
]. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4058 |
"/ imageEditView drawingColors:(Array with: drawColor1 with: drawColor2). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4059 |
"/ self selectionOfColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4060 |
"/ setValue: 0; |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4061 |
"/ value: (listOfColors indexOf: imageEditView selectedColor). |
767 | 4062 |
]. |
2447 | 4063 |
self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[ |
4064 |
self listOfColors contents:newListOfColors. |
|
4065 |
]. |
|
2870 | 4066 |
|
4067 |
"Modified: / 18-01-2012 / 13:58:38 / cg" |
|
767 | 4068 |
! |
4069 |
||
3195 | 4070 |
selectedColorsChanged |
4071 |
|colorIndices| |
|
4072 |
||
4073 |
(colorIndices := self selectedColors value) isEmptyOrNil ifTrue:[ |
|
4074 |
self selectionOfColor value:nil |
|
4075 |
] ifFalse:[ |
|
4076 |
colorIndices size == 1 ifTrue:[ |
|
4077 |
"/ as single color selected |
|
4078 |
self selectionOfColor value:colorIndices first |
|
4079 |
] ifFalse:[ |
|
4080 |
"/ multipl selected |
|
4081 |
self selectionOfColor value:nil |
|
4082 |
]. |
|
4083 |
]. |
|
4084 |
! |
|
4085 |
||
942 | 4086 |
update:something with:aParameter from:changedObject |
2042 | 4087 |
|clrIndex img imagePreView clr changedColor| |
1436 | 4088 |
|
4089 |
img := self image. |
|
2042 | 4090 |
imagePreView := self imagePreView. |
1558 | 4091 |
|
4092 |
changedObject == self tileModeHolder ifTrue:[ |
|
2042 | 4093 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4094 |
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
|
4095 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4096 |
invalidate. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4097 |
^ self |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4098 |
]. |
2792 | 4099 |
changedObject == self previewBackgroundColorHolder ifTrue:[ |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4100 |
clr := changedObject value isNil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4101 |
ifTrue:[imageEditView viewBackground] |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4102 |
ifFalse:[Color perform:changedObject value]. |
2042 | 4103 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4104 |
viewBackground:clr; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4105 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4106 |
invalidate. |
1558 | 4107 |
^ self |
4108 |
]. |
|
4109 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4110 |
changedObject == self listOfColors ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4111 |
something == #at: ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4112 |
"/ colormap entry changed at aParameter |
960 | 4113 |
|
4114 |
clrIndex := aParameter. |
|
4115 |
(self hasMask) ifTrue:[ |
|
4116 |
clrIndex := clrIndex - 1. |
|
4117 |
]. |
|
1928 | 4118 |
changedColor := changedObject at:aParameter. |
4119 |
img colorMap notNil ifTrue:[ |
|
4120 |
img colorMap at:clrIndex put:changedColor. |
|
4121 |
self colorMapChanged. |
|
4122 |
] ifFalse:[ |
|
4123 |
drawingColormap notNil ifTrue:[ |
|
4124 |
drawingColormap at:clrIndex put:changedColor. |
|
4125 |
]. |
|
4126 |
]. |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4127 |
^ self |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4128 |
]. |
1896 | 4129 |
^ self |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4130 |
]. |
1124 | 4131 |
|
4132 |
changedObject == imageEditView undoImages ifTrue:[ |
|
1987 | 4133 |
self canUndoHolder value:(changedObject notEmpty). |
1124 | 4134 |
^ self. |
4135 |
]. |
|
4136 |
||
1345 | 4137 |
changedObject == imageEditView ifTrue:[ |
4138 |
something == #imageColors ifTrue:[ |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4139 |
self updateListOfColorsAndColormapMode. |
1345 | 4140 |
^ self. |
4141 |
]. |
|
4142 |
something == #image ifTrue:[ |
|
2812 | 4143 |
self updateAfterImageChange. |
2728 | 4144 |
imagePreView image:img scroll:false. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4145 |
self updateListOfColorsAndColormapMode. |
1558 | 4146 |
self tileModeHolder value ifTrue:[ |
2042 | 4147 |
imagePreView tileMode:true tileOffset:(img extent). |
1558 | 4148 |
]. |
1345 | 4149 |
^ self. |
4150 |
]. |
|
4151 |
something == #subImageIn ifTrue:[ |
|
2042 | 4152 |
imagePreView image ~~ img ifTrue:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4153 |
self error:'internal error' mayProceed:true. |
1406 | 4154 |
]. |
1558 | 4155 |
self tileModeHolder value ifTrue:[ |
2042 | 4156 |
imagePreView invalidate. |
1558 | 4157 |
] ifFalse:[ |
2042 | 4158 |
imagePreView invalidate:aParameter. |
1558 | 4159 |
]. |
1345 | 4160 |
^ self. |
4161 |
]. |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
4162 |
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
|
4163 |
(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
|
4164 |
"/ no color/mask */ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
4165 |
"/ self halt. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
4166 |
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
|
4167 |
] ifFalse:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
4168 |
clrIndex := self listOfColors indexOf:aParameter. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
4169 |
]. |
3195 | 4170 |
self selectedColors value:{clrIndex}. "/ selectionOfColor value:clrIndex. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
4171 |
^ self. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
4172 |
]. |
1345 | 4173 |
^ self. |
4174 |
]. |
|
4175 |
||
1880 | 4176 |
changedObject == imageEditView modifiedHolder ifTrue:[ |
4177 |
"/ self halt:'to be implemented'. |
|
4178 |
^ self |
|
4179 |
]. |
|
4180 |
||
1345 | 4181 |
changedObject == imageEditView image ifTrue:[ |
2042 | 4182 |
"/ self halt:'to be implemented'. |
2812 | 4183 |
self updateAfterImageChange. |
1345 | 4184 |
^ self. |
4185 |
]. |
|
4186 |
||
942 | 4187 |
super update:something with:aParameter from:changedObject |
4188 |
||
2812 | 4189 |
"Modified: / 21-10-2010 / 14:34:31 / cg" |
4190 |
! |
|
4191 |
||
4192 |
updateAfterImageChange |
|
4193 |
|img| |
|
4194 |
||
4195 |
(img := self image) notNil ifTrue:[ |
|
4196 |
img := img onDevice:device. |
|
4197 |
self updateColorsFromImage:img. |
|
4198 |
self findColorMapMode. |
|
4199 |
self updateLabelsAndHistory. |
|
4200 |
||
4201 |
imageSeqNr isNil ifTrue:[ |
|
4202 |
imageSeqNr := 1 |
|
4203 |
]. |
|
4204 |
self imageHasImageSequenceHolder value:(self imageHasImageSequence). |
|
4205 |
self imageHasNextImageHolder value:(self imageHasNextImage). |
|
4206 |
self imageHasPreviousImageHolder value:(self imageHasPreviousImage). |
|
4207 |
] ifFalse:[ |
|
4208 |
self updateForNoImage |
|
4209 |
] |
|
4210 |
||
4211 |
"Modified: / 21-10-2010 / 14:40:45 / cg" |
|
942 | 4212 |
! |
4213 |
||
1900 | 4214 |
updateColorsFromImage:image |
4215 |
|colors| |
|
4216 |
||
2870 | 4217 |
image depth > 16 ifTrue:[ |
4218 |
self listOfColors contents:#(). |
|
4219 |
^ self. |
|
4220 |
]. |
|
4221 |
||
1904 | 4222 |
colors := image colorMap. |
4223 |
colors isNil ifTrue:[ |
|
1906 | 4224 |
Error handle:[:ex | |
4225 |
colors := OrderedCollection new. |
|
4226 |
] do:[ |
|
4227 |
colors := image usedColors asSet. |
|
2870 | 4228 |
]. |
1900 | 4229 |
]. |
1904 | 4230 |
self listOfColors contents:(colors asOrderedCollection). |
2870 | 4231 |
|
4232 |
"Modified: / 18-01-2012 / 13:57:43 / cg" |
|
1900 | 4233 |
! |
4234 |
||
1054 | 4235 |
updateForNoImage |
767 | 4236 |
"updates channels and view, if image is loaded" |
4237 |
||
2792 | 4238 |
self imageIsLoadedHolder value: false. |
767 | 4239 |
self listOfColors removeAll. |
2812 | 4240 |
self imagePreView image: nil. |
4241 |
self imageHasImageSequenceHolder value:false. |
|
4242 |
||
4243 |
"Modified: / 21-10-2010 / 14:39:13 / cg" |
|
767 | 4244 |
! |
4245 |
||
4246 |
updateLabelsAndHistory |
|
4247 |
"updates labels and history, if something has changed" |
|
4248 |
||
1910 | 4249 |
|image| |
4250 |
||
4251 |
image := self image. |
|
4252 |
||
2792 | 4253 |
self imageIsLoadedHolder value: image notNil. |
1910 | 4254 |
image isNil ifTrue: [^nil]. |
767 | 4255 |
|
4256 |
self updateInfoLabel. |
|
4257 |
||
1975 | 4258 |
imageEditView resourceClass notNil ifTrue:[ |
4259 |
imageEditView resourceSelector notNil ifTrue:[ |
|
4260 |
self addHistoryEntryForClass:imageEditView resourceClass selector:imageEditView resourceSelector. |
|
4261 |
] |
|
4262 |
]. |
|
4263 |
||
4264 |
image fileName notNil ifTrue: [ |
|
4265 |
self addHistoryEntryForFile:image fileName. |
|
4266 |
]. |
|
2792 | 4267 |
|
4268 |
"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
|
4269 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4270 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4271 |
updateListOfColorsAndColormapMode |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4272 |
|selectedColor colorMap image| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4273 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4274 |
selectedColor := self selectedColorOrNil. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4275 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4276 |
image := self image. |
1975 | 4277 |
image isNil ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4278 |
self listOfColors removeAll. |
1975 | 4279 |
] ifFalse:[ |
4280 |
colorMap := image colorMap. |
|
2447 | 4281 |
colorMap notNil ifTrue:[ |
4282 |
(colorMap size <= 4096) ifTrue:[ |
|
4283 |
image mask notNil ifTrue:[ |
|
4284 |
colorMap := (Array with:(Color noColor)),colorMap. |
|
4285 |
]. |
|
4286 |
self listOfColors contents:colorMap. |
|
4287 |
] ifFalse:[ |
|
4288 |
self listOfColors removeAll. |
|
4289 |
colorMap isFixedPalette ifTrue:[ |
|
4290 |
image colorMap:nil. |
|
4291 |
image photometric:#rgb. |
|
4292 |
image samplesPerPixel:3. |
|
4293 |
||
4294 |
image bitsPerSample:(Array |
|
4295 |
with:(colorMap bitsRed) |
|
4296 |
with:(colorMap bitsGreen) |
|
4297 |
with:(colorMap bitsBlue)). |
|
4298 |
]. |
|
4299 |
] |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4300 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4301 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4302 |
self findColorMapMode. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4303 |
selectedColor notNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4304 |
self selectColor:selectedColor. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4305 |
]. |
767 | 4306 |
! ! |
4307 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4308 |
!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
|
4309 |
|
1951 | 4310 |
atColor:anOldColor put:newColor |
1952 | 4311 |
"a color changed to a new color" |
4312 |
||
1930 | 4313 |
|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
|
4314 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4315 |
list := self listOfColors. |
1951 | 4316 |
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
|
4317 |
|
1930 | 4318 |
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
|
4319 |
index ~~ 0 ifTrue:[ |
1928 | 4320 |
oldColor := list at:index. |
4321 |
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
|
4322 |
] ifFalse:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4323 |
self error:'internal error' mayProceed:true. |
1928 | 4324 |
list add:newColor |
4325 |
]. |
|
4326 |
||
4327 |
image := self image. |
|
4328 |
(image colorMap isNil |
|
4329 |
and:[drawingColormap isNil]) ifTrue:[ |
|
4330 |
oldColor notNil ifTrue:[ |
|
4331 |
imageEditView makeUndo. |
|
4332 |
newImage := image copy. |
|
4333 |
newImage |
|
4334 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
4335 |
do:[:x :y :clr | |
|
4336 |
|newClr| |
|
4337 |
||
1951 | 4338 |
newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr]. |
1928 | 4339 |
newImage colorAtX:x y:y put:newClr |
4340 |
]. |
|
4341 |
imageEditView image:newImage. |
|
4342 |
imageEditView setModified. |
|
4343 |
self updateImage. |
|
4344 |
self updateImagePreView. |
|
1930 | 4345 |
|
3195 | 4346 |
self selectedColors value:{oldSel}. |
1930 | 4347 |
imageEditView selectedColorIndex:oldSel. |
4348 |
imageEditView selectedColor:(self listOfColors at:oldSel). |
|
1928 | 4349 |
] |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4350 |
]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4351 |
! |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4352 |
|
942 | 4353 |
blueAtColor:aColor put:newBlue |
4354 |
"helper used to return a new row element, when blue is changed" |
|
4355 |
||
4356 |
|byte| |
|
4357 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4358 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4359 |
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
|
4360 |
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
|
4361 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4362 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4363 |
put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte). |
942 | 4364 |
! |
4365 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4366 |
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
|
4367 |
"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
|
4368 |
|
930 | 4369 |
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
|
4370 |
^ 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
|
4371 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4372 |
"Created: / 26.7.1998 / 12:30:35 / cg" |
930 | 4373 |
"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
|
4374 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4375 |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4376 |
canSelectBlueInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4377 |
^ aColor blueByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4378 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4379 |
"Created: / 7.8.1998 / 22:50:34 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4380 |
"Modified: / 7.8.1998 / 22:52:57 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4381 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4382 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4383 |
canSelectGreenInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4384 |
^ aColor greenByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4385 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4386 |
"Created: / 7.8.1998 / 22:50:22 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4387 |
"Modified: / 7.8.1998 / 22:52:46 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4388 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4389 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4390 |
canSelectRedInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4391 |
^ aColor redByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4392 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4393 |
"Created: / 7.8.1998 / 22:50:00 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4394 |
"Modified: / 7.8.1998 / 22:51:03 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4395 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4396 |
|
942 | 4397 |
greenAtColor:aColor put:newGreen |
4398 |
"helper used to return a new row element, when green is changed" |
|
4399 |
||
4400 |
|byte| |
|
4401 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4402 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4403 |
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
|
4404 |
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
|
4405 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4406 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4407 |
put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)). |
942 | 4408 |
! |
4409 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4410 |
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
|
4411 |
"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
|
4412 |
|
930 | 4413 |
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
|
4414 |
^ 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
|
4415 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4416 |
"Created: / 26.7.1998 / 12:30:29 / cg" |
930 | 4417 |
"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
|
4418 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4419 |
|
942 | 4420 |
redAtColor:aColor put:newRed |
4421 |
"helper used to return a new row element, when red is changed" |
|
4422 |
||
4423 |
|byte| |
|
4424 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4425 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4426 |
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
|
4427 |
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
|
4428 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4429 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4430 |
put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)). |
942 | 4431 |
! |
4432 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4433 |
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
|
4434 |
"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
|
4435 |
|
930 | 4436 |
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
|
4437 |
^ 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
|
4438 |
|
930 | 4439 |
"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
|
4440 |
! |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4441 |
|
2712 | 4442 |
theColorItself:aColor |
4443 |
"an accessor for the table-column" |
|
4444 |
||
1449
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4445 |
^ 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
|
4446 |
! ! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4447 |
|
2663 | 4448 |
!ImageEditor methodsFor:'defaults'! |
4449 |
||
4450 |
aboutIcon |
|
4451 |
^ self class defaultIcon |
|
4452 |
! ! |
|
4453 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4454 |
!ImageEditor methodsFor:'drag & drop'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4455 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4456 |
canDropObjects:aCollectionOfDropObjects in:aWidget |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4457 |
^ (aCollectionOfDropObjects size == 1) |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4458 |
and:[ aCollectionOfDropObjects |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4459 |
contains:[:dropObject | dropObject isFileObject]] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4460 |
! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4461 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4462 |
dropObjects:aCollectionOfDropObjects in:aWidget at:position |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4463 |
|dropObject| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4464 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4465 |
dropObject := aCollectionOfDropObjects first. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4466 |
dropObject isFileObject ifTrue:[ |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4467 |
self loadFromFile:dropObject asFilename. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4468 |
] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4469 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4470 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4471 |
!ImageEditor methodsFor:'event handling'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4472 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4473 |
processEvent:anEvent |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4474 |
"Return true, if I have eaten the event" |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4475 |
|
2945 | 4476 |
<resource: #keyboard (#Paste #Copy )> |
4477 |
||
2841 | 4478 |
|view focusView p transformation| |
4479 |
||
4480 |
view := anEvent view. |
|
4481 |
view notNil ifTrue:[ |
|
4482 |
view == self imagePreView ifTrue:[ |
|
4483 |
((anEvent isButtonPressEvent and:[ anEvent button == 1 ]) |
|
4484 |
or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]]) ifTrue:[ |
|
4485 |
p := anEvent x @ anEvent y. |
|
4486 |
(transformation := view transformation) notNil ifTrue:[ |
|
4487 |
p := transformation applyInverseTo:p. |
|
4488 |
]. |
|
4489 |
self imageEditView scrollToMakeVisible:p. |
|
4490 |
^ true. |
|
2546 | 4491 |
]. |
2841 | 4492 |
]. |
4493 |
||
4494 |
anEvent isKeyPressEvent ifTrue:[ |
|
4495 |
focusView := view windowGroup focusView ? view. |
|
4496 |
(focusView isComponentOf:(builder componentAt:#colorDataSetView)) ifTrue:[ |
|
4497 |
anEvent key == #Paste ifTrue:[ |
|
4498 |
self pasteColorIntoColormap. |
|
4499 |
^ true. |
|
4500 |
]. |
|
4501 |
anEvent key == #Copy ifTrue:[ |
|
4502 |
self copyColorFromColormap. |
|
4503 |
^ true. |
|
4504 |
]. |
|
4505 |
]. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4506 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4507 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4508 |
^ false. |
2841 | 4509 |
|
4510 |
"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
|
4511 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4512 |
|
672 | 4513 |
!ImageEditor methodsFor:'help'! |
4514 |
||
4515 |
defaultInfoLabel |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4516 |
"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
|
4517 |
some widget with a help text." |
672 | 4518 |
|
1966 | 4519 |
|resourceClass resourceSelector| |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4520 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4521 |
resourceClass := imageEditView resourceClass. |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
4522 |
resourceClass notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4523 |
resourceSelector := imageEditView resourceSelector. |
1966 | 4524 |
resourceSelector notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4525 |
^ resourceClass name, ' >> ', resourceSelector |
1966 | 4526 |
]. |
672 | 4527 |
]. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4528 |
^ 'No class and selector defined.' |
674 | 4529 |
! |
4530 |
||
702 | 4531 |
openDocumentation |
767 | 4532 |
"opens the documentation file of the Image Editor" |
674 | 4533 |
|
763 | 4534 |
self openHTMLDocument: 'tools/uipainter/ImageEditor.html' |
4535 |
||
672 | 4536 |
! ! |
4537 |
||
767 | 4538 |
!ImageEditor methodsFor:'loading'! |
4539 |
||
1975 | 4540 |
loadFromClass:aClass andSelector:aSelector |
4541 |
"loads an image from the method specified by class and selector" |
|
4542 |
||
4543 |
self assert:(aClass isNil or:[aClass isClass]). |
|
4544 |
||
2932
7f305ee14e98
changed: #loadFromClass:andSelector:
Claus Gittinger <cg@exept.de>
parents:
2893
diff
changeset
|
4545 |
(aClass isNil or:[aSelector isNil]) ifTrue:[ |
1975 | 4546 |
imageEditView resourceClass:aClass. |
4547 |
imageEditView resourceSelector:aSelector. |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4548 |
imageEditView image:nil. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4549 |
self clearModified. |
1966 | 4550 |
^ self. |
4551 |
]. |
|
4552 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4553 |
"/ (imageEditView resourceClass == aClass |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4554 |
"/ and:[ imageEditView resourceSelector == aSelector ]) ifTrue:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4555 |
"/ imageEditView modified ifFalse:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4556 |
"/ ^ self. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4557 |
"/ ]. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4558 |
"/ ]. |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4559 |
|
1975 | 4560 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[ |
1966 | 4561 |
self updateAfterImageChange. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4562 |
self clearModified. |
1966 | 4563 |
] |
1975 | 4564 |
|
4565 |
"Modified: / 16.3.1999 / 21:44:41 / cg" |
|
1966 | 4566 |
! |
4567 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4568 |
loadFromFile:aFileName |
767 | 4569 |
"loads an image from aFileName and sets up color map list and other info labels" |
4570 |
||
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4571 |
self withCursor:Cursor wait do:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4572 |
(imageEditView loadFromFile: aFileName) notNil ifTrue:[ |
1966 | 4573 |
self updateAfterImageChange |
767 | 4574 |
] |
4575 |
] |
|
960 | 4576 |
|
1057 | 4577 |
"Modified: / 16.3.1999 / 21:44:26 / cg" |
767 | 4578 |
! |
4579 |
||
960 | 4580 |
loadFromImage:anImage |
767 | 4581 |
"loads an image from anImage and sets up color map list and other info labels" |
4582 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4583 |
|img| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4584 |
|
1057 | 4585 |
anImage notNil ifTrue:[ |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4586 |
img := anImage onDevice:device. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4587 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4588 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4589 |
imageEditView image:img. |
1799
e605f0af928a
clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents:
1796
diff
changeset
|
4590 |
imageEditView clearModified. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4591 |
|
1966 | 4592 |
self updateAfterImageChange. |
4593 |
"/ img notNil ifTrue:[ |
|
4594 |
"/ self updateColorsFromImage:img. |
|
4595 |
"/ self findColorMapMode. |
|
4596 |
"/ self updateLabelsAndHistory. |
|
4597 |
"/ ] ifFalse:[ |
|
4598 |
"/ self updateForNoImage |
|
4599 |
"/ ] |
|
960 | 4600 |
|
1057 | 4601 |
"Modified: / 16.3.1999 / 21:43:56 / cg" |
767 | 4602 |
! |
4603 |
||
1975 | 4604 |
loadFromOrPrepareForClass: aClass andSelector: aSelector |
767 | 4605 |
"loads an image by evaluating aMessage; |
4606 |
if no image could extract from aMessage; do set the class and the selector from |
|
4607 |
the aMessage for a saving at the end of editing" |
|
4608 |
||
1975 | 4609 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue: [ |
1900 | 4610 |
self updateColorsFromImage:self image. |
767 | 4611 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4612 |
] ifFalse: [ |
1975 | 4613 |
imageEditView resourceClass: aClass. |
4614 |
imageEditView resourceSelector:aSelector. |
|
767 | 4615 |
]. |
4616 |
self updateLabelsAndHistory. |
|
1057 | 4617 |
|
4618 |
"Modified: / 16.3.1999 / 21:45:07 / cg" |
|
767 | 4619 |
! ! |
4620 |
||
400 | 4621 |
!ImageEditor methodsFor:'menu modes'! |
4622 |
||
975 | 4623 |
colorMapMode |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4624 |
"returns the colorMapMode" |
400 | 4625 |
|
975 | 4626 |
colorMapMode isNil ifTrue: [colorMapMode := '' asValue]. |
400 | 4627 |
|
975 | 4628 |
^colorMapMode |
400 | 4629 |
! |
4630 |
||
975 | 4631 |
editMode |
4632 |
"returns editMode" |
|
400 | 4633 |
|
1054 | 4634 |
editMode isNil ifTrue: [ |
975 | 4635 |
editMode := #point asValue. |
1329 | 4636 |
editMode onChangeEvaluate:[imageEditView editMode:(editMode value)] |
975 | 4637 |
]. |
4638 |
||
4639 |
^editMode |
|
400 | 4640 |
! |
4641 |
||
975 | 4642 |
mouseKeyColorMode |
4643 |
"returns mouseKeyColorMode" |
|
400 | 4644 |
|
1345 | 4645 |
mouseKeyColorMode isNil ifTrue:[ |
975 | 4646 |
mouseKeyColorMode := 1 asValue. |
1345 | 4647 |
mouseKeyColorMode onChangeEvaluate: [ |
4648 |
imageEditView mouseKeyColorMode:mouseKeyColorMode value. |
|
3195 | 4649 |
self selectedColors value:{ self listOfColors indexOf:imageEditView selectedColor }. |
1345 | 4650 |
] |
956 | 4651 |
]. |
400 | 4652 |
|
975 | 4653 |
^mouseKeyColorMode |
1345 | 4654 |
|
4655 |
"Modified: / 10.2.2000 / 23:16:42 / cg" |
|
400 | 4656 |
! ! |
4657 |
||
1558 | 4658 |
!ImageEditor methodsFor:'private'! |
4659 |
||
1975 | 4660 |
checkModified |
4661 |
imageEditView modified value ifTrue:[ |
|
4662 |
(Dialog |
|
4663 |
confirm:(resources string:'Image was not saved. Proceed anyway ?') |
|
4664 |
yesLabel:(resources string:'Proceed') |
|
4665 |
noLabel:(resources string:'Cancel') |
|
4666 |
initialAnswer:false |
|
4667 |
) ifFalse: [^false]. |
|
4668 |
||
4669 |
imageEditView clearModified. |
|
4670 |
]. |
|
4671 |
^ true |
|
4672 |
||
4673 |
"Modified: / 29.7.1998 / 18:55:24 / cg" |
|
4674 |
! |
|
4675 |
||
1960 | 4676 |
pointFromString:aString |
4677 |
|p s x y| |
|
4678 |
||
4679 |
p := Object readFromString:aString onError:nil. |
|
1962 | 4680 |
p isPoint ifTrue:[^ p]. |
1960 | 4681 |
|
4682 |
s := aString readStream. |
|
4683 |
x := Number readFrom:s onError:nil. |
|
4684 |
x notNil ifTrue:[ |
|
4685 |
s skipSeparators. |
|
1962 | 4686 |
[s atEnd not and:[s peek isDigit not]] whileTrue:[s next]. |
1960 | 4687 |
y := Number readFrom:s onError:nil. |
1961 | 4688 |
^ x @ (y ? x) |
1960 | 4689 |
]. |
1962 | 4690 |
^ nil |
1960 | 4691 |
! |
4692 |
||
1939 | 4693 |
sortBlockForColors |
3195 | 4694 |
^ self sortBlockForColorsByHLS. |
4695 |
"/ ^ self sortBlockForColorsByRGB |
|
4696 |
! |
|
4697 |
||
4698 |
sortBlockForColorsByHLS |
|
4699 |
^ [:a :b | |
|
4700 |
|h1 h2 s1 s2 l1 l2| |
|
4701 |
||
4702 |
h1 := a hue ? 0. |
|
4703 |
h2 := b hue ? 0. |
|
4704 |
(h1 between: h2-30 and:h2+30) ifTrue:[ |
|
4705 |
l1 := a light. |
|
4706 |
l2 := b light. |
|
4707 |
l1 = l2 ifTrue:[ |
|
4708 |
a saturation < b saturation |
|
4709 |
] ifFalse:[ |
|
4710 |
l1 < l2 |
|
4711 |
]. |
|
4712 |
"/ s1 := a saturation. |
|
4713 |
"/ s2 := b saturation. |
|
4714 |
"/ s1 = s2 ifTrue:[ |
|
4715 |
"/ a light < b light |
|
4716 |
"/ ] ifFalse:[ |
|
4717 |
"/ s1 < s2 |
|
4718 |
"/ ] |
|
4719 |
] ifFalse:[ |
|
4720 |
h1 < h2 |
|
4721 |
] |
|
4722 |
] |
|
4723 |
! |
|
4724 |
||
4725 |
sortBlockForColorsByRGB |
|
1939 | 4726 |
^ [:a :b | |
4727 |
a redByte == b redByte ifTrue:[ |
|
4728 |
a greenByte == b greenByte ifTrue:[ |
|
4729 |
a blueByte < b blueByte |
|
4730 |
] ifFalse:[ |
|
4731 |
a greenByte < b greenByte |
|
4732 |
] |
|
4733 |
] ifFalse:[ |
|
4734 |
a redByte < b redByte |
|
4735 |
] |
|
4736 |
] |
|
4737 |
! |
|
4738 |
||
1598 | 4739 |
updateImage |
4740 |
|img| |
|
4741 |
||
4742 |
img := imageEditView image. |
|
4743 |
imageEditView image:img. |
|
4744 |
self fetchImageData. |
|
4745 |
! |
|
4746 |
||
1558 | 4747 |
updateImagePreView |
4748 |
self tileModeHolder value ifTrue:[ |
|
4749 |
self imagePreView tileMode:true tileOffset:(self image extent). |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4750 |
]. |
3253 | 4751 |
self imagePreView |
4752 |
setImage:(self image) scroll:false invalidate:false; "/ true. |
|
4753 |
invalidate. |
|
1558 | 4754 |
! ! |
4755 |
||
535 | 4756 |
!ImageEditor methodsFor:'queries'! |
4757 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4758 |
hasLastGrabScreenArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4759 |
^ [ lastGrabbedScreenArea notNil ] |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4760 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4761 |
|
960 | 4762 |
hasMask |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4763 |
^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask'] |
960 | 4764 |
|
4765 |
"Created: / 18.8.1998 / 17:17:38 / cg" |
|
4766 |
! |
|
4767 |
||
1975 | 4768 |
modified |
4769 |
^ imageEditView modified |
|
4770 |
! |
|
4771 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4772 |
modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4773 |
super modified:aBoolean. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4774 |
imageEditView modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4775 |
! |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4776 |
|
535 | 4777 |
preferredExtent |
767 | 4778 |
"returns the preferred extent" |
535 | 4779 |
|
2423
0c5ac1daf0e4
changed #preferredExtent - formating
Stefan Vogel <sv@exept.de>
parents:
2420
diff
changeset
|
4780 |
^ super preferredExtent max: (Screen current width//3)@(Screen current height//3.5) |
535 | 4781 |
! ! |
4782 |
||
400 | 4783 |
!ImageEditor methodsFor:'selection'! |
4784 |
||
4785 |
magnification |
|
767 | 4786 |
"returns the magnification of the image" |
400 | 4787 |
|
911 | 4788 |
self imageEditView isNil ifTrue: [^1]. |
4789 |
^imageEditView magnification x |
|
400 | 4790 |
! |
4791 |
||
4792 |
magnification: aValue |
|
767 | 4793 |
"sets the magnification of the image" |
400 | 4794 |
|
905 | 4795 |
|magnification| |
4796 |
magnification := (aValue ? 1) asPoint. |
|
911 | 4797 |
(magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil]. |
4798 |
imageEditView magnification: magnification |
|
400 | 4799 |
! |
4800 |
||
4801 |
selectedColorIndex |
|
767 | 4802 |
"returns the index of the selected color" |
400 | 4803 |
|
4804 |
^selectedColorIndex |
|
4805 |
! |
|
4806 |
||
4807 |
selectedColorIndex: anIndex |
|
767 | 4808 |
"sets the index of the selected color" |
400 | 4809 |
|
1054 | 4810 |
|clr pixel| |
4811 |
||
4812 |
selectedColorIndex := anIndex. |
|
2447 | 4813 |
anIndex isNil ifTrue:[^ self]. |
1054 | 4814 |
clr := self listOfColors at:anIndex ifAbsent:nil. |
4815 |
clr isNil ifTrue:[^ self]. |
|
4816 |
||
1075 | 4817 |
pixel := anIndex - 1. |
1054 | 4818 |
(self listOfColors at:1) = Color noColor ifTrue:[ |
4819 |
anIndex == 1 ifTrue:[ |
|
4820 |
pixel := nil. "/ mask |
|
4821 |
] ifFalse:[ |
|
1075 | 4822 |
pixel := pixel - 1 |
1054 | 4823 |
] |
4824 |
]. |
|
4825 |
imageEditView selectedColorIndex:pixel. |
|
4826 |
imageEditView selectedColor:clr. |
|
400 | 4827 |
! ! |
4828 |
||
1716 | 4829 |
!ImageEditor methodsFor:'startup & release'! |
400 | 4830 |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4831 |
closeDownViews |
1644 | 4832 |
builder notNil ifTrue:[ |
4833 |
DefaultRelativeSizes := |
|
4834 |
Array |
|
1998 | 4835 |
with:(builder componentAt:#mainPanel) relativeCorners |
1644 | 4836 |
with:(builder componentAt:#verticalPanel) relativeCorners. |
4837 |
]. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4838 |
super closeDownViews |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4839 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4840 |
|
400 | 4841 |
closeRequest |
2016 | 4842 |
"asks for permission before closing" |
4843 |
||
4844 |
imageEditView checkModified ifTrue:[ |
|
4845 |
super closeRequest |
|
4846 |
] |
|
400 | 4847 |
! |
4848 |
||
1980 | 4849 |
commonPostBuild |
1975 | 4850 |
imageEditView undoImages addDependent:self. |
4851 |
imageEditView imageInfoHolder:(self imageInfoHolder). |
|
4852 |
imageEditView activityInfoHolder:(self activityInfoHolder). |
|
4853 |
||
4854 |
imageEditView clickInfoCallBack:[:button :point | |
|
4855 |
|mouseButtonColorToolBar| |
|
3170 | 4856 |
button <= 2 ifTrue:[ |
4857 |
mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar. |
|
4858 |
(mouseButtonColorToolBar itemAt:button) toggleIndication. |
|
4859 |
mouseButtonColorToolBar do: [:i| i updateIndicators]. |
|
4860 |
]. |
|
1975 | 4861 |
]. |
4862 |
||
4863 |
imageEditView addDependent:self. |
|
4864 |
imageEditView modifiedHolder addDependent:self. |
|
4865 |
||
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4866 |
DefaultRelativeSizes notNil ifTrue:[ |
1998 | 4867 |
(builder componentAt:#mainPanel) relativeCorners:DefaultRelativeSizes first. |
1980 | 4868 |
(builder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4869 |
]. |
1995 | 4870 |
|
1996 | 4871 |
"/ using masters infoHolder ? |
4872 |
(builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[ |
|
1998 | 4873 |
(builder componentAt:#mainPanel) layout bottomOffset:0. |
1995 | 4874 |
(builder componentAt:#infoBarSubSpec) beInvisible |
4875 |
] |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4876 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4877 |
|
1980 | 4878 |
open |
4879 |
"after opening, sets the masterApplication of the imageEditView to self" |
|
4880 |
||
4881 |
super open. |
|
4882 |
||
4883 |
imageEditView := (self componentAt: #imageEditView) subViews first. |
|
4884 |
! |
|
4885 |
||
400 | 4886 |
postOpenWith:aBuilder |
767 | 4887 |
"after opening, sets the masterApplication of the imageEditView to self; |
4888 |
evaluate the postOpenAction" |
|
400 | 4889 |
|
1921 | 4890 |
postOpenAction value. |
400 | 4891 |
|
1250 | 4892 |
super postOpenWith:aBuilder. |
4893 |
||
4894 |
aBuilder keyboardProcessor menuBar:nil. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4895 |
self windowGroup addPreEventHook:self. |
400 | 4896 |
! ! |
4897 |
||
1715 | 4898 |
!ImageEditor methodsFor:'user actions-colormap'! |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4899 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4900 |
addColorToColormap |
1682 | 4901 |
self addColorToColormap:(Color black) |
4902 |
! |
|
4903 |
||
4904 |
addColorToColormap:newColor |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4905 |
|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
|
4906 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4907 |
img := self image. |
1499
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4908 |
img isNil ifTrue:[ |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4909 |
self warn:'No Image.'. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4910 |
^ self |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4911 |
]. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4912 |
|
1054 | 4913 |
depth := img depth. |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4914 |
cMap := img colorMap. |
1054 | 4915 |
cMap isNil ifTrue:[ |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4916 |
drawingColormap isNil ifTrue:[ |
1916 | 4917 |
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
|
4918 |
drawingColormap := OrderedCollection new. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4919 |
]. |
1682 | 4920 |
drawingColormap add:newColor. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4921 |
self listOfColors contents:drawingColormap. |
3195 | 4922 |
self selectedColors value:{drawingColormap size}. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4923 |
"/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs. |
1054 | 4924 |
^ self |
4925 |
]. |
|
4926 |
||
1583 | 4927 |
("(depth == 1)" false |
1054 | 4928 |
or:[cMap size == (1 bitShift:depth)]) ifTrue:[ |
4929 |
depth >= 8 ifTrue:[ |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4930 |
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
|
4931 |
^ self |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4932 |
]. |
1916 | 4933 |
(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
|
4934 |
ifFalse:[ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4935 |
^ self |
1057 | 4936 |
]. |
4937 |
||
4938 |
imageEditView makeUndo. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4939 |
img mask notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4940 |
newMode := 'masked' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4941 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4942 |
newMode := 'depth' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4943 |
]. |
1057 | 4944 |
self colorMapMode:newMode. |
4945 |
] ifFalse:[ |
|
4946 |
imageEditView makeUndo. |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4947 |
]. |
1054 | 4948 |
|
4949 |
cMap := cMap asArray. |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4950 |
listOfColors := self listOfColors. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4951 |
oldCListSize := listOfColors size. |
1054 | 4952 |
|
1682 | 4953 |
newColorMap := cMap copyWith:newColor. |
1054 | 4954 |
|
4955 |
newImage := img species new |
|
4956 |
width:img width |
|
4957 |
height:img height |
|
4958 |
depth:depth |
|
4959 |
fromArray:img bits. |
|
4960 |
||
4961 |
newImage colorMap:newColorMap. |
|
4962 |
newImage fileName:img fileName. |
|
4963 |
newImage mask:(img mask copy). |
|
4964 |
||
4965 |
(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
|
4966 |
listOfColors contents: newImage colorMap. |
1054 | 4967 |
self findColorMapMode. |
4968 |
"/ 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
|
4969 |
listOfColors size > (oldCListSize + 1) ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4970 |
listOfColors removeLast |
1054 | 4971 |
]. |
3195 | 4972 |
self selectedColors value:{listOfColors size}. |
1054 | 4973 |
self updateLabelsAndHistory. |
4974 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4975 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4976 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
1057 | 4977 |
"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
|
4978 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4979 |
|
1650 | 4980 |
changeHLS |
4981 |
"interactive Hue/Light/Saturation editing" |
|
4982 |
||
4983 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4984 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
2438 | 4985 |
originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels |
4986 |
anyChange | |
|
1652 | 4987 |
|
1741 | 4988 |
"/ compute the averageColor in the background (while asking user) |
2438 | 4989 |
avgColorHolder := nil asValue. |
4990 |
previewImageHolder := nil asValue. |
|
4991 |
||
1652 | 4992 |
readySema := Semaphore new. |
4993 |
[ |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4994 |
|image| |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4995 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4996 |
image := imageEditView image. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4997 |
originalColormap := image colorMap copy. |
2438 | 4998 |
originalPixels := image bits. |
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4999 |
avgColor := image averageColor. |
2438 | 5000 |
avgColorHolder value:avgColor. |
5001 |
||
5002 |
previewImage := self image magnifiedPreservingRatioTo:100@100. |
|
5003 |
previewImageHolder value: previewImage. |
|
5004 |
originalPreviewColormap := previewImage colorMap copy. |
|
5005 |
originalPreviewPixels := previewImage bits. |
|
5006 |
||
1652 | 5007 |
readySema signal. |
5008 |
] forkAt:7. |
|
1649 | 5009 |
|
5010 |
acceptChannel := TriggerValue new. |
|
5011 |
||
5012 |
firstChange := true. |
|
2438 | 5013 |
anyChange := false. |
1649 | 5014 |
|
1651 | 5015 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
5016 |
Color |
|
5017 |
hue:((clr hue) ? 0 + hShift) |
|
3172 | 5018 |
light:((clr light * lFactor / 100) min:100) |
5019 |
saturation:((clr saturation * sFactor / 100) min:100)]. |
|
1652 | 5020 |
|
1649 | 5021 |
shiftAction := |
5022 |
[ |
|
1650 | 5023 |
|hShift lFactor sFactor| |
5024 |
||
1649 | 5025 |
acceptChannel value:true. |
5026 |
||
5027 |
firstChange ifTrue:[ |
|
5028 |
imageEditView makeUndo. |
|
5029 |
firstChange := false. |
|
2438 | 5030 |
anyChange := true. |
1649 | 5031 |
]. |
1652 | 5032 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
1650 | 5033 |
|
5034 |
hShift := hueShift value. |
|
5035 |
lFactor := lightValue value. |
|
5036 |
sFactor := saturationValue value. |
|
5037 |
||
1652 | 5038 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
5039 |
||
2438 | 5040 |
previewImage |
5041 |
colorMap:originalPreviewColormap copy; |
|
5042 |
bits:originalPreviewPixels copy; |
|
5043 |
release; |
|
5044 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
5045 |
previewImageHolder value:nil; value:previewImage. |
|
5046 |
||
1652 | 5047 |
shiftProcess notNil ifTrue:[ |
5048 |
shiftProcess terminate. |
|
5049 |
shiftProcess waitUntilTerminated. |
|
5050 |
shiftProcess := nil. |
|
5051 |
]. |
|
5052 |
shiftProcess := |
|
5053 |
[ |
|
5054 |
[ |
|
1656 | 5055 |
imageEditView image |
5056 |
colorMap:originalColormap copy; |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5057 |
bits:originalPixels copy; |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5058 |
release; |
1656 | 5059 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
1652 | 5060 |
self updateImage. |
5061 |
self updateInfoLabel. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5062 |
self updateImagePreView. |
1652 | 5063 |
] ensure:[ shiftProcess := nil ]. |
5064 |
] forkAt:7. |
|
1649 | 5065 |
]. |
5066 |
||
5067 |
bindings := IdentityDictionary new. |
|
1650 | 5068 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
1656 | 5069 |
hueShift onChangeEvaluate:shiftAction. |
1650 | 5070 |
|
5071 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
1656 | 5072 |
lightValue onChangeEvaluate:shiftAction. |
1650 | 5073 |
|
5074 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
1656 | 5075 |
saturationValue onChangeEvaluate:shiftAction. |
1650 | 5076 |
|
1649 | 5077 |
bindings at:#acceptChannel put:acceptChannel. |
1652 | 5078 |
bindings at:#hlsColor put:avgColorHolder. |
2438 | 5079 |
bindings at:#previewImageHolder put:previewImageHolder. |
1650 | 5080 |
|
5081 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
1649 | 5082 |
ifFalse:[ |
2438 | 5083 |
anyChange ifTrue:[ |
1649 | 5084 |
imageEditView undo |
5085 |
] |
|
5086 |
]. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5087 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5088 |
(p := shiftProcess) notNil ifTrue:[ |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5089 |
p waitUntilTerminated. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5090 |
]. |
2438 | 5091 |
|
5092 |
anyChange ifTrue:[ |
|
5093 |
self updateImage. |
|
5094 |
self updateImagePreView. |
|
5095 |
]. |
|
1649 | 5096 |
! |
5097 |
||
3195 | 5098 |
changeHLSOfColors:colorsToShift |
5099 |
"interactive Hue/Light/Saturation editing" |
|
5100 |
||
5101 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
5102 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
|
5103 |
originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels |
|
5104 |
anyChange | |
|
5105 |
||
5106 |
"/ compute the averageColor in the background (while asking user) |
|
5107 |
avgColorHolder := nil asValue. |
|
5108 |
previewImageHolder := nil asValue. |
|
5109 |
||
5110 |
readySema := Semaphore new. |
|
5111 |
[ |
|
5112 |
|image red green blue| |
|
5113 |
||
5114 |
image := imageEditView image. |
|
5115 |
originalColormap := image colorMap copy. |
|
5116 |
originalPixels := image bits. |
|
5117 |
red := (colorsToShift collect:[:clr | clr red]) average. |
|
5118 |
green := (colorsToShift collect:[:clr | clr green]) average. |
|
5119 |
blue := (colorsToShift collect:[:clr | clr blue]) average. |
|
5120 |
avgColor := Color red:red green:green blue:blue. |
|
5121 |
avgColorHolder value:avgColor. |
|
5122 |
||
5123 |
previewImage := self image magnifiedPreservingRatioTo:100@100. |
|
5124 |
previewImageHolder value: previewImage. |
|
5125 |
originalPreviewColormap := previewImage colorMap copy. |
|
5126 |
originalPreviewPixels := previewImage bits. |
|
5127 |
||
5128 |
readySema signal. |
|
5129 |
] forkAt:7. |
|
5130 |
||
5131 |
acceptChannel := TriggerValue new. |
|
5132 |
||
5133 |
firstChange := true. |
|
5134 |
anyChange := false. |
|
5135 |
||
5136 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
|
5137 |
Color |
|
5138 |
hue:((clr hue) ? 0 + hShift) |
|
5139 |
light:((clr light * lFactor / 100) min:100) |
|
5140 |
saturation:((clr saturation * sFactor / 100) min:100)]. |
|
5141 |
||
5142 |
shiftAction := |
|
5143 |
[ |
|
5144 |
|hShift lFactor sFactor| |
|
5145 |
||
5146 |
acceptChannel value:true. |
|
5147 |
||
5148 |
firstChange ifTrue:[ |
|
5149 |
imageEditView makeUndo. |
|
5150 |
firstChange := false. |
|
5151 |
anyChange := true. |
|
5152 |
]. |
|
5153 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
|
5154 |
||
5155 |
hShift := hueShift value. |
|
5156 |
lFactor := lightValue value. |
|
5157 |
sFactor := saturationValue value. |
|
5158 |
||
5159 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
|
5160 |
||
5161 |
previewImage |
|
5162 |
colorMap:originalPreviewColormap copy; |
|
5163 |
bits:originalPreviewPixels copy; |
|
5164 |
release; |
|
5165 |
colorMapProcessing:[:clr | |
|
5166 |
(colorsToShift includes:clr) ifTrue:[ |
|
5167 |
shiftedColor value:clr value:hShift value:lFactor value:sFactor. |
|
5168 |
] ifFalse:[ |
|
5169 |
clr |
|
5170 |
] |
|
5171 |
]. |
|
5172 |
previewImageHolder value:nil; value:previewImage. |
|
5173 |
||
5174 |
shiftProcess notNil ifTrue:[ |
|
5175 |
shiftProcess terminate. |
|
5176 |
shiftProcess waitUntilTerminated. |
|
5177 |
shiftProcess := nil. |
|
5178 |
]. |
|
5179 |
||
5180 |
shiftProcess := |
|
5181 |
[ |
|
5182 |
[ |
|
5183 |
imageEditView image |
|
5184 |
colorMap:originalColormap copy; |
|
5185 |
bits:originalPixels copy; |
|
5186 |
release; |
|
5187 |
colorMapProcessing:[:clr | |
|
5188 |
(colorsToShift includes:clr) ifTrue:[ |
|
5189 |
shiftedColor value:clr value:hShift value:lFactor value:sFactor. |
|
5190 |
] ifFalse:[ |
|
5191 |
clr |
|
5192 |
] |
|
5193 |
]. |
|
5194 |
self updateImage. |
|
5195 |
self updateInfoLabel. |
|
5196 |
self updateImagePreView. |
|
5197 |
] ensure:[ shiftProcess := nil ]. |
|
5198 |
] forkAt:7. |
|
5199 |
]. |
|
5200 |
||
5201 |
bindings := IdentityDictionary new. |
|
5202 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
|
5203 |
hueShift onChangeEvaluate:shiftAction. |
|
5204 |
||
5205 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
5206 |
lightValue onChangeEvaluate:shiftAction. |
|
5207 |
||
5208 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
5209 |
saturationValue onChangeEvaluate:shiftAction. |
|
5210 |
||
5211 |
bindings at:#acceptChannel put:acceptChannel. |
|
5212 |
bindings at:#hlsColor put:avgColorHolder. |
|
5213 |
bindings at:#previewImageHolder put:previewImageHolder. |
|
5214 |
||
5215 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
5216 |
ifFalse:[ |
|
5217 |
anyChange ifTrue:[ |
|
5218 |
imageEditView undo |
|
5219 |
] |
|
5220 |
]. |
|
5221 |
||
5222 |
(p := shiftProcess) notNil ifTrue:[ |
|
5223 |
p waitUntilTerminated. |
|
5224 |
]. |
|
5225 |
||
5226 |
anyChange ifTrue:[ |
|
5227 |
self updateImage. |
|
5228 |
self updateImagePreView. |
|
5229 |
]. |
|
5230 |
! |
|
5231 |
||
2652 | 5232 |
clearColormapEntry0AndMaskedPixels |
5233 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
5234 |
0 and then clear all masked pixels (to pixelValue 0). |
|
5235 |
This is required for windows icons to be really transparent" |
|
5236 |
||
5237 |
|index colorMap| |
|
5238 |
||
5239 |
self compressColorMap. |
|
5240 |
colorMap := self image colorMap. |
|
5241 |
(colorMap includes:(Color black)) ifFalse:[ |
|
5242 |
self addColorToColormap:(Color black). |
|
5243 |
colorMap := self image colorMap. |
|
5244 |
]. |
|
5245 |
index := colorMap indexOf:(Color black). |
|
5246 |
index == 1 ifFalse:[ |
|
5247 |
self sortColorMap. |
|
5248 |
colorMap := self image colorMap. |
|
5249 |
]. |
|
5250 |
self clearMaskedPixels |
|
5251 |
! |
|
5252 |
||
1403 | 5253 |
clearMaskedPixels |
5254 |
"clear all masked pixels (to pixelValue 0)" |
|
5255 |
||
2652 | 5256 |
|newImage| |
5257 |
||
5258 |
newImage := self image clearMaskedPixels. |
|
5259 |
0 to:newImage height - 1 do:[:y | |
|
5260 |
0 to:newImage width - 1 do:[:x | |
|
5261 |
(newImage maskAtX:x y:y) == 0 ifTrue:[ |
|
5262 |
newImage pixelAtX:x y:y put:0 |
|
1460 | 5263 |
] |
1403 | 5264 |
] |
2652 | 5265 |
]. |
5266 |
||
5267 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5268 |
self fetchImageData. |
|
1403 | 5269 |
] |
5270 |
! |
|
5271 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5272 |
colorMapChanged |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5273 |
|img| |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5274 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5275 |
img := self image. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5276 |
img release. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
5277 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
5278 |
self imageEditView invalidate. |
960 | 5279 |
self imagePreView invalidate. |
5280 |
||
5281 |
"/ (imageEditView image:img) notNil ifTrue:[ |
|
5282 |
"/ self updateLabelsAndHistory. |
|
5283 |
"/ self imagePreView image:img |
|
5284 |
"/ ] |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5285 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5286 |
"Created: / 7.8.1998 / 22:26:10 / cg" |
960 | 5287 |
"Modified: / 18.8.1998 / 17:08:55 / cg" |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5288 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5289 |
|
975 | 5290 |
colorMapMode:aMode |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5291 |
"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
|
5292 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5293 |
|depth numColors newColorMap newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5294 |
oldImage image newColors realColorMap oldFileName |
1008 | 5295 |
usedColors useNearest usageCounts tmpBits tmpMap quest |
5296 |
prevMode maskThreshold maskImage| |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5297 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5298 |
self withExecuteCursorDo:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5299 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5300 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5301 |
prevMode := colorMapMode value. |
1008 | 5302 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5303 |
newColorMap := self class listOfColorMaps at:aMode. |
3230 | 5304 |
(aMode == #depth32 or:[aMode == #masked32]) ifTrue:[ |
2572 | 5305 |
depth := 32. |
5306 |
] ifFalse:[ |
|
3230 | 5307 |
(aMode == #depth24 or:[aMode == #masked24]) ifTrue:[ |
5308 |
depth := 24. |
|
5309 |
] ifFalse:[ |
|
5310 |
depth := (newColorMap size log:2) asInteger. |
|
5311 |
]. |
|
2572 | 5312 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5313 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5314 |
useNearest := false. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5315 |
depth == 1 ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5316 |
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
|
5317 |
] ifFalse:[ |
1008 | 5318 |
prevMode isNil ifTrue:[ |
5319 |
quest := 'Compute colormap (or use standard)' |
|
5320 |
] ifFalse:[ |
|
5321 |
quest := 'Keep colormap (or use standard)' |
|
5322 |
] |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5323 |
]. |
1008 | 5324 |
((prevMode = aMode) |
1057 | 5325 |
or:[depth > oldImage depth |
5326 |
or:[self confirm:(resources string:quest)]]) ifTrue:[ |
|
1937 | 5327 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 5328 |
|
5329 |
"/ keep the colormap |
|
3355 | 5330 |
"/ newColorMap atAllPut:Color black. |
1935 | 5331 |
depth > oldImage depth ifTrue:[ |
5332 |
"/ easy - simply copy the part |
|
5333 |
numColors := 1 bitShift:oldImage depth. |
|
5334 |
0 to:numColors-1 do:[:pixel | |
|
5335 |
newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel) |
|
1008 | 5336 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5337 |
] ifFalse:[ |
1935 | 5338 |
"/ see if all used color fit the new colormap |
5339 |
usedColors := oldImage usedColorsMax:(1 bitShift:depth). |
|
5340 |
(usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[ |
|
5341 |
usedColors := oldImage realUsedColors |
|
5342 |
]. |
|
5343 |
(usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[ |
|
5344 |
"/ yea - just install them |
|
5345 |
usedColors asArray keysAndValuesDo:[:idx :clr | |
|
5346 |
newColorMap at:idx put:clr |
|
5347 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5348 |
] ifFalse:[ |
1935 | 5349 |
"/ copy over those that are most often used. |
5350 |
oldImage depth < 8 ifTrue:[ |
|
5351 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
5352 |
oldImage bits |
|
5353 |
expandPixels:(oldImage depth) |
|
5354 |
width:oldImage width |
|
5355 |
height:oldImage height |
|
5356 |
into:tmpBits |
|
5357 |
mapping:nil. |
|
986 | 5358 |
] ifFalse:[ |
1935 | 5359 |
oldImage depth == 8 ifTrue:[ |
5360 |
tmpBits := oldImage bits |
|
5361 |
] ifFalse:[ |
|
5362 |
colorMapMode value:prevMode. |
|
5363 |
self findColorMapMode. |
|
5364 |
self warn:('Too many used colors in image (', oldImage usedColors size printString , ').'). |
|
5365 |
^ self |
|
5366 |
"/ (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs)) |
|
5367 |
"/ ifFalse:[. |
|
5368 |
"/ ^ self |
|
5369 |
"/ ]. |
|
5370 |
"/ self image: (Image newForDepth:depth) fromImage:oldImage. |
|
5371 |
"/ ^ self. |
|
5372 |
] |
|
5373 |
]. |
|
5374 |
usageCounts := tmpBits usageCounts. |
|
5375 |
tmpMap := Array new:usageCounts size. |
|
5376 |
oldImage colorMap asArray keysAndValuesDo:[:i :clr | |
|
5377 |
tmpMap at:i put:clr |
|
5378 |
]. |
|
5379 |
usageCounts sort:[:a :b | a > b] with:tmpMap. |
|
5380 |
||
5381 |
1 to:(1 bitShift:depth) do:[:idx | |
|
5382 |
newColorMap at:idx put:(tmpMap at:idx) |
|
5383 |
]. |
|
5384 |
||
5385 |
useNearest := Dialog |
|
5386 |
confirmWithCancel:(resources |
|
5387 |
stringWithCRs:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?' |
|
5388 |
with:usedColors size |
|
5389 |
with:(1 bitShift:depth)) |
|
5390 |
labels:(resources array:#('Cancel' 'First' 'Nearest')). |
|
5391 |
useNearest isNil ifTrue:[ |
|
1124 | 5392 |
colorMapMode value:prevMode. |
1935 | 5393 |
^ self "/ cancel |
5394 |
]. |
|
5395 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5396 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5397 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5398 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5399 |
"/ standard colormap |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5400 |
usedColors := oldImage usedColors. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5401 |
(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
|
5402 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5403 |
confirmWithCancel:(resources |
1916 | 5404 |
stringWithCRs:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?' |
5405 |
) |
|
1542 | 5406 |
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
|
5407 |
useNearest isNil ifTrue:[ |
1542 | 5408 |
colorMapMode value:prevMode. |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5409 |
^ self "/ cancel |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5410 |
]. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5411 |
]. |
3356 | 5412 |
newColorMap := oldImage colorMap. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5413 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5414 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5415 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5416 |
|
2260 | 5417 |
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
|
5418 |
newImage depth:depth. |
3230 | 5419 |
depth >= 16 ifTrue:[ |
5420 |
depth == 32 ifTrue:[ |
|
5421 |
newImage colorMap:nil. |
|
5422 |
newImage samplesPerPixel:4. |
|
5423 |
newImage photometric:#rgba. |
|
5424 |
] ifFalse:[ |
|
5425 |
newImage colorMap:nil. |
|
5426 |
newImage samplesPerPixel:3. |
|
5427 |
newImage photometric:#rgb. |
|
5428 |
]. |
|
5429 |
]. |
|
3125
9d5624af77ab
Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents:
3122
diff
changeset
|
5430 |
"/ newImage photometric:oldImage photometric. |
2260 | 5431 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5432 |
oldFileName := oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5433 |
|
1008 | 5434 |
Image imageErrorSignal handle:[:ex| |
3227 | 5435 |
"/ arrive here only if not all colors can be represented; |
5436 |
"/ then do a more expensive nearest color search |
|
1008 | 5437 |
Color colorErrorSignal handle:[:ex| |
1542 | 5438 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5439 |
imageEditView undo. |
1008 | 5440 |
^ self warn:(resources string:'Conversion failed !!') |
5441 |
] do:[ |
|
1393 | 5442 |
newImage := Image newForDepth:depth. |
3103 | 5443 |
newImage |
5444 |
width:oldImage width height:oldImage height depth:depth; |
|
5445 |
colorMap:newColorMap; |
|
5446 |
photometric:#palette; |
|
5447 |
bits:(ByteArray new:(newImage bytesPerRow * newImage height)); |
|
5448 |
mask:oldImage mask. |
|
2260 | 5449 |
|
3227 | 5450 |
oldImage |
5451 |
colorsFromX:0 y:0 |
|
5452 |
toX:(oldImage width-1) y:(oldImage height-1) |
|
5453 |
do:[:x :y :clr | |
|
5454 |
|newColor| |
|
5455 |
||
5456 |
(newColorMap includes:clr) |
|
5457 |
ifTrue: [newColor := clr] |
|
5458 |
ifFalse: [ |
|
5459 |
newColor := clr nearestIn:newColorMap. |
|
5460 |
useNearest ifFalse:[ |
|
5461 |
(newColor deltaFrom:clr) > 0.5 ifTrue:[ |
|
5462 |
newColor := oldImage colorFromValue:0 |
|
5463 |
] |
|
1008 | 5464 |
] |
3227 | 5465 |
]. |
5466 |
newImage colorAtX:x y:y put:newColor. |
|
5467 |
]. |
|
5468 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5469 |
image := newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5470 |
]. |
1008 | 5471 |
] do:[ |
3356 | 5472 |
image := newImage |
5473 |
fromImage:oldImage |
|
5474 |
photometric:(newColorMap notNil |
|
5475 |
ifTrue:[#palette] |
|
5476 |
ifFalse:[nil]). |
|
5477 |
"/ -- nope; keep the newly determined photometric. photometric:oldImage photometric. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5478 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5479 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5480 |
(aMode asString startsWith:'mask') ifTrue:[ |
1008 | 5481 |
image mask isNil ifTrue:[ |
1949 | 5482 |
false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
1008 | 5483 |
maskThreshold := 0.1. |
5484 |
maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
|
5485 |
] ifFalse:[ |
|
3122 | 5486 |
maskImage := ImageMask extent:image extent. |
1770 | 5487 |
maskImage bits:(ByteArray |
1008 | 5488 |
new:(maskImage bytesPerRow * maskImage height) |
5489 |
withAll:16rFF). |
|
5490 |
||
5491 |
"/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
|
5492 |
]. |
|
5493 |
image mask:maskImage. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5494 |
]. |
1008 | 5495 |
] ifFalse:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5496 |
image mask: nil. |
3317 | 5497 |
oldImage mask notNil ifTrue:[ |
5498 |
newImage depth == 32 ifTrue:[ |
|
5499 |
newImage computeAlphaValuesFromMask:oldImage mask |
|
5500 |
]. |
|
5501 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5502 |
]. |
1935 | 5503 |
|
1937 | 5504 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 5505 |
realColorMap := OrderedCollection new. |
5506 |
image realColorMap do:[:clr| |
|
5507 |
(realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
|
5508 |
]. |
|
5509 |
newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
|
5510 |
newColorMap do:[:clr| |
|
5511 |
((newColors size < newColorMap size) and: [(newColors includes: clr) not]) |
|
5512 |
ifTrue:[ |
|
5513 |
newColors add: clr |
|
5514 |
] |
|
5515 |
]. |
|
5516 |
image colorMap: newColors. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5517 |
]. |
1446 | 5518 |
image fileName: oldFileName. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5519 |
|
1054 | 5520 |
(imageEditView image: image) notNil ifTrue:[ |
1446 | 5521 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5522 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5523 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5524 |
|
3356 | 5525 |
"Modified: / 22-11-2016 / 03:44:00 / cg" |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5526 |
! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5527 |
|
2192 | 5528 |
colorize |
5529 |
"interactive Hue editing" |
|
5530 |
||
5531 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
5532 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
|
5533 |
originalPixels p| |
|
5534 |
||
5535 |
"/ compute the averageColor in the background (while asking user) |
|
5536 |
readySema := Semaphore new. |
|
5537 |
[ |
|
5538 |
|image| |
|
5539 |
||
5540 |
image := imageEditView image. |
|
5541 |
originalColormap := image colorMap copy. |
|
5542 |
avgColor := image averageColor. |
|
5543 |
originalPixels := image bits. |
|
5544 |
readySema signal. |
|
5545 |
] forkAt:7. |
|
5546 |
||
5547 |
acceptChannel := TriggerValue new. |
|
5548 |
avgColorHolder := avgColor asValue. |
|
5549 |
||
5550 |
firstChange := true. |
|
5551 |
||
5552 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
|
5553 |
Color |
|
5554 |
hue:((clr hue) ? 0 + hShift) |
|
3173 | 5555 |
light:((clr light * lFactor / 100) min:100) |
5556 |
saturation:(((clr saturation max:20) * sFactor / 100) min:100)]. |
|
2192 | 5557 |
|
5558 |
||
5559 |
shiftAction := |
|
5560 |
[ |
|
5561 |
|hShift lFactor sFactor| |
|
5562 |
||
5563 |
acceptChannel value:true. |
|
5564 |
||
5565 |
firstChange ifTrue:[ |
|
5566 |
imageEditView makeUndo. |
|
5567 |
firstChange := false. |
|
5568 |
]. |
|
5569 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
|
5570 |
||
5571 |
hShift := hueShift value. |
|
5572 |
lFactor := lightValue value. |
|
5573 |
sFactor := saturationValue value. |
|
5574 |
||
5575 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
|
5576 |
||
5577 |
shiftProcess notNil ifTrue:[ |
|
5578 |
shiftProcess terminate. |
|
5579 |
shiftProcess waitUntilTerminated. |
|
5580 |
shiftProcess := nil. |
|
5581 |
]. |
|
5582 |
shiftProcess := |
|
5583 |
[ |
|
5584 |
[ |
|
5585 |
imageEditView image |
|
5586 |
colorMap:originalColormap copy; |
|
5587 |
bits:originalPixels copy; |
|
5588 |
release; |
|
5589 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
5590 |
self updateImage. |
|
5591 |
self updateInfoLabel. |
|
5592 |
self updateImagePreView. |
|
5593 |
] ensure:[ shiftProcess := nil ]. |
|
5594 |
] forkAt:7. |
|
5595 |
]. |
|
5596 |
||
5597 |
bindings := IdentityDictionary new. |
|
5598 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
|
5599 |
hueShift onChangeEvaluate:shiftAction. |
|
5600 |
||
5601 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
5602 |
lightValue onChangeEvaluate:shiftAction. |
|
5603 |
||
5604 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
5605 |
saturationValue onChangeEvaluate:shiftAction. |
|
5606 |
||
5607 |
bindings at:#acceptChannel put:acceptChannel. |
|
5608 |
bindings at:#hlsColor put:avgColorHolder. |
|
5609 |
||
5610 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
5611 |
ifFalse:[ |
|
5612 |
firstChange ~~ true ifTrue:[ |
|
5613 |
imageEditView undo |
|
5614 |
] |
|
5615 |
]. |
|
5616 |
||
5617 |
(p := shiftProcess) notNil ifTrue:[ |
|
5618 |
p waitUntilTerminated. |
|
5619 |
]. |
|
5620 |
self updateImage. |
|
5621 |
self updateImagePreView. |
|
5622 |
||
5623 |
"Created: / 01-11-2007 / 23:27:37 / cg" |
|
5624 |
! |
|
5625 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5626 |
compressColorMap |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5627 |
"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
|
5628 |
|
2893 | 5629 |
|newImage| |
5630 |
||
5631 |
newImage := self image. |
|
5632 |
newImage compressColorMap. |
|
2652 | 5633 |
|
5634 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5635 |
self fetchImageData. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5636 |
] |
1008 | 5637 |
! |
5638 |
||
1852 | 5639 |
copyColorFromColormap |
1871 | 5640 |
imageEditView setClipboardObject:(self selectedColorOrNil) |
1852 | 5641 |
! |
5642 |
||
2054 | 5643 |
ditherToDepth |
5644 |
|depth| |
|
5645 |
||
5646 |
depth := Dialog request:'New depth ?'. |
|
5647 |
depth isEmptyOrNil ifTrue:[^ self]. |
|
5648 |
depth := Number readFrom:depth onError:nil. |
|
5649 |
depth isNil ifTrue:[^ self]. |
|
5650 |
||
5651 |
self ditherToDepth:depth |
|
5652 |
||
5653 |
"Created: / 07-07-2006 / 13:22:10 / cg" |
|
5654 |
! |
|
5655 |
||
5656 |
ditherToDepth:depth |
|
3331 | 5657 |
|ditherColors newImage useStandardColors nGrey greyColorsAlready moreColors d| |
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5658 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5659 |
useStandardColors := true. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5660 |
"/ 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
|
5661 |
"/ useStandardColors isNil ifTrue:[^ self]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5662 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5663 |
useStandardColors ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5664 |
depth = 1 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5665 |
ditherColors := Array with:(Color black) with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5666 |
] ifFalse:[ depth = 2 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5667 |
ditherColors := Array |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5668 |
with:(Color black) |
3140 | 5669 |
with:(Color darkGray) |
5670 |
with:(Color lightGray) |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5671 |
with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5672 |
] ifFalse:[ depth = 3 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5673 |
ditherColors := Color colorCubeWithRed:2 green:2 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5674 |
] ifFalse:[ depth = 4 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5675 |
ditherColors := Color vgaColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5676 |
] ifFalse:[ depth = 5 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5677 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5678 |
] ifFalse:[ depth = 6 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5679 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:3. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5680 |
] ifFalse:[ depth <= 8 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5681 |
ditherColors := Color colorCubeWithRed:6 green:6 blue:5. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5682 |
] ifFalse:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5683 |
self error:'unsupported depth'. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5684 |
]]]]]]]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5685 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5686 |
nGrey := (2 raisedTo:depth) - ditherColors size. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5687 |
nGrey > 0 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5688 |
nGrey := nGrey min:128. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5689 |
greyColorsAlready := ditherColors select:[:clr | clr isGreyColor]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5690 |
d := 1 / nGrey. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5691 |
moreColors := (1 to:nGrey-1) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5692 |
collect:[:i | Color brightness:(d * i)] |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5693 |
thenReject:[:clr | greyColorsAlready includes:clr ]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5694 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5695 |
ditherColors := ditherColors , moreColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5696 |
]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5697 |
] ifFalse:[ |
3020 | 5698 |
self halt:'unhandled dither color setup'. |
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5699 |
]. |
2054 | 5700 |
|
5701 |
self withExecuteCursorDo:[ |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5702 |
"/ newImage := self image asDitheredImageUsing:ditherColors depth:depth. |
2054 | 5703 |
newImage := self image asDitheredImageUsing:ditherColors depth:8. |
5704 |
||
5705 |
imageEditView makeUndo. |
|
5706 |
imageEditView image:newImage. |
|
5707 |
imageEditView setModified. |
|
5708 |
self updateImage. |
|
5709 |
self updateImagePreView. |
|
5710 |
||
5711 |
self fetchImageData. |
|
5712 |
]. |
|
5713 |
||
5714 |
"Created: / 07-07-2006 / 13:20:56 / cg" |
|
2073 | 5715 |
"Modified: / 05-09-2006 / 16:13:25 / cg" |
2054 | 5716 |
! |
5717 |
||
2174 | 5718 |
doubleClickOnColor:aColorIndex |
5719 |
self editSelectedColor. |
|
5720 |
||
5721 |
"Created: / 22-07-2007 / 13:14:37 / cg" |
|
5722 |
! |
|
5723 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5724 |
editSelectedColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5725 |
self processSelectedColorWith:[:clr | |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5726 |
|editor| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5727 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5728 |
editor := ColorEditDialog new. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5729 |
editor color:clr. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5730 |
editor open. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5731 |
editor accepted ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5732 |
AbortOperationRequest raise. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5733 |
]. |
3180 | 5734 |
editor color |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5735 |
] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5736 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5737 |
|
1446 | 5738 |
fetchImageData |
1460 | 5739 |
|image| |
5740 |
||
5741 |
(image := imageEditView image) notNil ifTrue:[ |
|
5742 |
self findColorMapMode. |
|
5743 |
self updateLabelsAndHistory. |
|
5744 |
] |
|
1446 | 5745 |
! |
5746 |
||
1544 | 5747 |
inspectColor |
2573 | 5748 |
|clrIndex clr| |
5749 |
||
5750 |
self hasColormap ifFalse:[ |
|
5751 |
clr := self selectedColorOrNil |
|
5752 |
] ifTrue:[ |
|
5753 |
clrIndex := self selectedColorIndexOrNil. |
|
5754 |
clrIndex isNil ifTrue:[ |
|
5755 |
^ self |
|
5756 |
]. |
|
5757 |
clr := self image colorFromValue:clrIndex-1 |
|
1544 | 5758 |
]. |
2573 | 5759 |
clr inspect |
1544 | 5760 |
! |
5761 |
||
2651 | 5762 |
inspectColormap |
5763 |
self hasColormap ifTrue:[ |
|
5764 |
self image colorMap inspect |
|
5765 |
]. |
|
5766 |
! |
|
5767 |
||
1598 | 5768 |
makeBrighter |
5769 |
| anyChange| |
|
5770 |
||
5771 |
self withExecuteCursorDo:[ |
|
5772 |
anyChange := imageEditView makeBrighter. |
|
5773 |
anyChange ifFalse:[ |
|
5774 |
Dialog warn:'Image unchanged'. |
|
5775 |
] ifTrue:[ |
|
5776 |
self updateImage. |
|
5777 |
] |
|
5778 |
]. |
|
5779 |
! |
|
5780 |
||
5781 |
makeDarker |
|
5782 |
| anyChange| |
|
5783 |
||
5784 |
self withExecuteCursorDo:[ |
|
5785 |
anyChange := imageEditView makeDarker. |
|
5786 |
anyChange ifFalse:[ |
|
5787 |
Dialog warn:'Image unchanged'. |
|
5788 |
] ifTrue:[ |
|
5789 |
self updateImage. |
|
5790 |
] |
|
5791 |
]. |
|
5792 |
! |
|
5793 |
||
1926 | 5794 |
makeGrayScaleImage |
1598 | 5795 |
|anyChange| |
1436 | 5796 |
|
5797 |
self withExecuteCursorDo:[ |
|
1926 | 5798 |
anyChange := imageEditView makeGrayScaleImage. |
1436 | 5799 |
anyChange ifFalse:[ |
5800 |
Dialog warn:'Image unchanged'. |
|
5801 |
] ifTrue:[ |
|
1598 | 5802 |
self updateImage. |
5803 |
] |
|
5804 |
]. |
|
5805 |
! |
|
5806 |
||
5807 |
makeInverse |
|
5808 |
| anyChange| |
|
5809 |
||
5810 |
self withExecuteCursorDo:[ |
|
5811 |
anyChange := imageEditView makeInverse. |
|
5812 |
anyChange ifFalse:[ |
|
5813 |
Dialog warn:'Image unchanged'. |
|
5814 |
] ifTrue:[ |
|
5815 |
self updateImage. |
|
1436 | 5816 |
] |
5817 |
]. |
|
5818 |
! |
|
5819 |
||
1446 | 5820 |
makeSelectedColorBrighter |
3195 | 5821 |
self processSelectedColorsWith:[:clr | clr lightened] |
1446 | 5822 |
! |
5823 |
||
5824 |
makeSelectedColorDarker |
|
3195 | 5825 |
self processSelectedColorsWith:[:clr | clr darkened] |
1446 | 5826 |
! |
5827 |
||
1884 | 5828 |
makeSelectedColorGray |
3195 | 5829 |
self processSelectedColorsWith:[:clr | Color brightness:(clr brightness)] |
5830 |
! |
|
5831 |
||
5832 |
makeSelectedColorShifted |
|
5833 |
|cMap colors| |
|
5834 |
||
5835 |
cMap := self image colorMap. |
|
5836 |
self hasMask ifTrue:[ |
|
5837 |
colors := self selectedColors value collect:[:idx | cMap at:idx-1]. |
|
5838 |
] ifFalse:[ |
|
5839 |
colors := self selectedColors value collect:[:idx | cMap at:idx]. |
|
5840 |
]. |
|
5841 |
self changeHLSOfColors:colors. |
|
1884 | 5842 |
! |
5843 |
||
2826 | 5844 |
makeSlightlyBrighter |
5845 |
| anyChange| |
|
5846 |
||
5847 |
self withExecuteCursorDo:[ |
|
5848 |
anyChange := imageEditView makeSlightlyBrighter. |
|
5849 |
anyChange ifFalse:[ |
|
5850 |
Dialog warn:'Image unchanged'. |
|
5851 |
] ifTrue:[ |
|
5852 |
self updateImage. |
|
5853 |
] |
|
5854 |
]. |
|
5855 |
||
5856 |
"Created: / 24-11-2010 / 11:06:11 / cg" |
|
5857 |
! |
|
5858 |
||
5859 |
makeSlightlyDarker |
|
5860 |
| anyChange| |
|
5861 |
||
5862 |
self withExecuteCursorDo:[ |
|
5863 |
anyChange := imageEditView makeSlightlyDarker. |
|
5864 |
anyChange ifFalse:[ |
|
5865 |
Dialog warn:'Image unchanged'. |
|
5866 |
] ifTrue:[ |
|
5867 |
self updateImage. |
|
5868 |
] |
|
5869 |
]. |
|
5870 |
||
5871 |
"Created: / 24-11-2010 / 11:06:23 / cg" |
|
5872 |
! |
|
5873 |
||
2652 | 5874 |
menu_clearColormapEntry0AndMaskedPixels |
5875 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
5876 |
0 and then clear all masked pixels (to pixelValue 0)" |
|
5877 |
||
5878 |
imageEditView makeUndo. |
|
5879 |
self withExecuteCursorDo:[ |
|
5880 |
self clearColormapEntry0AndMaskedPixels |
|
5881 |
] |
|
5882 |
! |
|
5883 |
||
5884 |
menu_clearMaskedPixels |
|
5885 |
"clear all masked pixels (to pixelValue 0)" |
|
5886 |
||
5887 |
imageEditView makeUndo. |
|
5888 |
||
5889 |
self withExecuteCursorDo:[ |
|
5890 |
self clearMaskedPixels |
|
5891 |
] |
|
5892 |
! |
|
5893 |
||
5894 |
menu_compressColorMap |
|
5895 |
"calculates a new color map for the image, using only used colors" |
|
5896 |
||
2893 | 5897 |
|depth oldImage usedColors colorMap| |
2652 | 5898 |
|
5899 |
oldImage := self image. |
|
5900 |
||
5901 |
oldImage photometric ~~ #palette ifTrue:[ |
|
5902 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
1852 | 5903 |
^ self |
5904 |
]. |
|
2893 | 5905 |
depth := oldImage depth. |
3103 | 5906 |
colorMap := oldImage colorMap asArray. |
2652 | 5907 |
usedColors := oldImage realUsedColors. |
2893 | 5908 |
usedColors size == colorMap size ifTrue:[ |
2652 | 5909 |
self information:'Compress colorMap: Colormap already compressed - no compression.'. |
5910 |
^ self |
|
5911 |
]. |
|
5912 |
||
5913 |
imageEditView makeUndo. |
|
5914 |
||
5915 |
self withExecuteCursorDo:[ |
|
5916 |
self compressColorMap |
|
1852 | 5917 |
] |
5918 |
! |
|
5919 |
||
2652 | 5920 |
menu_copyMask |
5921 |
|mask| |
|
5922 |
||
5923 |
mask := self image mask. |
|
5924 |
MaskClipboard := mask subImageIn: (0@0 extent:mask extent). |
|
5925 |
! |
|
5926 |
||
5927 |
menu_pasteMask |
|
1480 | 5928 |
|img mask| |
5929 |
||
5930 |
imageEditView makeUndo. |
|
5931 |
||
5932 |
img := self image. |
|
5933 |
mask := img mask. |
|
5934 |
||
5935 |
mask |
|
5936 |
copyFrom:MaskClipboard |
|
5937 |
x:0 y:0 |
|
5938 |
toX:0 y:0 |
|
5939 |
width:(mask width min:MaskClipboard width) |
|
5940 |
height:(mask height min:MaskClipboard height). |
|
5941 |
img mask:mask. |
|
5942 |
(imageEditView image:img copy) notNil ifTrue:[ |
|
5943 |
self fetchImageData. |
|
5944 |
] |
|
5945 |
! |
|
5946 |
||
2652 | 5947 |
menu_sortColorMap |
5948 |
"calculates a new color map for the image, sorting colors" |
|
5949 |
||
5950 |
self menu_sortColorMapWith:self sortBlockForColors |
|
5951 |
! |
|
5952 |
||
5953 |
menu_sortColorMapWith:sortBlock |
|
5954 |
"calculates a new color map for the image, sorting colors" |
|
5955 |
||
5956 |
self image photometric ~~ #palette ifTrue:[ |
|
5957 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
5958 |
^ self |
|
5959 |
]. |
|
5960 |
||
5961 |
imageEditView makeUndo. |
|
5962 |
||
5963 |
self withExecuteCursorDo:[ |
|
5964 |
self sortColorMapWith:sortBlock |
|
5965 |
] |
|
5966 |
||
5967 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
5968 |
"Created: / 30.9.1998 / 23:51:23 / cg" |
|
5969 |
! |
|
5970 |
||
5971 |
pasteColorIntoColormap |
|
5972 |
|copyBufferColor| |
|
5973 |
||
5974 |
copyBufferColor := imageEditView getClipboardObject. |
|
5975 |
copyBufferColor isColor ifFalse:[ |
|
5976 |
UserPreferences current beepInEditor ifTrue:[ |
|
5977 |
self window beep. |
|
5978 |
]. |
|
5979 |
^ self |
|
5980 |
]. |
|
5981 |
||
5982 |
self processSelectedColorWith:[:clr | |
|
5983 |
copyBufferColor |
|
5984 |
] |
|
5985 |
! |
|
5986 |
||
1682 | 5987 |
pickAndAddColorToColormap |
5988 |
self addColorToColormap:(Color fromUser) |
|
5989 |
! |
|
5990 |
||
1933 | 5991 |
pickAndPasteColor |
5992 |
self pickColor. |
|
5993 |
self pasteColorIntoColormap. |
|
5994 |
! |
|
5995 |
||
1852 | 5996 |
pickColor |
1871 | 5997 |
imageEditView setClipboardObject:(Color fromUser) |
1852 | 5998 |
! |
5999 |
||
1682 | 6000 |
processSelectedColorWith:aBlock |
3195 | 6001 |
"undoable color processing: |
6002 |
the selected color will be replaced by the value of aBlock" |
|
6003 |
||
6004 |
self processSelectedColorsWith:aBlock. |
|
6005 |
! |
|
6006 |
||
6007 |
processSelectedColorsWith:aBlock |
|
6008 |
"undoable color processing: |
|
6009 |
the selected colors will be replaced by the value of aBlock |
|
6010 |
(which gets a color vector and must return a color vector)" |
|
6011 |
||
3281 | 6012 |
|img cMap modifiedColormap oldColors newImage selectedColorIndices newColors maskOffset| |
3195 | 6013 |
|
6014 |
selectedColorIndices := self selectedColors value. |
|
6015 |
selectedColorIndices isEmptyOrNil ifTrue:[^ self]. |
|
1682 | 6016 |
|
6017 |
img := self image. |
|
6018 |
cMap := img colorMap. |
|
6019 |
cMap isNil ifTrue:[ |
|
1916 | 6020 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1682 | 6021 |
^ self |
6022 |
]. |
|
3195 | 6023 |
self hasMask ifTrue:[ |
3281 | 6024 |
maskOffset := 1. |
3195 | 6025 |
] ifFalse:[ |
3281 | 6026 |
maskOffset := 0. |
3195 | 6027 |
]. |
3281 | 6028 |
oldColors := selectedColorIndices collect:[:idx | cMap at:idx-maskOffset]. |
1682 | 6029 |
imageEditView makeUndo. |
6030 |
||
2992 | 6031 |
modifiedColormap := cMap asNewArray. |
1852 | 6032 |
|
3195 | 6033 |
newColors := oldColors collect:aBlock. |
6034 |
selectedColorIndices with:newColors do:[:idx :newColor | |
|
3281 | 6035 |
modifiedColormap at:idx-maskOffset put:newColor |
3195 | 6036 |
]. |
1682 | 6037 |
|
6038 |
newImage := img species new |
|
6039 |
width:img width |
|
6040 |
height:img height |
|
1843 | 6041 |
depth:img depth |
1682 | 6042 |
fromArray:img bits. |
6043 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6044 |
newImage colorMap:modifiedColormap. |
1682 | 6045 |
newImage fileName:img fileName. |
6046 |
newImage mask:(img mask copy). |
|
6047 |
||
6048 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
6049 |
self fetchImageData. |
|
6050 |
]. |
|
3195 | 6051 |
self selectedColors value:selectedColorIndices. |
1682 | 6052 |
! |
6053 |
||
1124 | 6054 |
reduceNumberOfColors |
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6055 |
|s n anyChange img usedColors| |
1124 | 6056 |
|
2817 | 6057 |
s := Dialog request:'Number of color bits to strip (1-7) ?' initialAnswer:3. |
1435 | 6058 |
s size == 0 ifTrue:[^ self]. |
1934 | 6059 |
|
1124 | 6060 |
n := Integer readFrom:s onError:0. |
6061 |
(n between:1 and:7) ifFalse:[ |
|
6062 |
Dialog warn:'Image unchanged'. |
|
6063 |
^ self |
|
6064 |
]. |
|
6065 |
||
6066 |
self withExecuteCursorDo:[ |
|
6067 |
anyChange := imageEditView reduceColorResolutionBy:n. |
|
6068 |
anyChange ifFalse:[ |
|
6069 |
Dialog warn:'Image unchanged'. |
|
6070 |
] ifTrue:[ |
|
6071 |
img := imageEditView image. |
|
6072 |
imageEditView image:img. |
|
1446 | 6073 |
|
6074 |
self fetchImageData. |
|
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6075 |
usedColors := img usedColorsMax:10000. |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6076 |
usedColors size == 10000 ifTrue:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6077 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6078 |
] ifFalse:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6079 |
Dialog information:(usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6080 |
] |
1124 | 6081 |
] |
6082 |
]. |
|
2817 | 6083 |
|
6084 |
"Modified: / 29-10-2010 / 18:08:01 / cg" |
|
1124 | 6085 |
! |
6086 |
||
1930 | 6087 |
reduceNumberOfColors2 |
1938 | 6088 |
|s rndR rndG rndB usedColors image newImage| |
6089 |
||
6090 |
s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4. |
|
1934 | 6091 |
s size == 0 ifTrue:[^ self]. |
1938 | 6092 |
rndR := Integer readFrom:s onError:0. |
1939 | 6093 |
|
1938 | 6094 |
s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2. |
6095 |
s size == 0 ifTrue:[^ self]. |
|
6096 |
rndG := Integer readFrom:s onError:0. |
|
1939 | 6097 |
|
1938 | 6098 |
s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10. |
6099 |
s size == 0 ifTrue:[^ self]. |
|
6100 |
rndB := Integer readFrom:s onError:0. |
|
1939 | 6101 |
|
6102 |
((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[ |
|
1930 | 6103 |
Dialog warn:'Image unchanged'. |
6104 |
^ self |
|
6105 |
]. |
|
6106 |
||
6107 |
self withExecuteCursorDo:[ |
|
3195 | 6108 |
|reduceColor| |
6109 |
||
6110 |
reduceColor := |
|
6111 |
[:clr | |
|
6112 |
|r g b nr ng nb| |
|
1934 | 6113 |
|
6114 |
r := clr redByte. |
|
6115 |
g := clr greenByte. |
|
6116 |
b := clr blueByte. |
|
1938 | 6117 |
nr := (r roundTo:rndR) min:255. |
6118 |
ng := (g roundTo:rndG) min:255. |
|
6119 |
nb := (b roundTo:rndB) min:255. |
|
1934 | 6120 |
|
3195 | 6121 |
Color redByte:nr greenByte:ng blueByte:nb. |
6122 |
]. |
|
6123 |
||
6124 |
image := self image. |
|
6125 |
"/ usedColors := image usedColorsMax:4096. |
|
6126 |
imageEditView makeUndo. |
|
6127 |
||
6128 |
newImage := image copy. |
|
6129 |
newImage photometric == #palette ifTrue:[ |
|
6130 |
newImage colorMap:(image colorMap collect:reduceColor). |
|
6131 |
] ifFalse:[ |
|
6132 |
image |
|
6133 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
6134 |
do:[:x :y :clr | |
|
6135 |
newImage colorAtX:x y:y put:(reduceColor value:clr) |
|
2260 | 6136 |
]. |
3195 | 6137 |
]. |
1934 | 6138 |
imageEditView image:newImage. |
6139 |
imageEditView setModified. |
|
6140 |
self updateImage. |
|
6141 |
self updateImagePreView. |
|
6142 |
||
6143 |
self fetchImageData. |
|
6144 |
usedColors := newImage usedColorsMax:10000. |
|
6145 |
usedColors size == 10000 ifTrue:[ |
|
6146 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
|
6147 |
] ifFalse:[ |
|
6148 |
Dialog information:(usedColors size printString , ' colors used.') |
|
6149 |
] |
|
1930 | 6150 |
]. |
2054 | 6151 |
|
6152 |
"Modified: / 07-07-2006 / 13:10:42 / cg" |
|
1930 | 6153 |
! |
6154 |
||
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6155 |
selectColor:aColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6156 |
|idx img cMap| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6157 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6158 |
aColor isNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6159 |
idx := nil. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6160 |
] ifFalse:[ |
2791 | 6161 |
img := self image. |
6162 |
img notNil ifTrue: [ |
|
6163 |
aColor == Color noColor ifTrue:[ |
|
6164 |
(img mask notNil) ifTrue:[ |
|
6165 |
idx := 1. |
|
6166 |
] |
|
6167 |
] ifFalse:[ |
|
2447 | 6168 |
(cMap := self listOfColors) notNil ifTrue:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6169 |
idx := cMap indexOf:aColor ifAbsent:nil. |
2447 | 6170 |
]. |
6171 |
idx isNil ifTrue:[ |
|
6172 |
"/ should not happen... |
|
6173 |
(cMap := img colorMap) notNil ifTrue:[ |
|
6174 |
idx := cMap indexOf:aColor ifAbsent:nil. |
|
6175 |
idx notNil ifTrue:[ |
|
6176 |
img mask notNil ifTrue:[ |
|
6177 |
idx := idx + 1. |
|
6178 |
]. |
|
6179 |
] |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6180 |
]. |
2447 | 6181 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6182 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6183 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6184 |
]. |
3195 | 6185 |
self selectedColors value:{idx}. |
2790 | 6186 |
|
2791 | 6187 |
"Modified: / 02-07-2010 / 12:06:07 / cg" |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6188 |
! |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6189 |
|
1682 | 6190 |
selectedColorIndexOrNil |
2651 | 6191 |
|img clrIndex| |
1682 | 6192 |
|
6193 |
img := self image. |
|
6194 |
img isNil ifTrue:[ |
|
2764 | 6195 |
"/ self warn:'No Image.'. |
1682 | 6196 |
^ nil |
6197 |
]. |
|
6198 |
clrIndex := self selectionOfColor value. |
|
1896 | 6199 |
self hasMask "img mask notNil" ifTrue: [ |
2449
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6200 |
(clrIndex isInteger and:[clrIndex > 1]) ifTrue:[ |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6201 |
^ clrIndex - 1 |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6202 |
]. |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6203 |
^ nil |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6204 |
]. |
1682 | 6205 |
^ clrIndex |
6206 |
! |
|
6207 |
||
1852 | 6208 |
selectedColorOrNil |
2447 | 6209 |
|cmapIndex img cMap colorList| |
1896 | 6210 |
|
6211 |
cmapIndex := self selectedColorIndexOrNil. |
|
1900 | 6212 |
cmapIndex isNil ifTrue:[^ nil]. |
2556 | 6213 |
cmapIndex == 0 ifTrue:[^ nil]. |
1852 | 6214 |
|
6215 |
img := self image. |
|
6216 |
cMap := img colorMap. |
|
6217 |
cMap isNil ifTrue:[ |
|
2447 | 6218 |
"/ self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
6219 |
colorList := self listOfColors. |
|
6220 |
colorList notNil ifTrue:[ |
|
6221 |
^ colorList at:cmapIndex ifAbsent:nil |
|
6222 |
]. |
|
1900 | 6223 |
^ nil |
1852 | 6224 |
]. |
1896 | 6225 |
^ cMap at:cmapIndex. |
1852 | 6226 |
! |
6227 |
||
1008 | 6228 |
sortColorMap |
6229 |
"calculates a new color map for the image, sorting colors" |
|
6230 |
||
3195 | 6231 |
self sortColorMapWith:self sortBlockForColorsByRGB |
1939 | 6232 |
! |
6233 |
||
6234 |
sortColorMapWith:sortBlock |
|
6235 |
"calculates a new color map for the image, sorting colors" |
|
6236 |
||
3224 | 6237 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits |
6238 |
expectedSize w h| |
|
1008 | 6239 |
|
6240 |
oldImage := self image. |
|
6241 |
depth := oldImage depth. |
|
3224 | 6242 |
w := oldImage width. |
6243 |
h := oldImage height. |
|
1008 | 6244 |
|
2652 | 6245 |
usedColors := oldImage realColorMap. |
6246 |
||
6247 |
"/ translation table |
|
6248 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
6249 |
newColorMap := usedColors asArray. |
|
6250 |
newColorMap sort:sortBlock. |
|
6251 |
||
6252 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
6253 |
|newPixel| |
|
6254 |
||
6255 |
(usedColors includes:clr) ifTrue:[ |
|
6256 |
newPixel := newColorMap indexOf:clr. |
|
6257 |
oldToNew at:oldIdx put:newPixel-1. |
|
6258 |
] |
|
1008 | 6259 |
]. |
6260 |
||
2652 | 6261 |
oldBits := oldImage bits. |
3224 | 6262 |
"/ sanity check... |
6263 |
expectedSize := ((w * h * depth + 7) // 8). |
|
6264 |
(oldBits size < expectedSize) ifTrue:[ |
|
6265 |
self halt:'incorrect pixeldata size'. |
|
6266 |
oldBits := (ByteArray new:expectedSize) replaceFrom:1 with:oldBits; yourself. |
|
6267 |
]. |
|
2652 | 6268 |
newBits := ByteArray new:(oldBits size). |
6269 |
depth ~~ 8 ifTrue:[ |
|
3224 | 6270 |
|
2652 | 6271 |
"/ expand/compress can only handle 8bits |
3224 | 6272 |
tmpBits := ByteArray uninitializedNew:(w*h). |
2652 | 6273 |
oldBits |
6274 |
expandPixels:depth |
|
3224 | 6275 |
width:w height:h |
2652 | 6276 |
into:tmpBits |
6277 |
mapping:oldToNew. |
|
6278 |
tmpBits |
|
6279 |
compressPixels:depth |
|
3224 | 6280 |
width:w height:h |
2652 | 6281 |
into:newBits |
6282 |
mapping:nil |
|
6283 |
] ifFalse:[ |
|
6284 |
oldBits |
|
6285 |
expandPixels:depth |
|
3224 | 6286 |
width:w height:h |
2652 | 6287 |
into:newBits |
6288 |
mapping:oldToNew. |
|
6289 |
]. |
|
6290 |
||
6291 |
newImage := oldImage species new |
|
3224 | 6292 |
width:w height:h depth:depth |
2652 | 6293 |
fromArray:newBits. |
6294 |
||
6295 |
newImage colorMap:newColorMap. |
|
6296 |
newImage fileName:oldImage fileName. |
|
6297 |
newImage mask:(oldImage mask copy). |
|
6298 |
||
6299 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
6300 |
self fetchImageData. |
|
1008 | 6301 |
] |
6302 |
||
6303 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
6304 |
"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
|
6305 |
! ! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
6306 |
|
1715 | 6307 |
!ImageEditor methodsFor:'user actions-editing'! |
400 | 6308 |
|
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6309 |
do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6310 |
|box dx1 dx2 image| |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6311 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6312 |
image := imageEditView image. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6313 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6314 |
box := EnterBox new. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6315 |
box title:(resources string:'dX1 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6316 |
box okText:(resources string:'OK'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6317 |
box abortText:(resources string:'Cancel'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6318 |
box initialText:'0.1'. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6319 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6320 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6321 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6322 |
and: [(dx1 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6323 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6324 |
box title:(resources string:'dX2 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6325 |
box initialText:(dx1 printString). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6326 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6327 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6328 |
and: [(dx2 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6329 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6330 |
imageEditView threeDProjection:dx1 and:dx2. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6331 |
] |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6332 |
]. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6333 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6334 |
self updateInfoLabel |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6335 |
! |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6336 |
|
1882 | 6337 |
doBrightenImage |
6338 |
imageEditView brightenImage. |
|
6339 |
self listOfColors removeAll. |
|
6340 |
self findColorMapMode. |
|
2585 | 6341 |
"/ imageEditView removelastUndo |
1882 | 6342 |
! |
6343 |
||
767 | 6344 |
doBrowseClass |
6345 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
400 | 6346 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6347 |
|cls| |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6348 |
|
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
6349 |
cls := imageEditView resourceClass. |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6350 |
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
|
6351 |
|
3242 | 6352 |
cls browserClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6353 |
openInClass:cls class |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6354 |
selector:(imageEditView resourceSelector) |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6355 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6356 |
"Modified: / 31.7.1998 / 02:01:15 / cg" |
400 | 6357 |
! |
6358 |
||
1703 | 6359 |
doCopyImageToClipboard |
6360 |
imageEditView copyImageToClipboard. |
|
6361 |
! |
|
6362 |
||
1045 | 6363 |
doCropAll |
986 | 6364 |
"find all borders and cut them off" |
6365 |
||
1045 | 6366 |
imageEditView cropLeft:true right:true top:true bottom:true. |
986 | 6367 |
self updateInfoLabel |
6368 |
||
6369 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
6370 |
"Created: / 7.9.1998 / 16:33:43 / cg" |
|
6371 |
! |
|
6372 |
||
1045 | 6373 |
doCropBottom |
986 | 6374 |
"find a bottom border and cut it off" |
6375 |
||
1045 | 6376 |
imageEditView cropLeft:false right:false top:false bottom:true. |
986 | 6377 |
self updateInfoLabel |
6378 |
||
6379 |
"Created: / 7.9.1998 / 13:00:20 / cg" |
|
6380 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
6381 |
! |
|
6382 |
||
1045 | 6383 |
doCropLeft |
986 | 6384 |
"find a left border and cut it off" |
6385 |
||
1045 | 6386 |
imageEditView cropLeft:true right:false top:false bottom:false. |
986 | 6387 |
self updateInfoLabel |
6388 |
||
6389 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
6390 |
"Modified: / 7.9.1998 / 14:26:34 / cg" |
|
6391 |
! |
|
6392 |
||
1045 | 6393 |
doCropManual |
986 | 6394 |
"let user specify borders and cut them off" |
6395 |
||
1502 | 6396 |
|bindings left top right bottom img firstChange gropAction acceptChannel| |
6397 |
||
6398 |
acceptChannel := TriggerValue new. |
|
1490 | 6399 |
|
6400 |
firstChange := true. |
|
6401 |
||
1502 | 6402 |
gropAction := |
6403 |
[:lV :rV :tV :bV | |l r t b| |
|
6404 |
acceptChannel value:true. |
|
6405 |
||
6406 |
l := lV value. |
|
6407 |
r := rV value. |
|
6408 |
t := tV value. |
|
6409 |
b := bV value. |
|
6410 |
(l + r + t + b) == 0 ifTrue:[ |
|
2520 | 6411 |
UserPreferences current beepInEditor ifTrue:[ |
6412 |
self window beep |
|
6413 |
] |
|
1502 | 6414 |
] ifFalse:[ |
6415 |
img := imageEditView image. |
|
6416 |
firstChange ifTrue:[ |
|
6417 |
imageEditView makeUndo. |
|
6418 |
firstChange := false. |
|
6419 |
]. |
|
6420 |
imageEditView |
|
6421 |
makeSubImageX:l y:t |
|
6422 |
width:(img width - l - r) |
|
6423 |
height:(img height - t - b). |
|
2546 | 6424 |
|
6425 |
self updateImagePreView. |
|
1502 | 6426 |
self updateInfoLabel |
6427 |
]. |
|
1490 | 6428 |
]. |
986 | 6429 |
|
6430 |
bindings := IdentityDictionary new. |
|
1507 | 6431 |
bindings at:#left put:(left := 1 asValue). |
6432 |
bindings at:#right put:(right := 1 asValue). |
|
6433 |
bindings at:#top put:(top := 1 asValue). |
|
6434 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1502 | 6435 |
bindings at:#acceptChannel put:acceptChannel. |
6436 |
||
6437 |
bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
|
6438 |
bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
|
6439 |
bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
|
6440 |
bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
|
6441 |
||
6442 |
bindings at:#applyAction put:[ gropAction value:left value:right value:top value:bottom ]. |
|
1490 | 6443 |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
6444 |
(self openDialogInterface:#cropDialogSpec withBindings:bindings) |
1507 | 6445 |
ifFalse:[ |
6446 |
firstChange ~~ true ifTrue:[ |
|
1558 | 6447 |
imageEditView undo. |
6448 |
self updateImagePreView. |
|
1507 | 6449 |
] |
6450 |
]. |
|
986 | 6451 |
|
6452 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6453 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6454 |
! |
|
6455 |
||
1045 | 6456 |
doCropRight |
986 | 6457 |
"find a right border and cut it off" |
6458 |
||
1045 | 6459 |
imageEditView cropLeft:false right:true top:false bottom:false. |
986 | 6460 |
self updateInfoLabel |
6461 |
||
6462 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
6463 |
"Modified: / 7.9.1998 / 14:26:44 / cg" |
|
6464 |
! |
|
6465 |
||
1045 | 6466 |
doCropTop |
986 | 6467 |
"find a top border and cut it off" |
6468 |
||
1045 | 6469 |
imageEditView cropLeft:false right:false top:true bottom:false. |
986 | 6470 |
self updateInfoLabel |
6471 |
||
6472 |
"Created: / 7.9.1998 / 13:00:19 / cg" |
|
6473 |
"Modified: / 7.9.1998 / 14:26:52 / cg" |
|
6474 |
! |
|
6475 |
||
1882 | 6476 |
doDarkenImage |
6477 |
imageEditView darkenImage. |
|
6478 |
self listOfColors removeAll. |
|
6479 |
self findColorMapMode. |
|
2585 | 6480 |
"/ imageEditView removelastUndo |
1882 | 6481 |
! |
6482 |
||
1433 | 6483 |
doEditMask |
6484 |
self image mask edit |
|
6485 |
! |
|
6486 |
||
767 | 6487 |
doFlipHorizontal |
6488 |
"flips horizontally current image" |
|
400 | 6489 |
|
911 | 6490 |
imageEditView flipHorizontal |
400 | 6491 |
! |
6492 |
||
767 | 6493 |
doFlipVertical |
6494 |
"flips vertically current image" |
|
400 | 6495 |
|
911 | 6496 |
imageEditView flipVertical |
400 | 6497 |
! |
6498 |
||
2196 | 6499 |
doInsertTextFromUser |
3157 | 6500 |
|text tempForm tempImage maskImage font w h paintColor| |
2196 | 6501 |
|
2424 | 6502 |
text := Dialog request:'Text to be inserted (placed as bitmap into clipboard for paste):'. |
6503 |
text isEmptyOrNil ifTrue:[^ self ]. |
|
2196 | 6504 |
|
6505 |
font := Font family:'arial' size:20. |
|
6506 |
font := font onDevice:Screen current. |
|
6507 |
w := font widthOf:text. |
|
6508 |
h := font heightOf:text. |
|
6509 |
||
6510 |
tempForm := Form extent:(w@h) depth:1 onDevice:(Screen current). |
|
6511 |
tempForm clear. |
|
6512 |
tempForm font:font. |
|
6513 |
tempForm paint:(Color colorId:1). |
|
6514 |
tempForm displayString:text at:(0@font ascent). |
|
6515 |
||
6516 |
tempImage := tempForm asImage. |
|
6517 |
maskImage := tempForm asImage. |
|
3157 | 6518 |
|
6519 |
paintColor := imageEditView selectedColor. |
|
6520 |
paintColor colorId == 0 ifTrue:[ |
|
6521 |
paintColor := Color black |
|
6522 |
]. |
|
2196 | 6523 |
tempImage |
6524 |
photometric:#palette; |
|
3157 | 6525 |
colorMap:(Array |
6526 |
with:Color white |
|
6527 |
with:paintColor); |
|
2196 | 6528 |
mask:maskImage. |
6529 |
||
6530 |
ImageEditView copyImageToClipboard:tempImage. |
|
6531 |
self editMode value:#paste. |
|
6532 |
||
6533 |
"Modified: / 11-11-2007 / 12:32:55 / cg" |
|
6534 |
! |
|
6535 |
||
1896 | 6536 |
doInspectImage |
6537 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
6538 |
||
6539 |
self image inspect |
|
6540 |
! |
|
6541 |
||
767 | 6542 |
doMagnifyDown |
1987 | 6543 |
"magnifies the current image one step down" |
400 | 6544 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6545 |
|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
|
6546 |
|
1987 | 6547 |
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
|
6548 |
(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
|
6549 |
magHolder value: mag - 1 |
400 | 6550 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6551 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6552 |
"Modified: / 26.7.1998 / 20:24:08 / cg" |
400 | 6553 |
! |
6554 |
||
767 | 6555 |
doMagnifyImage |
1479 | 6556 |
"magnifies the current image to a new size" |
400 | 6557 |
|
3196 | 6558 |
|box newSize image antiAliased| |
6559 |
||
6560 |
antiAliased := false asValue. |
|
1353 | 6561 |
image := imageEditView image. |
6562 |
||
6563 |
box := EnterBox new. |
|
6564 |
box title:(resources string:'Images new size:'). |
|
6565 |
box okText:(resources string:'OK'). |
|
6566 |
box abortText:(resources string:'Cancel'). |
|
6567 |
box initialText:image extent printString. |
|
3196 | 6568 |
box addCheckBox:(resources string:'Antialiased') on:antiAliased. |
1353 | 6569 |
box showAtPointer. |
3196 | 6570 |
|
1353 | 6571 |
(box accepted |
1960 | 6572 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6573 |
ifTrue:[ |
1479 | 6574 |
newSize isPoint ifFalse:[ |
3196 | 6575 |
self warn:'Please enter the new size as ''x @ y''.'. |
1479 | 6576 |
^ self. |
6577 |
]. |
|
3196 | 6578 |
antiAliased value ifTrue:[ |
6579 |
imageEditView magnifyAntiAliasedImageTo:newSize. |
|
6580 |
] ifFalse:[ |
|
6581 |
imageEditView magnifyImageTo:newSize. |
|
6582 |
]. |
|
1479 | 6583 |
]. |
6584 |
||
6585 |
self updateInfoLabel |
|
6586 |
! |
|
6587 |
||
6588 |
doMagnifyImageBy |
|
6589 |
"magnifies the current image (by a scale)" |
|
6590 |
||
3196 | 6591 |
|oldSize newSize scaleString scale image antiAliased| |
1479 | 6592 |
|
6593 |
image := imageEditView image. |
|
6594 |
oldSize := image extent. |
|
6595 |
||
3196 | 6596 |
antiAliased := false asValue. |
6597 |
||
6598 |
Dialog modifyingBoxWith:[:box | |
|
6599 |
box addCheckBox:(resources string:'Antialiased') on:antiAliased. |
|
6600 |
] do:[ |
|
6601 |
scaleString := Dialog |
|
2260 | 6602 |
request:(resources string:'Scale factor (<1 to shrink; >1 to magnify):') |
6603 |
initialAnswer:'1' |
|
6604 |
list:#('0.25' '0.5' '2' '4'). |
|
3196 | 6605 |
]. |
6606 |
scaleString isNil ifTrue:[^ self]. |
|
2260 | 6607 |
|
6608 |
"/ box := EnterBox new. |
|
6609 |
"/ box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):'). |
|
6610 |
"/ box okText:(resources string:'OK'). |
|
6611 |
"/ box abortText:(resources string:'Cancel'). |
|
6612 |
"/ box initialText:1 printString. |
|
6613 |
"/ box showAtPointer. |
|
6614 |
"/ box accepted ifTrue:[ |
|
6615 |
"/ scaleString := box contents. |
|
6616 |
"/ ]. |
|
6617 |
||
6618 |
scale := Object readFromString:scaleString onError:nil. |
|
6619 |
||
6620 |
scale notNil ifTrue:[ |
|
1479 | 6621 |
scale isNumber ifFalse:[ |
6622 |
self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'. |
|
6623 |
^ self. |
|
6624 |
]. |
|
6625 |
newSize := oldSize * scale. |
|
3196 | 6626 |
antiAliased value ifTrue:[ |
6627 |
imageEditView magnifyAntiAliasedImageTo:newSize. |
|
6628 |
] ifFalse:[ |
|
6629 |
imageEditView magnifyImageTo:newSize. |
|
6630 |
]. |
|
1353 | 6631 |
]. |
6632 |
||
400 | 6633 |
self updateInfoLabel |
6634 |
! |
|
6635 |
||
767 | 6636 |
doMagnifyUp |
1987 | 6637 |
"magnifies the current image one step up" |
400 | 6638 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6639 |
|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
|
6640 |
|
1987 | 6641 |
magHolder := self magnificationHolder. |
3344 | 6642 |
(mag := magHolder value) < 63 ifTrue: [ |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6643 |
magHolder value: mag + 1 |
400 | 6644 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6645 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6646 |
"Modified: / 26.7.1998 / 20:23:52 / cg" |
400 | 6647 |
! |
6648 |
||
767 | 6649 |
doNegativeImage |
6650 |
"negates current image by negating the color map" |
|
400 | 6651 |
|
1598 | 6652 |
self image depth ~~ 1 ifTrue:[ |
6653 |
Dialog warn:'Only useful for depth 1 images'. |
|
6654 |
^ self |
|
6655 |
]. |
|
911 | 6656 |
imageEditView negativeImage. |
400 | 6657 |
self listOfColors removeAll. |
901 | 6658 |
self findColorMapMode. |
2585 | 6659 |
"/ imageEditView removelastUndo |
400 | 6660 |
! |
6661 |
||
767 | 6662 |
doResizeImage |
1353 | 6663 |
"resizes the current image" |
6664 |
||
6665 |
|box newSize image| |
|
6666 |
||
6667 |
image := imageEditView image. |
|
6668 |
||
6669 |
box := EnterBox new. |
|
6670 |
box title:(resources string:'Images new size:'). |
|
6671 |
box okText:(resources string:'OK'). |
|
6672 |
box abortText:(resources string:'Cancel'). |
|
6673 |
box initialText:image extent printString. |
|
6674 |
box showAtPointer. |
|
6675 |
(box accepted |
|
1960 | 6676 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6677 |
ifTrue:[ |
6678 |
imageEditView resizeImageTo:newSize. |
|
6679 |
]. |
|
400 | 6680 |
! |
6681 |
||
767 | 6682 |
doRotateImage |
6683 |
"rotates current image" |
|
400 | 6684 |
|
2884 | 6685 |
|rotationString box rotation| |
6686 |
||
6687 |
rotationString := Dialog |
|
6688 |
request:(resources string:'Rotate by (degrees, clockwise):') |
|
6689 |
list:#( '-90' '90' '180' '45' '-45' '135' '-135' ) |
|
6690 |
initialAnswer:90. |
|
6691 |
rotationString isEmptyOrNil ifTrue:[^ self]. "/ cancelled |
|
6692 |
rotation := Number readFrom:rotationString onError:[nil]. |
|
6693 |
rotation isNil ifTrue:[^ self]. |
|
6694 |
||
6695 |
"/ box := EnterBox new. |
|
6696 |
"/ box title:(resources string:'Rotate by (degrees, clockwise):'). |
|
6697 |
"/ box okText:(resources string:'OK'). |
|
6698 |
"/ box abortText:(resources string:'Cancel'). |
|
6699 |
"/ box initialText: '0'. |
|
6700 |
"/ box showAtPointer. |
|
6701 |
"/ (box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil]) |
|
6702 |
"/ ifFalse:[ ^ self ]. |
|
6703 |
||
6704 |
imageEditView rotateImageBy:rotation. |
|
6705 |
self updateInfoLabel. |
|
6706 |
||
6707 |
"Modified: / 18-03-2012 / 14:41:14 / cg" |
|
400 | 6708 |
! |
6709 |
||
1557 | 6710 |
doShiftManual |
6711 |
"let user specify amount and shift" |
|
6712 |
||
1713 | 6713 |
|bindings amount img firstChange shiftAction acceptChannel wrapHolder| |
1557 | 6714 |
|
6715 |
acceptChannel := TriggerValue new. |
|
1960 | 6716 |
wrapHolder := (lastShiftUsedWrap ? true) asValue. |
1557 | 6717 |
|
6718 |
firstChange := true. |
|
6719 |
||
6720 |
shiftAction := |
|
6721 |
[:shiftH :shiftV | |
|
6722 |
acceptChannel value:true. |
|
6723 |
||
6724 |
img := imageEditView image. |
|
6725 |
firstChange ifTrue:[ |
|
6726 |
imageEditView makeUndo. |
|
6727 |
firstChange := false. |
|
6728 |
]. |
|
1713 | 6729 |
imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). |
1557 | 6730 |
self updateInfoLabel |
6731 |
]. |
|
6732 |
||
6733 |
bindings := IdentityDictionary new. |
|
6734 |
bindings at:#shiftAmount put:(amount := 1 asValue). |
|
1713 | 6735 |
bindings at:#wrap put:wrapHolder. |
1557 | 6736 |
bindings at:#acceptChannel put:acceptChannel. |
6737 |
||
6738 |
bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ]. |
|
6739 |
bindings at:#shiftRightNow put:[ shiftAction value:amount value value:0 ]. |
|
6740 |
bindings at:#shiftUpNow put:[ shiftAction value:0 value:(-1*amount value) ]. |
|
6741 |
bindings at:#shiftDownNow put:[ shiftAction value:0 value:amount value ]. |
|
6742 |
||
6743 |
(self openDialogInterface:#shiftDialogSpec withBindings:bindings) |
|
6744 |
ifFalse:[ |
|
6745 |
firstChange ~~ true ifTrue:[ |
|
6746 |
imageEditView undo |
|
6747 |
] |
|
6748 |
]. |
|
1960 | 6749 |
lastShiftUsedWrap := wrapHolder value. |
1557 | 6750 |
|
6751 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6752 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6753 |
! |
|
6754 |
||
1480 | 6755 |
doUnCropManual |
6756 |
"let user specify borders and add them" |
|
6757 |
||
6758 |
|bindings left top right bottom img| |
|
6759 |
||
6760 |
bindings := IdentityDictionary new. |
|
1704 | 6761 |
bindings at:#left put:(left := 1 asValue). |
6762 |
bindings at:#right put:(right := 1 asValue). |
|
6763 |
bindings at:#top put:(top := 1 asValue). |
|
6764 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
6765 |
(self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
1480 | 6766 |
ifTrue:[ |
6767 |
left := left value. |
|
6768 |
right := right value. |
|
6769 |
top := top value. |
|
6770 |
bottom := bottom value. |
|
6771 |
img := imageEditView image. |
|
6772 |
||
6773 |
imageEditView |
|
6774 |
makeBorderedImageX:left y:top |
|
6775 |
width:(img width + left + right) |
|
6776 |
height:(img height + top + bottom). |
|
6777 |
self updateInfoLabel |
|
6778 |
]. |
|
6779 |
||
6780 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6781 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6782 |
! |
|
6783 |
||
767 | 6784 |
doUndo |
6785 |
"reverses last edit action" |
|
400 | 6786 |
|
1436 | 6787 |
imageEditView undo. |
3253 | 6788 |
self updateImagePreView |
400 | 6789 |
! ! |
6790 |
||
2812 | 6791 |
!ImageEditor methodsFor:'user actions-image sequences'! |
6792 |
||
6793 |
editEachImageFromSequence |
|
6794 |
|seq| |
|
6795 |
||
6796 |
self checkModified ifFalse:[ ^ self ]. |
|
6797 |
||
6798 |
imageEditView releaseUndos. |
|
6799 |
||
6800 |
seq := self image imageSequence. |
|
6801 |
seq size > 10 ifTrue:[ |
|
6802 |
(Dialog confirm:(resources string:'Ok to open %1 image editor windows?' with:seq size)) |
|
6803 |
ifFalse:[^ self]. |
|
6804 |
]. |
|
6805 |
||
6806 |
seq do:[:eachFrame | |
|
6807 |
ImageEditor openOnImage:eachFrame image |
|
6808 |
]. |
|
6809 |
||
6810 |
"Modified: / 21-10-2010 / 15:01:25 / cg" |
|
6811 |
! |
|
6812 |
||
6813 |
gotoImageInSequence:index |
|
6814 |
"display the next image in the image sequence" |
|
6815 |
||
6816 |
|img seq frame listOfColors| |
|
6817 |
||
6818 |
imageEditView releaseUndos. |
|
6819 |
||
6820 |
seq := self image imageSequence. |
|
6821 |
||
6822 |
imageSeqNr := index. |
|
6823 |
frame := seq at:imageSeqNr. |
|
6824 |
imageEditView image:(frame image). |
|
6825 |
||
6826 |
(img := self image) notNil ifTrue:[ |
|
6827 |
listOfColors := self listOfColors. |
|
6828 |
img colorMap notNil ifTrue:[ |
|
6829 |
listOfColors contents:(img usedColors asSet asOrderedCollection). |
|
6830 |
] ifFalse:[ |
|
6831 |
listOfColors removeAll. |
|
6832 |
]. |
|
6833 |
self findColorMapMode. |
|
6834 |
self updateLabelsAndHistory. |
|
6835 |
img := img onDevice:device. |
|
6836 |
imageEditView image:img. |
|
6837 |
] ifFalse:[ |
|
6838 |
self updateForNoImage |
|
6839 |
]. |
|
6840 |
||
6841 |
"Created: / 21-10-2010 / 14:22:11 / cg" |
|
6842 |
! |
|
6843 |
||
6844 |
nextImageInSequence |
|
6845 |
"display the next image in the image sequence" |
|
6846 |
||
6847 |
|seq index| |
|
6848 |
||
6849 |
seq := self image imageSequence. |
|
6850 |
(index := imageSeqNr) isNil ifTrue:[ |
|
6851 |
index := 1. |
|
6852 |
]. |
|
6853 |
index := index + 1. |
|
6854 |
index > seq size ifTrue:[ |
|
6855 |
self information:'Back to first image in sequence'. |
|
6856 |
index := 1. |
|
6857 |
]. |
|
6858 |
self gotoImageInSequence:index. |
|
6859 |
||
6860 |
"Modified: / 21-10-2010 / 14:24:11 / cg" |
|
6861 |
! |
|
6862 |
||
6863 |
previousImageInSequence |
|
6864 |
"display the previous image in the image sequence" |
|
6865 |
||
6866 |
|seq index| |
|
6867 |
||
6868 |
seq := self image imageSequence. |
|
6869 |
(index := imageSeqNr) isNil ifTrue:[ |
|
6870 |
index := 1. |
|
6871 |
]. |
|
6872 |
index := index - 1. |
|
6873 |
index < 1 ifTrue:[ |
|
6874 |
self information:'Wrap to last image in sequence'. |
|
6875 |
index := seq size. |
|
6876 |
]. |
|
6877 |
self gotoImageInSequence:index. |
|
6878 |
||
6879 |
"Created: / 21-10-2010 / 14:25:03 / cg" |
|
6880 |
! ! |
|
6881 |
||
1715 | 6882 |
!ImageEditor methodsFor:'user actions-loading'! |
400 | 6883 |
|
767 | 6884 |
doLoadFromClass |
6885 |
"opens a dialog for loading an image from class and a (resource-) selector" |
|
400 | 6886 |
|
1122 | 6887 |
|img| |
6888 |
||
1975 | 6889 |
self checkModified ifFalse:[ ^ self ]. |
6890 |
||
1054 | 6891 |
(imageEditView loadFromClass) notNil ifTrue:[ |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6892 |
imageSeqNr := nil. |
1122 | 6893 |
(img := self image) notNil ifTrue: [ |
1900 | 6894 |
self updateColorsFromImage:img. |
574 | 6895 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
6896 |
self updateLabelsAndHistory. |
1054 | 6897 |
] ifFalse: [ |
6898 |
self updateForNoImage |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
6899 |
]. |
449 | 6900 |
] |
400 | 6901 |
! |
6902 |
||
767 | 6903 |
doLoadFromFile |
6904 |
"opens a dialog for loading an image from a file" |
|
400 | 6905 |
|
2820 | 6906 |
|img file filters title| |
1353 | 6907 |
|
1975 | 6908 |
self checkModified ifFalse:[ ^ self ]. |
6909 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6910 |
imageSeqNr := nil. |
1353 | 6911 |
img := self image. |
6912 |
img notNil ifTrue: [ |
|
6913 |
file := img fileName |
|
6914 |
]. |
|
6915 |
||
2820 | 6916 |
title := (resources string:'Load Image From'). |
6917 |
||
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
6918 |
(UserPreferences current useNativeFileDialog |
3100 | 6919 |
and:[Screen current isWindowsPlatform]) ifTrue:[ |
2820 | 6920 |
self withWaitCursorDo:[ |
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
6921 |
file := Screen current |
2820 | 6922 |
nativeFileDialogFor:(self window topView id) |
6923 |
save:false |
|
6924 |
title:title |
|
6925 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
6926 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 6927 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 6928 |
filter: |
6929 |
{ |
|
6930 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp;*.jpg' } . |
|
6931 |
{ (resources string:'All Files') . '*.*' } |
|
6932 |
} |
|
2821 | 6933 |
extension:nil |
2827 | 6934 |
"blocking:false". |
2820 | 6935 |
]. |
6936 |
] ifFalse:[ |
|
6937 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
6938 |
file notNil ifTrue:[ |
|
6939 |
file := FileSelectionBrowser |
|
6940 |
request:title |
|
6941 |
fileName:file |
|
6942 |
withFileFilters:filters. |
|
6943 |
] ifFalse:[ |
|
6944 |
file := FileSelectionBrowser |
|
6945 |
request:title |
|
6946 |
inDirectory:LastDirectory |
|
6947 |
withFileFilters:filters. |
|
6948 |
]. |
|
1353 | 6949 |
]. |
2820 | 6950 |
|
1353 | 6951 |
file notNil ifTrue:[ |
6952 |
LastDirectory := file asFilename directoryName. |
|
6953 |
self loadFromFile:file |
|
6954 |
] |
|
2820 | 6955 |
|
2827 | 6956 |
"Modified: / 14-12-2010 / 13:52:11 / cg" |
400 | 6957 |
! |
6958 |
||
2796 | 6959 |
doLoadFromURL |
6960 |
"opens a dialog for loading an image from a URL" |
|
6961 |
||
2866 | 6962 |
|tempFile url response| |
2796 | 6963 |
|
6964 |
self checkModified ifFalse:[ ^ self ]. |
|
6965 |
||
6966 |
url := Dialog |
|
2866 | 6967 |
request:(resources string:'Load Image from URL') |
2796 | 6968 |
initialAnswer:LastURL. |
6969 |
||
6970 |
url notEmptyOrNil ifTrue:[ |
|
3050 | 6971 |
HTTPInterface isNil ifTrue:[ Smalltalk loadPackage:'stx:goodies/communication']. |
6972 |
||
2796 | 6973 |
LastURL := url. |
3027 | 6974 |
tempFile := FileStream newTemporary close fileName. |
2866 | 6975 |
self withWaitCursorDo:[ |
6976 |
response := HTTPInterface get:url destinationFile:tempFile. |
|
6977 |
]. |
|
6978 |
response isErrorResponse ifTrue:[ |
|
6979 |
Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText). |
|
6980 |
] ifFalse:[ |
|
6981 |
self loadFromFile:tempFile. |
|
6982 |
]. |
|
2796 | 6983 |
tempFile delete |
6984 |
] |
|
6985 |
||
6986 |
"Created: / 20-09-2010 / 11:30:59 / cg" |
|
6987 |
! |
|
6988 |
||
767 | 6989 |
doNewImage |
6990 |
"opens a dialog with choices of size and color map for creating a new image" |
|
400 | 6991 |
|
1975 | 6992 |
|dialogAspects width height cMapString cMapMode cMap imageClass image szString defaultSize ext| |
6993 |
||
6994 |
self checkModified ifFalse:[ ^ self ]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6995 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6996 |
defaultSize := (self class listOfDefaultSizes includes:'32x32') |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6997 |
ifTrue:['32x32'] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6998 |
ifFalse:[self class listOfDefaultSizes first]. |
767 | 6999 |
|
1975 | 7000 |
dialogAspects := IdentityDictionary new |
767 | 7001 |
at:#listOfSizes put: self class listOfDefaultSizes asValue; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7002 |
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
|
7003 |
at:#selectionOfSize put: (LastSizeString ? defaultSize) asValue; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7004 |
at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue; |
400 | 7005 |
yourself. |
7006 |
||
1975 | 7007 |
(self openDialogInterface:#dialogSpecForNewImage withBindings:dialogAspects) |
1383 | 7008 |
ifTrue:[ |
1975 | 7009 |
szString := (dialogAspects at:#selectionOfSize) value. |
1960 | 7010 |
ext := self pointFromString:szString. |
1962 | 7011 |
ext isNil ifTrue:[ |
7012 |
width := height := 32 |
|
7013 |
] ifFalse:[ |
|
7014 |
width := ext x. |
|
7015 |
height := ext y. |
|
7016 |
]. |
|
1960 | 7017 |
"/ width := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]). |
7018 |
"/ height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]). |
|
400 | 7019 |
|
1975 | 7020 |
cMapString := (dialogAspects at:#selectionOfColorMap) value. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7021 |
cMapMode := self class namesOfColorMaps keyAtEqualValue:cMapString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7022 |
cMap := self class listOfColorMaps at:cMapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7023 |
imageClass := Image implementorForDepth:(cMap size highBit-1). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7024 |
image := imageClass width: width height: height. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7025 |
image bits:(ByteArray new:(image bytesPerRow*height)). |
400 | 7026 |
|
1637 | 7027 |
LastSizeString := szString. |
7028 |
LastColormapMode := cMapString. |
|
7029 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7030 |
(cMapMode startsWith: 'mask') ifTrue:[ |
3125
9d5624af77ab
Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents:
3122
diff
changeset
|
7031 |
image mask: (ImageMask width: width height: height depth: 1 fromArray: (ByteArray new: width*height)). |
400 | 7032 |
]. |
7033 |
image colorMap: cMap. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7034 |
(imageEditView image: image) notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7035 |
self updateListOfColorsAndColormapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7036 |
self updateLabelsAndHistory. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7037 |
]. |
400 | 7038 |
image fillRectangleX:0 y:0 width:width height:height with:Color white. |
767 | 7039 |
] |
929 | 7040 |
! |
7041 |
||
2058 | 7042 |
doNewImageEditor |
7043 |
"opens a new image editor" |
|
7044 |
||
7045 |
ImageEditor open |
|
7046 |
||
7047 |
"Created: / 17-08-2006 / 09:03:14 / cg" |
|
7048 |
! |
|
7049 |
||
1682 | 7050 |
doNewImageFromClipboard |
7051 |
|image| |
|
7052 |
||
1975 | 7053 |
self checkModified ifFalse:[ ^ self ]. |
7054 |
||
1682 | 7055 |
image := imageEditView clipBoard. |
3164 | 7056 |
image isImageOrForm ifFalse:[ |
7057 |
image := Image readFrom:(image asString) onError:nil. |
|
7058 |
image isNil ifTrue:[ |
|
7059 |
Dialog warn:'Clipboard does not contain an image I can use/understand'. |
|
7060 |
^ self. |
|
7061 |
]. |
|
7062 |
]. |
|
1975 | 7063 |
imageEditView image:image. |
7064 |
||
7065 |
image notNil ifTrue:[ |
|
1900 | 7066 |
self updateColorsFromImage:image. |
1682 | 7067 |
self findColorMapMode. |
7068 |
self updateLabelsAndHistory. |
|
7069 |
] |
|
7070 |
! |
|
7071 |
||
3200 | 7072 |
doNewMaskFromClipboard |
7073 |
|mask image newImage| |
|
7074 |
||
7075 |
self checkModified ifFalse:[ ^ self ]. |
|
7076 |
||
7077 |
mask := imageEditView clipBoard. |
|
7078 |
mask isImageOrForm ifFalse:[ |
|
7079 |
mask := Image readFrom:(mask asString) onError:nil. |
|
7080 |
mask isNil ifTrue:[ |
|
7081 |
Dialog warn:'Clipboard does not contain an image I can use/understand'. |
|
7082 |
^ self. |
|
7083 |
]. |
|
7084 |
]. |
|
7085 |
(image:= imageEditView image) isNil ifTrue:[ |
|
7086 |
image := mask. |
|
7087 |
]. |
|
7088 |
mask extent ~= image extent ifTrue:[ |
|
7089 |
mask := imageEditView resizedImage:mask to:image extent. |
|
7090 |
]. |
|
7091 |
newImage := image copy. |
|
7092 |
newImage mask:mask. |
|
7093 |
imageEditView newImageWithUndo:newImage. |
|
7094 |
self updateAfterImageChange. |
|
7095 |
"/ self updateColorsFromImage:image. |
|
7096 |
"/ self findColorMapMode. |
|
7097 |
"/ self updateLabelsAndHistory. |
|
7098 |
! |
|
7099 |
||
929 | 7100 |
grabScreenImage |
7101 |
"let user choose an area and grab that are for editing" |
|
7102 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7103 |
self grabScreenImageUsing:[ |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7104 |
|r| |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7105 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7106 |
[Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7107 |
r := Rectangle fromUser. |
2708 | 7108 |
(r width == 0 or:[r height == 0]) ifTrue:[ |
7109 |
nil |
|
7110 |
] ifFalse:[ |
|
7111 |
lastGrabbedScreenArea := r. |
|
7112 |
Image fromScreen:r |
|
7113 |
] |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7114 |
]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7115 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7116 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7117 |
grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7118 |
"grab again from the previous area for editing" |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7119 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7120 |
self grabScreenImageUsing:[ |
2708 | 7121 |
Image fromScreen:lastGrabbedScreenArea |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7122 |
]. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7123 |
! |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7124 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7125 |
grabScreenImageUsing:aBlock |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7126 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7127 |
|
1975 | 7128 |
self checkModified ifFalse:[ ^ self ]. |
7129 |
||
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7130 |
Processor |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7131 |
addTimedBlock:[ |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7132 |
|image d8image img| |
929 | 7133 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
7134 |
imageSeqNr := nil. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7135 |
image := aBlock value. |
2708 | 7136 |
image notNil ifTrue:[ |
1121 | 7137 |
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
|
7138 |
false ifTrue:[ |
1687
f4543a556b89
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1682
diff
changeset
|
7139 |
Error handle:[:ex | |sig| |
2996 | 7140 |
(sig := ex creator) == HaltInterrupt ifTrue:[ex reject]. |
1122 | 7141 |
sig == Signal noHandlerSignal ifTrue:[ex reject]. |
1121 | 7142 |
|
7143 |
self warn:'Could not convert to depth8 image (too many colors)'. |
|
7144 |
d8image := nil. |
|
7145 |
] do:[ |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
7146 |
d8image := Depth8Image fromImage:image photometric:#palette. |
1121 | 7147 |
]. |
7148 |
d8image notNil ifTrue:[ |
|
7149 |
image := d8image |
|
7150 |
] |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
7151 |
]. |
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7152 |
]. |
1121 | 7153 |
(imageEditView image:image) notNil ifTrue:[ |
7154 |
self listOfColors contents:(image colorMap). |
|
7155 |
self findColorMapMode. |
|
7156 |
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
|
7157 |
] |
1121 | 7158 |
] |
7159 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7160 |
afterSeconds:1 |
929 | 7161 |
|
7162 |
"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
|
7163 |
"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
|
7164 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
7165 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7166 |
grabWindowImage |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7167 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7168 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7169 |
self grabScreenImageUsing:[ |
3188 | 7170 |
|v topView| |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7171 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7172 |
(v := Screen current viewFromUser) notNil ifTrue:[ |
3188 | 7173 |
topView := v topView. |
7174 |
topView raise; makeFullyVisible. |
|
2704 | 7175 |
Delay waitForSeconds:0.5. "/ give view a chance to redraw itself. |
3188 | 7176 |
Image fromView:topView |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7177 |
]. |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7178 |
]. |
400 | 7179 |
! ! |
7180 |
||
1715 | 7181 |
!ImageEditor methodsFor:'user actions-saving'! |
400 | 7182 |
|
767 | 7183 |
doPrint |
7184 |
"prints current image on the current printer" |
|
400 | 7185 |
|
1734 | 7186 |
self withWaitCursorDo:[ |
7187 |
imageEditView print |
|
7188 |
] |
|
400 | 7189 |
! |
7190 |
||
1613 | 7191 |
doSaveButtonImageToFileAs |
7192 |
"opens a dialog for saving current image to a file" |
|
7193 |
||
7194 |
imageEditView saveButtonImageToFileAs. |
|
7195 |
self updateLabelsAndHistory. |
|
7196 |
! |
|
7197 |
||
767 | 7198 |
doSaveImageFile |
7199 |
"saves current image to current file" |
|
400 | 7200 |
|
1481 | 7201 |
imageEditView save. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7202 |
self clearModified. |
400 | 7203 |
! |
7204 |
||
767 | 7205 |
doSaveImageFileAs |
1922 | 7206 |
"opens a dialog for saving an image to a file" |
7207 |
||
7208 |
|img file filters| |
|
7209 |
||
7210 |
img := self image. |
|
7211 |
img notNil ifTrue: [ |
|
7212 |
file := img fileName |
|
7213 |
]. |
|
7214 |
||
2595 | 7215 |
filters := FileSelectionBrowser saveImageFileNameFilters. |
1922 | 7216 |
|
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
7217 |
(UserPreferences current useNativeFileDialog |
3100 | 7218 |
and:[Screen current isWindowsPlatform]) ifTrue:[ |
2820 | 7219 |
self withWaitCursorDo:[ |
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
7220 |
file := Screen current |
2820 | 7221 |
nativeFileDialogFor:(self window topView id) |
7222 |
save:true |
|
7223 |
title:(resources string:'Save Image To') |
|
7224 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
7225 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 7226 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 7227 |
filter: |
7228 |
{ |
|
7229 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp' } . |
|
7230 |
{ (resources string:'All Files') . '*.*' } |
|
7231 |
} |
|
2821 | 7232 |
extension:nil |
2827 | 7233 |
"blocking:false". |
2807 | 7234 |
]. |
2820 | 7235 |
] ifFalse:[ |
7236 |
(FileSelectionBrowser isNil or:[DirectoryView isNil]) ifTrue:[ |
|
7237 |
file notNil ifTrue:[ |
|
7238 |
file := Dialog requestFileName:'Save Image To' |
|
7239 |
default:file |
|
7240 |
pattern:(filters first). |
|
7241 |
] ifFalse:[ |
|
7242 |
file := Dialog |
|
7243 |
requestFileName:'Save Image To' |
|
7244 |
default:'image.png' |
|
7245 |
pattern:(filters first) |
|
7246 |
fromDirectory:LastDirectory. |
|
7247 |
]. |
|
2807 | 7248 |
] ifFalse:[ |
2820 | 7249 |
file notNil ifTrue:[ |
7250 |
file := FileSelectionBrowser |
|
7251 |
request:'Save Image To' |
|
7252 |
fileName:file |
|
7253 |
withFileFilters:filters. |
|
7254 |
] ifFalse:[ |
|
7255 |
file := FileSelectionBrowser |
|
7256 |
request:'Save Image To' |
|
7257 |
inDirectory:LastDirectory |
|
7258 |
withFileFilters:filters. |
|
7259 |
]. |
|
2807 | 7260 |
]. |
1922 | 7261 |
]. |
7262 |
file notNil ifTrue:[ |
|
7263 |
imageEditView saveImageFileAs:file. |
|
7264 |
LastDirectory := file asFilename directoryName. |
|
7265 |
self updateLabelsAndHistory. |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7266 |
self clearModified. |
1922 | 7267 |
] |
2807 | 7268 |
|
2827 | 7269 |
"Modified: / 14-12-2010 / 13:51:47 / cg" |
400 | 7270 |
! |
7271 |
||
767 | 7272 |
doSaveImageMaskFileAs |
7273 |
"opens a dialog for saving mask of current image to a file" |
|
400 | 7274 |
|
1481 | 7275 |
imageEditView saveImageMaskFileAs. |
400 | 7276 |
! |
7277 |
||
767 | 7278 |
doSaveMethod |
1975 | 7279 |
"saves the image in current class and selector" |
7280 |
||
7281 |
imageEditView saveMethod ifTrue:[ |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7282 |
self updateLabelsAndHistory. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7283 |
self clearModified. |
400 | 7284 |
] |
7285 |
! |
|
7286 |
||
767 | 7287 |
doSaveMethodAs |
7288 |
"opens a dialog for saving current image on a class and a selector" |
|
400 | 7289 |
|
1975 | 7290 |
imageEditView saveMethodAs ifTrue:[ |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7291 |
self updateLabelsAndHistory. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7292 |
self clearModified. |
400 | 7293 |
] |
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7294 |
! |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7295 |
|
3022 | 7296 |
doShowPixelArrayLiteralString |
7297 |
"opens a dialog showing a literal array-like storeString |
|
7298 |
(sometimes useful to embed an image into source code)" |
|
7299 |
||
7300 |
|img| |
|
7301 |
||
7302 |
img := imageEditView image. |
|
7303 |
TextBox openOn:img bits storeString |
|
7304 |
! |
|
7305 |
||
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7306 |
doShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7307 |
"opens a dialog showing the storeString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7308 |
(sometimes useful to embed an image into source code)" |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7309 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7310 |
|img| |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7311 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7312 |
img := imageEditView image. |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7313 |
TextBox openOn:img storeString |
1975 | 7314 |
! |
7315 |
||
7316 |
save |
|
7317 |
"saves current image on current class and selector" |
|
7318 |
||
7319 |
self doSaveMethod |
|
400 | 7320 |
! ! |
7321 |
||
1715 | 7322 |
!ImageEditor methodsFor:'user actions-settings'! |
1353 | 7323 |
|
7324 |
doChangeGridMagnification |
|
7325 |
"change grid magnification" |
|
7326 |
||
7327 |
|box oldGridLimit newGridLimit| |
|
7328 |
||
7329 |
oldGridLimit := imageEditView class gridMagnificationLimit asPoint. |
|
7330 |
||
7331 |
box := EnterBox new. |
|
7332 |
box title:(resources string:'Grid Magnification Limit:'). |
|
7333 |
box okText:(resources string:'OK'). |
|
7334 |
box abortText:(resources string:'Cancel'). |
|
7335 |
box initialText:(oldGridLimit x printString). |
|
7336 |
box showAtPointer. |
|
7337 |
||
7338 |
(box accepted |
|
7339 |
and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil] |
|
7340 |
) ifTrue:[ |
|
7341 |
newGridLimit := (99 min: (2 max:newGridLimit)) asPoint. |
|
7342 |
imageEditView class gridMagnificationLimit:newGridLimit. |
|
7343 |
imageEditView invalidate |
|
7344 |
] |
|
7345 |
||
2192 | 7346 |
! |
7347 |
||
7348 |
penWidth:n |
|
7349 |
imageEditView penWidth:n |
|
7350 |
||
7351 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
2375 | 7352 |
! |
7353 |
||
2881 | 7354 |
penWidthHolderChanged |
7355 |
imageEditView penWidth:(self penWidthHolder value) |
|
7356 |
||
7357 |
"Created: / 15-02-2012 / 22:32:00 / cg" |
|
7358 |
! |
|
7359 |
||
2375 | 7360 |
spraySpot:n |
7361 |
imageEditView spraySpot:n |
|
7362 |
||
7363 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
2881 | 7364 |
! |
7365 |
||
7366 |
spraySpotHolderChanged |
|
7367 |
imageEditView spraySpot:(self spraySpotHolder value) |
|
7368 |
||
7369 |
"Created: / 15-02-2012 / 22:37:08 / cg" |
|
1353 | 7370 |
! ! |
7371 |
||
400 | 7372 |
!ImageEditor class methodsFor:'documentation'! |
7373 |
||
7374 |
version |
|
7375 |
^ '$Header$' |
|
2590 | 7376 |
! |
7377 |
||
7378 |
version_CVS |
|
7379 |
^ '$Header$' |
|
400 | 7380 |
! ! |
2945 | 7381 |