author | Claus Gittinger <cg@exept.de> |
Fri, 20 Jan 2017 17:00:03 +0100 | |
changeset 3375 | d2a64b772792 |
parent 3374 | 2cb3e68941a8 |
child 3376 | c508738114fa |
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 |
3375 | 20 |
allowedToChangeImageDimensionAndDepth savedImage' |
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. |
3375 | 46 |
It is also used subclasses as a tool to post-process captured screen images and |
47 |
bitmaps in expecco. |
|
400 | 48 |
|
49 |
[start with:] |
|
50 |
ImageEditor open |
|
941 | 51 |
ImageEditor openOnClass:Icon andSelector:#startIcon |
400 | 52 |
|
53 |
[see also:] |
|
54 |
ImageEditView Image |
|
55 |
||
56 |
[author:] |
|
544 | 57 |
Thomas Zwick, eXept Software AG |
1806 | 58 |
Claus Gittinger, eXept Software AG |
400 | 59 |
" |
60 |
! ! |
|
61 |
||
62 |
!ImageEditor class methodsFor:'instance creation'! |
|
63 |
||
3357 | 64 |
openLoadingImageWith:aBlock modal:modalBoolean |
1975 | 65 |
"opens an Image Editor on anImage" |
66 |
||
67 |
|editor| |
|
68 |
||
69 |
editor := self new. |
|
70 |
editor allButOpen. |
|
71 |
aBlock value:editor. |
|
3357 | 72 |
modalBoolean ifTrue:[ |
73 |
editor openWindowModal. |
|
74 |
] ifFalse:[ |
|
75 |
editor openWindow. |
|
76 |
]. |
|
2764 | 77 |
^ editor |
1975 | 78 |
! |
79 |
||
400 | 80 |
openModalOnClass: aClass andSelector: aSelector |
1975 | 81 |
"opens a modal Image Editor on aClass and aSelector. |
82 |
Returns the real name of the edited resource method (in case, user changed it)." |
|
83 |
||
84 |
|imageEditor imageEditView className resourceClass resourceSelector| |
|
767 | 85 |
|
400 | 86 |
imageEditor := self new. |
767 | 87 |
|
900 | 88 |
aClass isClass ifTrue: [className := aClass name]. |
89 |
aClass isString ifTrue: [className := aClass]. |
|
903 | 90 |
aClass isNil ifTrue: [className := '']. |
400 | 91 |
|
2764 | 92 |
imageEditor postOpenAction: [ |
93 |
imageEditView := imageEditor imageEditView. |
|
94 |
imageEditor loadFromOrPrepareForClass: aClass andSelector: aSelector |
|
95 |
]. |
|
400 | 96 |
imageEditor openModal. |
97 |
||
1975 | 98 |
resourceClass := imageEditView resourceClass. |
99 |
resourceSelector := imageEditView resourceSelector. |
|
100 |
||
101 |
(resourceClass isNil or:[resourceSelector isNil]) ifTrue:[^ nil]. |
|
102 |
^ Array with:resourceClass with:resourceSelector |
|
1966 | 103 |
|
104 |
" |
|
105 |
self openModalOnClass: self andSelector: #leftMouseKeyIcon |
|
106 |
" |
|
400 | 107 |
! |
108 |
||
3357 | 109 |
openModalOnFile:aFileName |
110 |
"opens an Image Editor on aFileName" |
|
111 |
||
112 |
self openLoadingImageWith:[:editor | |
|
113 |
editor loadFromFile:aFileName. |
|
114 |
] modal:true. |
|
115 |
||
116 |
" |
|
117 |
self openModalOnFile: '../../goodies/bitmaps/gifImages/back.gif' |
|
118 |
" |
|
119 |
! |
|
120 |
||
2764 | 121 |
openModalOnImage:anImage |
122 |
"opens a modal Image Editor on an image. |
|
123 |
Returns the modified image or nil if unsaved/unchanged" |
|
124 |
||
125 |
|imageEditor imageEditView newImage| |
|
126 |
||
127 |
imageEditor := self new. |
|
2767 | 128 |
imageEditor allowedToChangeImageDimensionAndDepth:false. |
2764 | 129 |
imageEditor postOpenAction: [ |
130 |
imageEditView := imageEditor imageEditView. |
|
131 |
imageEditor loadFromImage: anImage |
|
132 |
]. |
|
133 |
imageEditor openModal. |
|
134 |
||
2766 | 135 |
newImage := imageEditor savedImage. |
2764 | 136 |
^ newImage |
137 |
! |
|
138 |
||
1966 | 139 |
openOnClass:aClass andSelector:aSelector |
140 |
"opens an Image Editor on aClass and aSelector" |
|
400 | 141 |
|
3375 | 142 |
self |
143 |
openLoadingImageWith:[:editor | |
|
144 |
editor loadFromClass:aClass theNonMetaclass andSelector:aSelector |
|
145 |
] |
|
146 |
modal:false. |
|
1057 | 147 |
|
1966 | 148 |
" |
149 |
self openOnClass:self andSelector:#leftMouseKeyIcon |
|
150 |
self openOnClass:self andSelector:nil |
|
151 |
" |
|
152 |
||
1057 | 153 |
"Modified: / 16.3.1999 / 21:33:49 / cg" |
400 | 154 |
! |
155 |
||
1966 | 156 |
openOnFile:aFileName |
157 |
"opens an Image Editor on aFileName" |
|
400 | 158 |
|
3375 | 159 |
self |
160 |
openLoadingImageWith:[:editor | editor loadFromFile:aFileName ] |
|
161 |
modal:false. |
|
1057 | 162 |
|
1966 | 163 |
" |
1975 | 164 |
self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' |
1966 | 165 |
" |
166 |
||
1057 | 167 |
"Modified: / 16.3.1999 / 21:33:25 / cg" |
400 | 168 |
! |
169 |
||
1966 | 170 |
openOnImage:anImage |
171 |
"opens an Image Editor on anImage" |
|
400 | 172 |
|
3375 | 173 |
self |
174 |
openLoadingImageWith:[:editor | editor loadFromImage: anImage ] |
|
175 |
modal:false |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
176 |
|
1966 | 177 |
" |
178 |
self openOnImage: Icon startIcon |
|
179 |
" |
|
180 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
181 |
"Modified: / 11.3.1999 / 16:18:33 / cg" |
400 | 182 |
! ! |
183 |
||
184 |
!ImageEditor class methodsFor:'accessing'! |
|
185 |
||
186 |
listOfColorMaps |
|
767 | 187 |
"returns the list of default color maps for a new image" |
400 | 188 |
|
189 |
|colorMap| |
|
898 | 190 |
|
400 | 191 |
(colorMap := OrderedCollection new) |
192 |
add: Color black; |
|
193 |
add: Color white; |
|
194 |
add: Color red; |
|
195 |
add: Color green; |
|
196 |
add: Color blue; |
|
197 |
add: Color cyan; |
|
198 |
add: Color yellow; |
|
199 |
add: Color magenta; |
|
898 | 200 |
add: (Color redByte: 127 greenByte: 0 blueByte: 0); |
201 |
add: (Color redByte: 0 greenByte: 127 blueByte: 0); |
|
202 |
add: (Color redByte: 0 greenByte: 0 blueByte: 127); |
|
203 |
add: (Color redByte: 0 greenByte: 127 blueByte: 127); |
|
204 |
add: (Color redByte: 127 greenByte: 127 blueByte: 0); |
|
205 |
add: (Color redByte: 127 greenByte: 0 blueByte: 127); |
|
206 |
add: (Color redByte: 127 greenByte: 127 blueByte: 127); |
|
207 |
add: (Color redByte: 170 greenByte: 170 blueByte: 170). |
|
208 |
||
3346 | 209 |
0 to: 5 do: [:r| |
210 |
0 to: 5 do: [:g| |
|
211 |
0 to: 5 do: [:b| |
|
898 | 212 |
colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling) |
400 | 213 |
] |
214 |
] |
|
215 |
]. |
|
216 |
||
3346 | 217 |
1 to: 25 do: [:g| |
898 | 218 |
colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling) |
400 | 219 |
]. |
220 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
221 |
^ Dictionary new |
2571 | 222 |
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
|
223 |
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
|
224 |
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
|
225 |
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
|
226 |
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
|
227 |
at: #depth8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
228 |
at: #masked8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
229 |
at: #depth4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
230 |
at: #masked4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
231 |
at: #depth2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
232 |
at: #masked2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
233 |
at: #depth1 put: (colorMap copyFrom: 1 to: 2); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
234 |
at: #masked1 put: (colorMap copyFrom: 1 to: 2); |
400 | 235 |
yourself |
236 |
! |
|
237 |
||
238 |
listOfDefaultSizes |
|
767 | 239 |
"returns the list of default sizes for a new image" |
400 | 240 |
|
1960 | 241 |
^ #('8x8' '16x16' '22x22' '32x32' '48x48' '64x64') |
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
242 |
|
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
243 |
"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
|
244 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
245 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
246 |
namesOfColorMaps |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
247 |
^ Dictionary new |
2571 | 248 |
at: #depth32 put: '32-plane (rgba)'; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
249 |
at: #depth24 put: '24-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
250 |
at: #masked24 put: '24-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
251 |
at: #depth16 put: '16-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
252 |
at: #masked16 put: '16-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
253 |
at: #depth8 put: ' 8-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
254 |
at: #masked8 put: ' 8-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
255 |
at: #depth4 put: ' 4-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
256 |
at: #masked4 put: ' 4-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
257 |
at: #depth2 put: ' 2-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
258 |
at: #masked2 put: ' 2-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
259 |
at: #depth1 put: ' 1-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
260 |
at: #masked1 put: ' 1-plane + mask' ; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
261 |
yourself |
400 | 262 |
! ! |
263 |
||
460 | 264 |
!ImageEditor class methodsFor:'help specs'! |
265 |
||
1545 | 266 |
flyByHelpSpec |
267 |
<resource: #help> |
|
268 |
||
2871 | 269 |
^super flyByHelpSpec addPairsFrom:(self localHelpTexts) |
270 |
||
271 |
"Modified: / 19-01-2012 / 13:29:48 / cg" |
|
1545 | 272 |
! |
273 |
||
460 | 274 |
helpSpec |
737 | 275 |
"This resource specification was automatically generated |
276 |
by the UIHelpTool of ST/X." |
|
277 |
||
278 |
"Do not manually edit this!! If it is corrupted, |
|
279 |
the UIHelpTool may not be able to read the specification." |
|
460 | 280 |
|
281 |
" |
|
3374 | 282 |
UIHelpTool openOnClass:ImageEditor |
460 | 283 |
" |
284 |
||
737 | 285 |
<resource: #help> |
286 |
||
3374 | 287 |
^ super helpSpec addPairsFrom:#( |
288 |
||
289 |
#colorMap |
|
290 |
'ColorMap functions' |
|
291 |
||
292 |
#colorMap1 |
|
293 |
'Convert to depth-1 image' |
|
294 |
||
295 |
#colorMap1M |
|
296 |
'Convert to depth-1 image plus mask' |
|
297 |
||
298 |
#colorMap2 |
|
299 |
'Convert to depth-2 image' |
|
300 |
||
301 |
#colorMap24 |
|
302 |
'Convert to depth-24 image (rgb)' |
|
303 |
||
304 |
#colorMap2M |
|
305 |
'Convert to depth-2 image plus mask' |
|
306 |
||
307 |
#colorMap32 |
|
308 |
'Convert to depth-32 image (rgba)' |
|
309 |
||
310 |
#colorMap4 |
|
311 |
'Convert to depth-4 image' |
|
312 |
||
313 |
#colorMap4M |
|
314 |
'Convert to depth-4 image plus mask' |
|
315 |
||
316 |
#colorMap8 |
|
317 |
'Convert to depth-8 image' |
|
318 |
||
319 |
#colorMap8M |
|
320 |
'Convert to depth-8 image plus mask' |
|
321 |
||
322 |
#colorMapTable |
|
323 |
'Shows a list of used colors of the image' |
|
324 |
||
325 |
#compressColormap |
|
326 |
'Remove unneeded entries from the colorMap' |
|
327 |
||
328 |
#cropAll |
|
329 |
'Find and remove all borders' |
|
330 |
||
331 |
#cropBottom |
|
332 |
'Find and remove bottom border' |
|
333 |
||
334 |
#cropLeft |
|
335 |
'Find and remove left border' |
|
336 |
||
337 |
#cropManual |
|
338 |
'Specify border(s) to remove.' |
|
339 |
||
340 |
#cropRight |
|
341 |
'Find and remove right border' |
|
342 |
||
343 |
#cropTop |
|
344 |
'Find and remove top border' |
|
345 |
||
346 |
#drawModeBox |
|
347 |
'Rectangle Drawing Mode' |
|
348 |
||
349 |
#drawModeCircle |
|
350 |
'Circle Drawing Mode' |
|
351 |
||
352 |
#drawModeCopy |
|
353 |
'Area Copy Mode' |
|
354 |
||
355 |
#drawModeFill |
|
356 |
'Flood Fill Mode' |
|
357 |
||
358 |
#drawModeFilledBox |
|
359 |
'Filled Rectangle Drawing Mode' |
|
360 |
||
361 |
#drawModePaste |
|
362 |
'Paste Mode' |
|
363 |
||
364 |
#drawModePasteUnder |
|
365 |
'Paste-Under Mode' |
|
366 |
||
367 |
#drawModePasteWithMask |
|
368 |
'Paste-with-Mask Mode' |
|
369 |
||
370 |
#drawModePoint |
|
371 |
'Point Drawing Mode' |
|
372 |
||
373 |
#drawModeSpecial |
|
374 |
'Special operations (select rectangle, then choose operation)' |
|
375 |
||
376 |
#drawModeSpray |
|
377 |
'Spray Drawing Mode' |
|
378 |
||
379 |
#edit3DProjection |
|
380 |
'' |
|
381 |
||
382 |
#editFlipHorizontal |
|
383 |
'Flip the image horizontally' |
|
384 |
||
385 |
#editFlipVertical |
|
386 |
'Flip the image vertically' |
|
387 |
||
388 |
#editMagnifyImage |
|
389 |
'Magnify the image' |
|
390 |
||
391 |
#editNegate |
|
392 |
'Invert the images colors' |
|
393 |
||
394 |
#editResize |
|
395 |
'Resize the image (preserving the old image)' |
|
396 |
||
397 |
#editRotate |
|
398 |
'Rotate the image' |
|
399 |
||
400 |
#fileEditMask |
|
401 |
'' |
|
402 |
||
403 |
#fileGrabImageFromScreen |
|
404 |
'Pick an image from the screen (specify area)' |
|
405 |
||
406 |
#fileGrabImageFromWindow |
|
407 |
'Pick an image from a window on the screen (click on window)' |
|
408 |
||
409 |
#fileLoadFromClass |
|
410 |
'Select and load an image from a resource method' |
|
411 |
||
412 |
#fileLoadFromFile |
|
413 |
'Select and load an image from a file' |
|
414 |
||
415 |
#fileLoadFromURL |
|
416 |
'Load an image from the net, given its URL' |
|
417 |
||
418 |
#fileNewImage |
|
419 |
'Create a new image' |
|
420 |
||
421 |
#fileNewImageFromClipboard |
|
422 |
'Create a new image and initialize it from the clipboard' |
|
423 |
||
424 |
#fileNewMaskFromClipboard |
|
425 |
'Paste the image in the clipboard as a mask. Must be a depth-1 image' |
|
426 |
||
427 |
#filePrint |
|
428 |
'Print the image on a postscript printer' |
|
429 |
||
430 |
#fileSave |
|
431 |
'Save the image' |
|
432 |
||
433 |
#fileSaveAs |
|
434 |
'Save the image to a file' |
|
435 |
||
436 |
#fileSaveButtonImageAs |
|
437 |
'Save an image of a button with the image to a file (for html use)' |
|
438 |
||
439 |
#fileSaveMaskAs |
|
440 |
'Save the mask of the image to a file' |
|
441 |
||
442 |
#fileSaveMethod |
|
443 |
'Save the image as resource method in the current class and selector' |
|
444 |
||
445 |
#fileSaveMethodAs |
|
446 |
'Save the image as resource method in a class' |
|
447 |
||
448 |
#magnificationNumber |
|
449 |
'Shows the current magnification' |
|
450 |
||
451 |
#magnifyImageDown |
|
452 |
'Decrease magnification' |
|
453 |
||
454 |
#magnifyImageUp |
|
455 |
'Increase magnification' |
|
456 |
||
457 |
#mouseKeyColorMode |
|
458 |
'Toggle between left and right mouse button color' |
|
459 |
||
460 |
#nextImageInSequence |
|
461 |
'Go to the next image in the animated gif image sequence.' |
|
462 |
||
463 |
#previewView |
|
464 |
'Shows a preview of the image' |
|
465 |
||
466 |
#previousImageInSequence |
|
467 |
'Go to the previous image in the animated gif image sequence.' |
|
468 |
||
469 |
#settingsGridMagnification |
|
470 |
'Change the grid magnification of the edit view' |
|
471 |
||
472 |
#xdrawModeBox |
|
473 |
'Rectangle' |
|
474 |
||
475 |
#xdrawModeCopy |
|
476 |
'Copy' |
|
477 |
||
478 |
#xdrawModeFill |
|
479 |
'Flood-fill' |
|
480 |
||
481 |
#xdrawModeFilledBox |
|
482 |
'Filled rectangle' |
|
483 |
||
484 |
#xdrawModePaste |
|
485 |
'Paste' |
|
486 |
||
487 |
#xdrawModePasteUnder |
|
488 |
'Paste under' |
|
489 |
||
490 |
#xdrawModePasteWithMask |
|
491 |
'Paste with Mask' |
|
492 |
||
493 |
#xdrawModePoint |
|
494 |
'Point' |
|
495 |
||
496 |
#xfileGrabImage |
|
497 |
'Pick from screen' |
|
498 |
||
499 |
#xfileLoadFromClass |
|
500 |
'Load from method...' |
|
501 |
||
502 |
#xfileLoadFromFile |
|
503 |
'Load from file...' |
|
504 |
||
505 |
#xfileNewImage |
|
506 |
'New image' |
|
507 |
||
508 |
#xfileSaveAs |
|
509 |
'Save to file...' |
|
510 |
||
511 |
#xfileSaveMaskAs |
|
512 |
'Save mask to file...' |
|
513 |
||
514 |
#xfileSaveMethod |
|
515 |
'Save as method' |
|
516 |
||
517 |
#xfileSaveMethodAs |
|
518 |
'Save as Method...' |
|
519 |
||
520 |
) |
|
2871 | 521 |
! |
522 |
||
523 |
localHelpTexts |
|
524 |
"This resource specification was automatically generated |
|
525 |
by the UIHelpTool of ST/X." |
|
526 |
||
527 |
"Do not manually edit this!! If it is corrupted, |
|
528 |
the UIHelpTool may not be able to read the specification." |
|
529 |
||
530 |
" |
|
531 |
UIHelpTool openOnClass:ImageEditor |
|
532 |
" |
|
533 |
||
534 |
<resource: #help> |
|
535 |
||
536 |
^ #( |
|
537 |
||
538 |
#xdrawModeBox |
|
539 |
'Rectangle' |
|
540 |
||
541 |
#xdrawModeCopy |
|
542 |
'Copy' |
|
543 |
||
544 |
#xdrawModeFill |
|
545 |
'Flood-fill' |
|
546 |
||
547 |
#xdrawModeFilledBox |
|
548 |
'Filled rectangle' |
|
549 |
||
550 |
#xdrawModePaste |
|
551 |
'Paste' |
|
552 |
||
553 |
#xdrawModePasteUnder |
|
554 |
'Paste under' |
|
555 |
||
556 |
#xdrawModePasteWithMask |
|
557 |
'Paste with Mask' |
|
558 |
||
559 |
#xdrawModePoint |
|
560 |
'Point' |
|
561 |
||
562 |
#xfileGrabImage |
|
563 |
'Pick from screen' |
|
564 |
||
565 |
#xfileLoadFromClass |
|
566 |
'Load from method...' |
|
567 |
||
568 |
#xfileLoadFromFile |
|
569 |
'Load from file...' |
|
570 |
||
571 |
#xfileNewImage |
|
572 |
'New image' |
|
573 |
||
574 |
#filePrint |
|
575 |
'Print' |
|
576 |
||
577 |
#xfileSaveAs |
|
578 |
'Save to file...' |
|
579 |
||
580 |
#xfileSaveMaskAs |
|
581 |
'Save mask to file...' |
|
582 |
||
583 |
#xfileSaveMethod |
|
584 |
'Save as method' |
|
585 |
||
586 |
#xfileSaveMethodAs |
|
587 |
'Save as Method...' |
|
588 |
||
589 |
#nextImageInSequence |
|
590 |
'Go to the next image in the animated gif image sequence.' |
|
591 |
||
592 |
#previousImageInSequence |
|
593 |
'Go to the previous image in the animated gif image sequence.' |
|
460 | 594 |
|
595 |
#colorMap |
|
2765 | 596 |
'ColorMap functions' |
929 | 597 |
|
598 |
#colorMap1 |
|
2765 | 599 |
'Convert to depth-1 image' |
929 | 600 |
|
986 | 601 |
#colorMap1M |
2765 | 602 |
'Convert to depth-1 image plus mask' |
986 | 603 |
|
929 | 604 |
#colorMap2 |
2765 | 605 |
'Convert to depth-2 image' |
606 |
||
607 |
#colorMap24 |
|
608 |
'Convert to depth-24 image (rgb)' |
|
929 | 609 |
|
986 | 610 |
#colorMap2M |
2765 | 611 |
'Convert to depth-2 image plus mask' |
612 |
||
613 |
#colorMap32 |
|
614 |
'Convert to depth-32 image (rgba)' |
|
986 | 615 |
|
929 | 616 |
#colorMap4 |
2765 | 617 |
'Convert to depth-4 image' |
929 | 618 |
|
986 | 619 |
#colorMap4M |
2765 | 620 |
'Convert to depth-4 image plus mask' |
986 | 621 |
|
929 | 622 |
#colorMap8 |
2765 | 623 |
'Convert to depth-8 image' |
929 | 624 |
|
625 |
#colorMap8M |
|
2765 | 626 |
'Convert to depth-8 image plus mask' |
2571 | 627 |
|
986 | 628 |
#colorMapTable |
2765 | 629 |
'Shows a list of used colors of the image' |
986 | 630 |
|
929 | 631 |
#compressColormap |
2765 | 632 |
'Remove unneeded entries from the colorMap' |
460 | 633 |
|
1045 | 634 |
#cropAll |
2765 | 635 |
'Find and remove all borders' |
986 | 636 |
|
1045 | 637 |
#cropBottom |
2765 | 638 |
'Find and remove bottom border' |
986 | 639 |
|
1045 | 640 |
#cropLeft |
2765 | 641 |
'Find and remove left border' |
986 | 642 |
|
1045 | 643 |
#cropManual |
986 | 644 |
'Specify border(s) to remove.' |
645 |
||
1045 | 646 |
#cropRight |
2765 | 647 |
'Find and remove right border' |
986 | 648 |
|
1045 | 649 |
#cropTop |
2765 | 650 |
'Find and remove top border' |
487 | 651 |
|
460 | 652 |
#drawModeBox |
2765 | 653 |
'Rectangle Drawing Mode' |
460 | 654 |
|
2375 | 655 |
#drawModeCircle |
2765 | 656 |
'Circle Drawing Mode' |
2375 | 657 |
|
460 | 658 |
#drawModeCopy |
2765 | 659 |
'Area Copy Mode' |
460 | 660 |
|
661 |
#drawModeFill |
|
2765 | 662 |
'Flood Fill Mode' |
460 | 663 |
|
664 |
#drawModeFilledBox |
|
2765 | 665 |
'Filled Rectangle Drawing Mode' |
460 | 666 |
|
667 |
#drawModePaste |
|
2765 | 668 |
'Paste Mode' |
914 | 669 |
|
670 |
#drawModePasteUnder |
|
2765 | 671 |
'Paste-Under Mode' |
1637 | 672 |
|
673 |
#drawModePasteWithMask |
|
2765 | 674 |
'Paste-with-Mask Mode' |
460 | 675 |
|
676 |
#drawModePoint |
|
2765 | 677 |
'Point Drawing Mode' |
2375 | 678 |
|
1639 | 679 |
#drawModeSpecial |
2871 | 680 |
'Special operations (select rectangle, then choose operation)' |
1639 | 681 |
|
2765 | 682 |
#drawModeSpray |
683 |
'Spray Drawing Mode' |
|
684 |
||
460 | 685 |
#editFlipHorizontal |
2765 | 686 |
'Flip the image horizontally' |
460 | 687 |
|
688 |
#editFlipVertical |
|
2765 | 689 |
'Flip the image vertically' |
460 | 690 |
|
691 |
#editMagnifyImage |
|
2765 | 692 |
'Magnify the image' |
460 | 693 |
|
694 |
#editNegate |
|
2765 | 695 |
'Invert the images colors' |
460 | 696 |
|
697 |
#editResize |
|
2765 | 698 |
'Resize the image (preserving the old image)' |
460 | 699 |
|
700 |
#editRotate |
|
2765 | 701 |
'Rotate the image' |
460 | 702 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
703 |
#fileGrabImageFromScreen |
2765 | 704 |
'Pick an image from the screen (specify area)' |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
705 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
706 |
#fileGrabImageFromWindow |
2765 | 707 |
'Pick an image from a window on the screen (click on window)' |
929 | 708 |
|
460 | 709 |
#fileLoadFromClass |
2765 | 710 |
'Select and load an image from a resource method' |
460 | 711 |
|
712 |
#fileLoadFromFile |
|
2765 | 713 |
'Select and load an image from a file' |
460 | 714 |
|
2796 | 715 |
#fileLoadFromURL |
716 |
'Load an image from the net, given its URL' |
|
717 |
||
460 | 718 |
#fileNewImage |
914 | 719 |
'Create a new image' |
460 | 720 |
|
3200 | 721 |
#fileNewImageFromClipboard |
722 |
'Create a new image and initialize it from the clipboard' |
|
723 |
||
724 |
#fileNewMaskFromClipboard |
|
725 |
'Paste the image in the clipboard as a mask. Must be a depth-1 image' |
|
726 |
||
460 | 727 |
#filePrint |
2765 | 728 |
'Print the image on a postscript printer' |
729 |
||
730 |
#fileSave |
|
731 |
'Save the image' |
|
460 | 732 |
|
733 |
#fileSaveAs |
|
2765 | 734 |
'Save the image to a file' |
735 |
||
736 |
#fileSaveButtonImageAs |
|
737 |
'Save an image of a button with the image to a file (for html use)' |
|
460 | 738 |
|
739 |
#fileSaveMaskAs |
|
2765 | 740 |
'Save the mask of the image to a file' |
1613 | 741 |
|
460 | 742 |
#fileSaveMethod |
2765 | 743 |
'Save the image as resource method in the current class and selector' |
460 | 744 |
|
745 |
#fileSaveMethodAs |
|
2765 | 746 |
'Save the image as resource method in a class' |
460 | 747 |
|
487 | 748 |
#magnificationNumber |
2765 | 749 |
'Shows the current magnification' |
487 | 750 |
|
751 |
#magnifyImageDown |
|
2765 | 752 |
'Decrease magnification' |
487 | 753 |
|
754 |
#magnifyImageUp |
|
2765 | 755 |
'Increase magnification' |
487 | 756 |
|
757 |
#mouseKeyColorMode |
|
2765 | 758 |
'Toggle between left and right mouse button color' |
487 | 759 |
|
760 |
#previewView |
|
2765 | 761 |
'Shows a preview of the image' |
487 | 762 |
|
905 | 763 |
#settingsGridMagnification |
2765 | 764 |
'Change the grid magnification of the edit view' |
905 | 765 |
|
460 | 766 |
) |
2871 | 767 |
|
768 |
"Created: / 19-01-2012 / 13:29:31 / cg" |
|
460 | 769 |
! ! |
770 |
||
737 | 771 |
!ImageEditor class methodsFor:'image specs'! |
772 |
||
2272 | 773 |
circleIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
774 |
<resource: #image> |
2272 | 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 circleIcon inspect |
|
781 |
ImageEditor openOnClass:self andSelector:#circleIcon |
|
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 circleIcon' |
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@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
794 |
colorMapFromArray:#[ 0 0 0 255 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:'@@@@@@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
|
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 |
] |
2272 | 803 |
! |
804 |
||
1637 | 805 |
copyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
806 |
<resource: #image> |
1637 | 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 copyIcon inspect |
|
813 |
ImageEditor openOnClass:self andSelector:#copyIcon |
|
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 copyIcon' |
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 |
(Depth2Image 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:(#( 2 )); |
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:'@@@@@@@@@@@** @@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
|
826 |
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
|
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? 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
|
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 |
] |
1637 | 835 |
! |
836 |
||
2155 | 837 |
defaultIcon |
838 |
<resource: #programImage> |
|
839 |
||
840 |
^ ToolbarIconLibrary startImageEditorIcon |
|
841 |
! |
|
842 |
||
2871 | 843 |
fillGradientRectIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
844 |
<resource: #image> |
2871 | 845 |
"This resource specification was automatically generated |
846 |
by the ImageEditor of ST/X." |
|
847 |
"Do not manually edit this!! If it is corrupted, |
|
848 |
the ImageEditor may not be able to read the specification." |
|
849 |
" |
|
850 |
self fillGradientRectIcon inspect |
|
851 |
ImageEditor openOnClass:self andSelector:#fillGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
852 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
853 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
854 |
^ Icon constantNamed:'ImageEditor class fillGradientRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
855 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
856 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
857 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
858 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
859 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
860 |
bitsPerSample:(#[ 4 ]); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
861 |
samplesPerPixel:(1); |
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:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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
|
864 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
865 |
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
|
866 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
867 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
868 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
869 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
870 |
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
|
871 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
872 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
873 |
] |
2871 | 874 |
! |
875 |
||
876 |
fillHorizontalGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
877 |
<resource: #image> |
2871 | 878 |
"This resource specification was automatically generated |
879 |
by the ImageEditor of ST/X." |
|
880 |
"Do not manually edit this!! If it is corrupted, |
|
881 |
the ImageEditor may not be able to read the specification." |
|
882 |
" |
|
883 |
self fillHorizontalGradientRectIcon inspect |
|
884 |
ImageEditor openOnClass:self andSelector:#fillHorizontalGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
885 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
886 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
887 |
^ Icon constantNamed:'ImageEditor class fillHorizontalGradientRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
888 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
889 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
890 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
891 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
892 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
893 |
bitsPerSample:(#[ 4 ]); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
894 |
samplesPerPixel:(1); |
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:'@@@@@@@@@@@@@@@@@@@@@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
|
897 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
898 |
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
|
899 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
900 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
901 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
902 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
903 |
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
|
904 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
905 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
906 |
] |
2871 | 907 |
! |
908 |
||
1637 | 909 |
fillIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
910 |
<resource: #image> |
1637 | 911 |
"This resource specification was automatically generated |
912 |
by the ImageEditor of ST/X." |
|
913 |
"Do not manually edit this!! If it is corrupted, |
|
914 |
the ImageEditor may not be able to read the specification." |
|
915 |
" |
|
916 |
self fillIcon inspect |
|
917 |
ImageEditor openOnClass:self andSelector:#fillIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
918 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
919 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
920 |
^ Icon constantNamed:'ImageEditor class fillIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
921 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
922 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
923 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
924 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
925 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
926 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
927 |
samplesPerPixel:(1); |
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:'@@@@@@@@@@@@@ @@@@*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
|
930 |
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
|
931 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
932 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
933 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
934 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
935 |
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
|
936 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
937 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
938 |
] |
1637 | 939 |
! |
940 |
||
941 |
fillRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
942 |
<resource: #image> |
1637 | 943 |
"This resource specification was automatically generated |
944 |
by the ImageEditor of ST/X." |
|
945 |
"Do not manually edit this!! If it is corrupted, |
|
946 |
the ImageEditor may not be able to read the specification." |
|
947 |
" |
|
948 |
self fillRectIcon inspect |
|
949 |
ImageEditor openOnClass:self andSelector:#fillRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
950 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
951 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
952 |
^ Icon constantNamed:'ImageEditor class fillRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
953 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
954 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
955 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
956 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
957 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
958 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
959 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
960 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
961 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
962 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
963 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
964 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
965 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
966 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
967 |
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
|
968 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
969 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
970 |
] |
1637 | 971 |
! |
972 |
||
2871 | 973 |
fillVerticalGradientRectIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
974 |
<resource: #image> |
2871 | 975 |
"This resource specification was automatically generated |
976 |
by the ImageEditor of ST/X." |
|
977 |
"Do not manually edit this!! If it is corrupted, |
|
978 |
the ImageEditor may not be able to read the specification." |
|
979 |
" |
|
980 |
self fillGradientRectIcon inspect |
|
981 |
ImageEditor openOnClass:self andSelector:#fillGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
982 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
983 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
984 |
^ Icon constantNamed:'ImageEditor class fillGradientRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
985 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
986 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
987 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
988 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
989 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
990 |
bitsPerSample:(#[ 4 ]); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
991 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
992 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
993 |
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
|
994 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
995 |
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
|
996 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
997 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
998 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
999 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1000 |
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
|
1001 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1002 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1003 |
] |
2871 | 1004 |
|
1005 |
"Created: / 19-01-2012 / 13:44:51 / cg" |
|
1006 |
! |
|
1007 |
||
2837 | 1008 |
flipHorizontalIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1009 |
<resource: #image> |
2837 | 1010 |
"This resource specification was automatically generated |
1011 |
by the ImageEditor of ST/X." |
|
1012 |
"Do not manually edit this!! If it is corrupted, |
|
1013 |
the ImageEditor may not be able to read the specification." |
|
1014 |
" |
|
1015 |
self flipHorizontalIcon inspect |
|
1016 |
ImageEditor openOnClass:self andSelector:#flipHorizontalIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1017 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1018 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1019 |
^ Icon constantNamed:'ImageEditor class flipHorizontalIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1020 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1021 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1022 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1023 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1024 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1025 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1026 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1027 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1028 |
fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1029 |
colorMapFromArray:#[ 0 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1030 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1031 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1032 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1033 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1034 |
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
|
1035 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1036 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1037 |
] |
2837 | 1038 |
! |
1039 |
||
1040 |
flipVerticalIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1041 |
<resource: #image> |
2837 | 1042 |
"This resource specification was automatically generated |
1043 |
by the ImageEditor of ST/X." |
|
1044 |
"Do not manually edit this!! If it is corrupted, |
|
1045 |
the ImageEditor may not be able to read the specification." |
|
1046 |
" |
|
1047 |
self flipVerticalIcon inspect |
|
1048 |
ImageEditor openOnClass:self andSelector:#flipVerticalIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1049 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1050 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1051 |
^ Icon constantNamed:'ImageEditor class flipVerticalIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1052 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1053 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1054 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1055 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1056 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1057 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1058 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1059 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1060 |
fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1061 |
colorMapFromArray:#[ 0 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1062 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1063 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1064 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1065 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1066 |
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
|
1067 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1068 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1069 |
] |
2837 | 1070 |
! |
1071 |
||
737 | 1072 |
leftMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1073 |
<resource: #image> |
737 | 1074 |
"This resource specification was automatically generated |
1075 |
by the ImageEditor of ST/X." |
|
1076 |
"Do not manually edit this!! If it is corrupted, |
|
1077 |
the ImageEditor may not be able to read the specification." |
|
1078 |
" |
|
1405 | 1079 |
self leftMouseKeyIcon inspect |
737 | 1080 |
ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1081 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1082 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1083 |
^ Icon constantNamed:'ImageEditor class leftMouseKeyIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1084 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1085 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1086 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1087 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1088 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1089 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1090 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1091 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1092 |
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
|
1093 |
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
|
1094 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1095 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1096 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1097 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1098 |
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
|
1099 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1100 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1101 |
] |
1433 | 1102 |
! |
737 | 1103 |
|
1637 | 1104 |
pasteIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1105 |
<resource: #image> |
1637 | 1106 |
"This resource specification was automatically generated |
1107 |
by the ImageEditor of ST/X." |
|
1108 |
"Do not manually edit this!! If it is corrupted, |
|
1109 |
the ImageEditor may not be able to read the specification." |
|
1110 |
" |
|
1111 |
self pasteIcon inspect |
|
1112 |
ImageEditor openOnClass:self andSelector:#pasteIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1113 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1114 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1115 |
^ Icon constantNamed:'ImageEditor class pasteIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1116 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1117 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1118 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1119 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1120 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1121 |
bitsPerSample:(#( 4 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1122 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1123 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1124 |
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
|
1125 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1126 |
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
|
1127 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1128 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1129 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1130 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1131 |
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
|
1132 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1133 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1134 |
] |
1637 | 1135 |
! |
1136 |
||
1137 |
pasteUnderIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1138 |
<resource: #image> |
1637 | 1139 |
"This resource specification was automatically generated |
1140 |
by the ImageEditor of ST/X." |
|
1141 |
"Do not manually edit this!! If it is corrupted, |
|
1142 |
the ImageEditor may not be able to read the specification." |
|
1143 |
" |
|
1144 |
self pasteUnderIcon inspect |
|
1145 |
ImageEditor openOnClass:self andSelector:#pasteUnderIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1146 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1147 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1148 |
^ Icon constantNamed:'ImageEditor class pasteUnderIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1149 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1150 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1151 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1152 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1153 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1154 |
bitsPerSample:(#( 4 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1155 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1156 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1157 |
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
|
1158 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1159 |
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
|
1160 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1161 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1162 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1163 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1164 |
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
|
1165 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1166 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1167 |
] |
1637 | 1168 |
! |
1169 |
||
1170 |
pasteWithMaskIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1171 |
<resource: #image> |
1637 | 1172 |
"This resource specification was automatically generated |
1173 |
by the ImageEditor of ST/X." |
|
1174 |
"Do not manually edit this!! If it is corrupted, |
|
1175 |
the ImageEditor may not be able to read the specification." |
|
1176 |
" |
|
1177 |
self pasteWithMaskIcon inspect |
|
1178 |
ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1179 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1180 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1181 |
^ Icon constantNamed:'ImageEditor class pasteWithMaskIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1182 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1183 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1184 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1185 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1186 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1187 |
bitsPerSample:(#( 4 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1188 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1189 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1190 |
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
|
1191 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1192 |
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
|
1193 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1194 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1195 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1196 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1197 |
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
|
1198 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1199 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1200 |
] |
1637 | 1201 |
! |
1202 |
||
1203 |
pointIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1204 |
<resource: #image> |
1637 | 1205 |
"This resource specification was automatically generated |
1206 |
by the ImageEditor of ST/X." |
|
1207 |
"Do not manually edit this!! If it is corrupted, |
|
1208 |
the ImageEditor may not be able to read the specification." |
|
1209 |
" |
|
1210 |
self pointIcon inspect |
|
1211 |
ImageEditor openOnClass:self andSelector:#pointIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1212 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1213 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1214 |
^ Icon constantNamed:'ImageEditor class pointIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1215 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1216 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1217 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1218 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1219 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1220 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1221 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1222 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1223 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1224 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1225 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1226 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1227 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1228 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1229 |
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
|
1230 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1231 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1232 |
] |
1637 | 1233 |
! |
1234 |
||
1235 |
rectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1236 |
<resource: #image> |
1637 | 1237 |
"This resource specification was automatically generated |
1238 |
by the ImageEditor of ST/X." |
|
1239 |
"Do not manually edit this!! If it is corrupted, |
|
1240 |
the ImageEditor may not be able to read the specification." |
|
1241 |
" |
|
1242 |
self rectIcon inspect |
|
1243 |
ImageEditor openOnClass:self andSelector:#rectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1244 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1245 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1246 |
^ Icon constantNamed:'ImageEditor class rectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1247 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1248 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1249 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1250 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1251 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1252 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1253 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1254 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1255 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1256 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1257 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1258 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1259 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1260 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1261 |
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
|
1262 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1263 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1264 |
] |
1637 | 1265 |
! |
1266 |
||
737 | 1267 |
rightMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1268 |
<resource: #image> |
737 | 1269 |
"This resource specification was automatically generated |
1270 |
by the ImageEditor of ST/X." |
|
1271 |
"Do not manually edit this!! If it is corrupted, |
|
1272 |
the ImageEditor may not be able to read the specification." |
|
1273 |
" |
|
1405 | 1274 |
self rightMouseKeyIcon inspect |
737 | 1275 |
ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1276 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1277 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1278 |
^ Icon constantNamed:'ImageEditor class rightMouseKeyIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1279 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1280 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1281 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1282 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1283 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1284 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1285 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1286 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1287 |
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
|
1288 |
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
|
1289 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1290 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1291 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1292 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1293 |
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
|
1294 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1295 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1296 |
] |
1637 | 1297 |
! |
1298 |
||
3191 | 1299 |
smoothIcon |
1300 |
"This resource specification was automatically generated |
|
1301 |
by the ImageEditor of ST/X." |
|
1302 |
||
1303 |
"Do not manually edit this!! If it is corrupted, |
|
1304 |
the ImageEditor may not be able to read the specification." |
|
1305 |
||
1306 |
" |
|
1307 |
self smoothIcon inspect |
|
1308 |
ImageEditor openOnClass:self andSelector:#smoothIcon |
|
1309 |
Icon flushCachedIcons |
|
1310 |
" |
|
1311 |
||
1312 |
<resource: #image> |
|
1313 |
||
1314 |
^Icon |
|
1315 |
constantNamed:'ImageEditor smoothIcon' |
|
1316 |
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@@@@@@@@ |
|
1317 |
@@@@@@@@@@@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] |
|
1318 |
! |
|
1319 |
||
2881 | 1320 |
specialCircleIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1321 |
<resource: #image> |
2881 | 1322 |
"This resource specification was automatically generated |
1323 |
by the ImageEditor of ST/X." |
|
1324 |
"Do not manually edit this!! If it is corrupted, |
|
1325 |
the ImageEditor may not be able to read the specification." |
|
1326 |
" |
|
1327 |
self specialCircleIcon inspect |
|
1328 |
ImageEditor openOnClass:self andSelector:#specialCircleIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1329 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1330 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1331 |
^ Icon constantNamed:'ImageEditor class specialCircleIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1332 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1333 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1334 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1335 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1336 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1337 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1338 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1339 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1340 |
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
|
1341 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1342 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1343 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1344 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1345 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1346 |
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
|
1347 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1348 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1349 |
] |
2881 | 1350 |
! |
1351 |
||
1637 | 1352 |
specialIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1353 |
<resource: #image> |
1637 | 1354 |
"This resource specification was automatically generated |
1355 |
by the ImageEditor of ST/X." |
|
1356 |
"Do not manually edit this!! If it is corrupted, |
|
1357 |
the ImageEditor may not be able to read the specification." |
|
1358 |
" |
|
1359 |
self specialIcon inspect |
|
1360 |
ImageEditor openOnClass:self andSelector:#specialIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1361 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1362 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1363 |
^ Icon constantNamed:'ImageEditor class specialIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1364 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1365 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1366 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1367 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1368 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1369 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1370 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1371 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1372 |
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
|
1373 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1374 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1375 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1376 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1377 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1378 |
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
|
1379 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1380 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1381 |
] |
2375 | 1382 |
! |
1383 |
||
1384 |
sprayIcon |
|
1385 |
"This resource specification was automatically generated |
|
1386 |
by the ImageEditor of ST/X." |
|
3191 | 1387 |
|
2375 | 1388 |
"Do not manually edit this!! If it is corrupted, |
1389 |
the ImageEditor may not be able to read the specification." |
|
3191 | 1390 |
|
2375 | 1391 |
" |
1392 |
self sprayIcon inspect |
|
1393 |
ImageEditor openOnClass:self andSelector:#sprayIcon |
|
3191 | 1394 |
Icon flushCachedIcons |
1395 |
" |
|
1396 |
||
1397 |
<resource: #image> |
|
1398 |
||
1399 |
^Icon |
|
1400 |
constantNamed:'ImageEditor sprayIcon' |
|
1401 |
ifAbsentPut:[(Depth4Image new) width:14; height:14; bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@DA@P@@@@@PDA@@@@@@@PDA@@@@@@@PD@@@@"H@@PD@@@H"@@@@@@@ADP@@@@@@@QD@@@@@@@DQ@@@@@@@ADP@@ |
|
1402 |
@@@@@@@@@@@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 | 1403 |
! ! |
737 | 1404 |
|
400 | 1405 |
!ImageEditor class methodsFor:'interface specs'! |
1406 |
||
1650 | 1407 |
changeHLSDialogSpec |
1408 |
"This resource specification was automatically generated |
|
1409 |
by the UIPainter of ST/X." |
|
1410 |
||
1411 |
"Do not manually edit this!! If it is corrupted, |
|
1412 |
the UIPainter may not be able to read the specification." |
|
1413 |
||
1414 |
" |
|
1415 |
UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec |
|
1416 |
ImageEditor new openInterface:#changeHLSDialogSpec |
|
1417 |
" |
|
1418 |
||
1419 |
<resource: #canvas> |
|
1420 |
||
1421 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1422 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1423 |
name: changeHLSDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1424 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1425 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1426 |
label: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1427 |
name: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1428 |
min: (Point 10 10) |
2438 | 1429 |
bounds: (Rectangle 0 0 312 258) |
1650 | 1430 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1431 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1432 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1433 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1434 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1435 |
label: 'Hue-Shift:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1436 |
name: 'HueLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1437 |
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
|
1438 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1439 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1440 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1441 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1442 |
name: 'HueShiftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1443 |
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
|
1444 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1445 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1446 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1447 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1448 |
maxValue: 360 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1449 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1450 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1451 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1452 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1453 |
name: 'HueWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1454 |
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
|
1455 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1456 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1457 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1458 |
endlessRotation: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1459 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1460 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1461 |
label: 'Light Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1462 |
name: 'LightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1463 |
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
|
1464 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1465 |
adjust: right |
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 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1468 |
name: 'LightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1469 |
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
|
1470 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1471 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1472 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1473 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1474 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1475 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1476 |
acceptOnPointerLeave: false |
1650 | 1477 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1478 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1479 |
name: 'LightWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1480 |
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
|
1481 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1482 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1483 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1484 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1485 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1486 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1487 |
label: 'Saturation Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1488 |
name: 'SaturationLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1489 |
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
|
1490 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1491 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1492 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1493 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1494 |
name: 'SaturationEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1495 |
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
|
1496 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1497 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1498 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1499 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1500 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1501 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1502 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1503 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1504 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1505 |
name: 'SaturationWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1506 |
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
|
1507 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1508 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1509 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1510 |
step: 1 |
1650 | 1511 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1512 |
(LabelSpec |
2438 | 1513 |
label: 'Color Shift' |
1514 |
name: 'Label2' |
|
1515 |
layout: (LayoutFrame 5 0 110 0 -15 0.5 132 0) |
|
1516 |
translateLabel: true |
|
1517 |
) |
|
1518 |
(LabelSpec |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1519 |
name: 'HueColorLabel' |
2438 | 1520 |
layout: (LayoutFrame 18 0.0 133 0 -41 0.5 217 0) |
1521 |
level: -1 |
|
1975 | 1522 |
backgroundChannel: hlsColor |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1523 |
translateLabel: true |
1650 | 1524 |
) |
2438 | 1525 |
(LabelSpec |
1526 |
label: 'Preview' |
|
1527 |
name: 'Label3' |
|
1528 |
layout: (LayoutFrame 5 0.5 110 0 -5 1 132 0) |
|
1529 |
translateLabel: true |
|
1530 |
) |
|
1531 |
(LabelSpec |
|
1532 |
name: 'PreviewLabel' |
|
1533 |
layout: (LayoutFrame 36 0.5 133 0 -23 1.0 217 0) |
|
1534 |
level: -1 |
|
1535 |
translateLabel: true |
|
1536 |
labelChannel: previewImageHolder |
|
1537 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1538 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1539 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1540 |
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
|
1541 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1542 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1543 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1544 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1545 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1546 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1547 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1548 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1549 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1550 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1551 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1552 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1553 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1554 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1555 |
extent: (Point 151 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1556 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1557 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1558 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1559 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1560 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1561 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1562 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1563 |
extent: (Point 152 22) |
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 |
) |
1650 | 1568 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1569 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1570 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1571 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1572 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1573 |
! |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1574 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1575 |
cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1576 |
"This resource specification was automatically generated |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1577 |
by the UIPainter of ST/X." |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1578 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1579 |
"Do not manually edit this!! If it is corrupted, |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1580 |
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
|
1581 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1582 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1583 |
UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1584 |
ImageEditor new openInterface:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1585 |
" |
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 |
<resource: #canvas> |
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 |
^ |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1590 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1591 |
name: cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1592 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1593 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1594 |
label: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1595 |
name: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1596 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1597 |
bounds: (Rectangle 14 46 259 229) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1598 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1599 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1600 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1601 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1602 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1603 |
label: 'Left:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1604 |
name: 'GropLeftLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1605 |
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
|
1606 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1607 |
adjust: right |
1650 | 1608 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1609 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1610 |
name: 'GropLeftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1611 |
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
|
1612 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1613 |
model: left |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1614 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1615 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1616 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1617 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1618 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1619 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1620 |
name: 'GropLeftNowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1621 |
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
|
1622 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1623 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1624 |
model: gropLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1625 |
autoRepeat: true |
1650 | 1626 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1627 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1628 |
label: 'Right:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1629 |
name: 'GropRightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1630 |
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
|
1631 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1632 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1633 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1634 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1635 |
name: 'GropRightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1636 |
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
|
1637 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1638 |
model: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1639 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1640 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1641 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1642 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1643 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1644 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1645 |
name: 'GropRightButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1646 |
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
|
1647 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1648 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1649 |
model: gropRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1650 |
autoRepeat: true |
1650 | 1651 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1652 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1653 |
label: 'Top:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1654 |
name: 'GropTopLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1655 |
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
|
1656 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1657 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1658 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1659 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1660 |
name: 'GropTopEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1661 |
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
|
1662 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1663 |
model: top |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1664 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1665 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1666 |
acceptOnPointerLeave: false |
1650 | 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: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1670 |
name: 'GropTopButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1671 |
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
|
1672 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1673 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1674 |
model: gropTopNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1675 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1676 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1677 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1678 |
label: 'Bottom:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1679 |
name: 'GropBottomLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1680 |
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
|
1681 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1682 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1683 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1684 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1685 |
name: 'GropBottomEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1686 |
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
|
1687 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1688 |
model: bottom |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1689 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1690 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1691 |
acceptOnPointerLeave: false |
1650 | 1692 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1693 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1694 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1695 |
name: 'GropBottomButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1696 |
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
|
1697 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1698 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1699 |
model: gropBottomNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1700 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1701 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1702 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1703 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1704 |
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
|
1705 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1706 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1707 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1708 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1709 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1710 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1711 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1712 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1713 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1714 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1715 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1716 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1717 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1718 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1719 |
extent: (Point 77 22) |
1650 | 1720 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1721 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1722 |
label: 'Apply' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1723 |
name: 'Button3' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1724 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1725 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1726 |
model: applyAction |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1727 |
extent: (Point 78 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1728 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1729 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1730 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1731 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1732 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1733 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1734 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1735 |
extent: (Point 78 22) |
1650 | 1736 |
) |
1737 |
) |
|
1738 |
||
1739 |
) |
|
1740 |
) |
|
1741 |
) |
|
1742 |
||
1743 |
) |
|
1744 |
) |
|
1745 |
! |
|
1746 |
||
767 | 1747 |
dialogSpecForNewImage |
737 | 1748 |
"This resource specification was automatically generated |
1749 |
by the UIPainter of ST/X." |
|
519 | 1750 |
|
737 | 1751 |
"Do not manually edit this!! If it is corrupted, |
1752 |
the UIPainter may not be able to read the specification." |
|
519 | 1753 |
|
1754 |
" |
|
767 | 1755 |
UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage |
1756 |
ImageEditor new openInterface:#dialogSpecForNewImage |
|
519 | 1757 |
" |
1758 |
||
1759 |
<resource: #canvas> |
|
1760 |
||
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1761 |
^ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1762 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1763 |
name: dialogSpecForNewImage |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1764 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1765 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1766 |
label: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1767 |
name: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1768 |
min: (Point 10 10) |
1806 | 1769 |
bounds: (Rectangle 0 0 301 119) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1770 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1771 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1772 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1773 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1774 |
(ViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1775 |
name: 'View' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1776 |
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
|
1777 |
level: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1778 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1779 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1780 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1781 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1782 |
label: 'Size' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1783 |
name: 'framedBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1784 |
layout: (LayoutFrame 1 0.0 7 0.0 0 0.4 76 0) |
1806 | 1785 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1786 |
labelPosition: topLeft |
1806 | 1787 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1788 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1789 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1790 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1791 |
(ComboBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1792 |
name: 'defaultSizesComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1793 |
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
|
1794 |
model: selectionOfSize |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1795 |
type: string |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1796 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1797 |
comboList: listOfDefaultSizes |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1798 |
isFilenameBox: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1799 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1800 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1801 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1802 |
) |
1490 | 1803 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1804 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1805 |
label: 'Color Map' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1806 |
name: 'framedBox2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1807 |
layout: (LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0) |
1806 | 1808 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1809 |
labelPosition: topLeft |
1806 | 1810 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1811 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1812 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1813 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1814 |
(ComboListSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1815 |
name: 'colorMapComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1816 |
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
|
1817 |
model: selectionOfColorMap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1818 |
comboList: listOfColorMaps |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1819 |
useIndex: false |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1820 |
hidePullDownMenuButton: false |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1821 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1822 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1823 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1824 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1825 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1826 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1827 |
|
986 | 1828 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1829 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1830 |
(UISubSpecification |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1831 |
name: 'windowSpecForCommitWithoutChannels' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1832 |
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
|
1833 |
minorKey: windowSpecForCommitWithoutChannels |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1834 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1835 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1836 |
|
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1837 |
) |
986 | 1838 |
) |
1839 |
! |
|
1840 |
||
1557 | 1841 |
shiftDialogSpec |
1842 |
"This resource specification was automatically generated |
|
1843 |
by the UIPainter of ST/X." |
|
1844 |
||
1845 |
"Do not manually edit this!! If it is corrupted, |
|
1846 |
the UIPainter may not be able to read the specification." |
|
1847 |
||
1848 |
" |
|
1849 |
UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec |
|
1850 |
ImageEditor new openInterface:#shiftDialogSpec |
|
1851 |
" |
|
1852 |
||
1853 |
<resource: #canvas> |
|
1854 |
||
1855 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1856 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1857 |
name: shiftDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1858 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1859 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1860 |
label: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1861 |
name: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1862 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1863 |
bounds: (Rectangle 14 46 259 229) |
1557 | 1864 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1865 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1866 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1867 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1868 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1869 |
label: 'Amount:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1870 |
name: 'AmountLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1871 |
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
|
1872 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1873 |
adjust: right |
1557 | 1874 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1875 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1876 |
name: 'AmountEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1877 |
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
|
1878 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1879 |
model: shiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1880 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1881 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1882 |
acceptOnPointerLeave: false |
1557 | 1883 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1884 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1885 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1886 |
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
|
1887 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1888 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1889 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1890 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1891 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1892 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1893 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1894 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1895 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1896 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1897 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1898 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1899 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1900 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1901 |
extent: (Point 118 22) |
1557 | 1902 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1903 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1904 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1905 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1906 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1907 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1908 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1909 |
extent: (Point 118 22) |
1557 | 1910 |
) |
1911 |
) |
|
1912 |
||
1913 |
) |
|
1914 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1915 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1916 |
name: 'upArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1917 |
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
|
1918 |
model: shiftUpNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1919 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1920 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1921 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1922 |
direction: up |
1557 | 1923 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1924 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1925 |
name: 'leftArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1926 |
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
|
1927 |
model: shiftLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1928 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1929 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1930 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1931 |
direction: left |
1557 | 1932 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1933 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1934 |
name: 'rightArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1935 |
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
|
1936 |
model: shiftRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1937 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1938 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1939 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1940 |
direction: right |
1557 | 1941 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1942 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1943 |
name: 'downArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1944 |
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
|
1945 |
model: shiftDownNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1946 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1947 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1948 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1949 |
direction: down |
1557 | 1950 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1951 |
(CheckBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1952 |
label: 'Wrap' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1953 |
name: 'CheckBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1954 |
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
|
1955 |
model: wrap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1956 |
translateLabel: true |
1713 | 1957 |
) |
1557 | 1958 |
) |
1959 |
||
1960 |
) |
|
1961 |
) |
|
1962 |
! |
|
1963 |
||
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1964 |
uncropDialogSpec |
1480 | 1965 |
"This resource specification was automatically generated |
1966 |
by the UIPainter of ST/X." |
|
1796 | 1967 |
|
1480 | 1968 |
"Do not manually edit this!! If it is corrupted, |
1969 |
the UIPainter may not be able to read the specification." |
|
1796 | 1970 |
|
1480 | 1971 |
" |
1796 | 1972 |
UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec |
1973 |
ImageEditor new openInterface:#uncropDialogSpec |
|
1480 | 1974 |
" |
1796 | 1975 |
|
1976 |
<resource: #canvas> |
|
1977 |
||
1978 |
^ |
|
1979 |
#(FullSpec |
|
1980 |
name: uncropDialogSpec |
|
1981 |
window: |
|
1982 |
(WindowSpec |
|
1983 |
label: 'Add Border(s)' |
|
1984 |
name: 'Add Border(s)' |
|
1985 |
min: (Point 10 10) |
|
1986 |
max: (Point 800 478) |
|
1987 |
bounds: (Rectangle 0 0 261 228) |
|
1988 |
) |
|
1989 |
component: |
|
1990 |
(SpecCollection |
|
1991 |
collection: ( |
|
1992 |
(LabelSpec |
|
1993 |
label: 'Left:' |
|
1994 |
name: 'Label1' |
|
1995 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
|
1996 |
translateLabel: true |
|
1997 |
adjust: right |
|
1998 |
) |
|
1999 |
(InputFieldSpec |
|
2000 |
name: 'EntryField1' |
|
2001 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
|
2002 |
model: left |
|
2003 |
type: number |
|
2004 |
acceptOnPointerLeave: false |
|
2005 |
) |
|
2006 |
(LabelSpec |
|
2007 |
label: 'Right:' |
|
2008 |
name: 'Label2' |
|
2009 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
|
2010 |
translateLabel: true |
|
2011 |
adjust: right |
|
2012 |
) |
|
2013 |
(InputFieldSpec |
|
2014 |
name: 'EntryField2' |
|
2015 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
|
2016 |
model: right |
|
2017 |
type: number |
|
2018 |
acceptOnPointerLeave: false |
|
2019 |
) |
|
2020 |
(LabelSpec |
|
2021 |
label: 'Top:' |
|
2022 |
name: 'Label3' |
|
2023 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
|
2024 |
translateLabel: true |
|
2025 |
adjust: right |
|
2026 |
) |
|
2027 |
(InputFieldSpec |
|
2028 |
name: 'EntryField3' |
|
2029 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
|
2030 |
model: top |
|
2031 |
type: number |
|
2032 |
acceptOnPointerLeave: false |
|
2033 |
) |
|
2034 |
(LabelSpec |
|
2035 |
label: 'Bottom:' |
|
2036 |
name: 'Label4' |
|
2037 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
|
2038 |
translateLabel: true |
|
2039 |
adjust: right |
|
2040 |
) |
|
2041 |
(InputFieldSpec |
|
2042 |
name: 'EntryField4' |
|
2043 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
|
2044 |
model: bottom |
|
2045 |
type: number |
|
2046 |
acceptOnPointerLeave: false |
|
2047 |
) |
|
2048 |
(HorizontalPanelViewSpec |
|
2049 |
name: 'HorizontalPanel1' |
|
2050 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
|
2051 |
horizontalLayout: fitSpace |
|
2052 |
verticalLayout: center |
|
2053 |
horizontalSpace: 3 |
|
2054 |
verticalSpace: 3 |
|
2055 |
reverseOrderIfOKAtLeft: true |
|
2056 |
component: |
|
2057 |
(SpecCollection |
|
2058 |
collection: ( |
|
2059 |
(ActionButtonSpec |
|
2060 |
label: 'Cancel' |
|
2061 |
name: 'Button1' |
|
2062 |
translateLabel: true |
|
2063 |
model: cancel |
|
2064 |
extent: (Point 118 22) |
|
2065 |
) |
|
2066 |
(ActionButtonSpec |
|
2067 |
label: 'OK' |
|
2068 |
name: 'Button2' |
|
2069 |
translateLabel: true |
|
2070 |
model: accept |
|
2071 |
extent: (Point 118 22) |
|
2072 |
) |
|
2073 |
) |
|
2074 |
||
2075 |
) |
|
2076 |
) |
|
2077 |
) |
|
2078 |
||
2079 |
) |
|
2080 |
) |
|
1480 | 2081 |
! |
2082 |
||
767 | 2083 |
windowSpec |
2084 |
"This resource specification was automatically generated |
|
2085 |
by the UIPainter of ST/X." |
|
2086 |
||
2087 |
"Do not manually edit this!! If it is corrupted, |
|
2088 |
the UIPainter may not be able to read the specification." |
|
2089 |
||
2090 |
" |
|
2091 |
UIPainter new openOnClass:ImageEditor andSelector:#windowSpec |
|
2092 |
ImageEditor new openInterface:#windowSpec |
|
2093 |
ImageEditor open |
|
2094 |
" |
|
2095 |
||
2096 |
<resource: #canvas> |
|
2097 |
||
1558 | 2098 |
^ |
3195 | 2099 |
#(FullSpec |
2100 |
name: windowSpec |
|
2101 |
window: |
|
2102 |
(WindowSpec |
|
2103 |
label: 'Image Editor' |
|
2104 |
name: 'Image Editor' |
|
2105 |
min: (Point 400 320) |
|
2106 |
bounds: (Rectangle 0 0 450 350) |
|
2107 |
menu: menu |
|
2108 |
icon: defaultIcon |
|
2109 |
) |
|
2110 |
component: |
|
2111 |
(SpecCollection |
|
2112 |
collection: ( |
|
2113 |
(MenuPanelSpec |
|
2114 |
name: 'menuToolbarView' |
|
2115 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
2116 |
style: (FontDescription helvetica medium roman 10) |
|
2117 |
menu: menuToolbar |
|
2118 |
showSeparatingLines: true |
|
2119 |
) |
|
2120 |
(VariableHorizontalPanelSpec |
|
2121 |
name: 'mainPanel' |
|
2122 |
layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
2123 |
snapMode: both |
|
2124 |
barLevel: 0 |
|
2125 |
component: |
|
2126 |
(SpecCollection |
|
2127 |
collection: ( |
|
2128 |
(ViewSpec |
|
2129 |
name: 'leftView' |
|
2130 |
level: 1 |
|
2131 |
component: |
|
2132 |
(SpecCollection |
|
2133 |
collection: ( |
|
2134 |
(VariableVerticalPanelSpec |
|
2135 |
name: 'verticalPanel' |
|
2136 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
2137 |
level: 0 |
|
2138 |
snapMode: both |
|
2139 |
component: |
|
2140 |
(SpecCollection |
|
2141 |
collection: ( |
|
2142 |
(ViewSpec |
|
2143 |
name: 'View1' |
|
2144 |
component: |
|
2145 |
(SpecCollection |
|
2146 |
collection: ( |
|
2147 |
(MenuPanelSpec |
|
2148 |
name: 'MouseButtonColorToolBar' |
|
2149 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
2150 |
level: 0 |
|
2151 |
menu: menuMouseButtonColors |
|
1558 | 2152 |
) |
3195 | 2153 |
(DataSetSpec |
2154 |
name: 'colorDataSetView' |
|
2155 |
layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
2156 |
activeHelpKey: colorMapTable |
|
2157 |
style: (FontDescription helvetica medium roman 10) |
|
2158 |
model: selectedColors |
|
2159 |
menu: colorMapMenu |
|
2160 |
hasHorizontalScrollBar: true |
|
2161 |
hasVerticalScrollBar: true |
|
2162 |
miniScrollerHorizontal: true |
|
2163 |
miniScrollerVertical: true |
|
2164 |
dataList: listOfColors |
|
2165 |
has3Dseparators: true |
|
2166 |
doubleClickSelector: doubleClickOnColor: |
|
2167 |
columnHolder: colorTableColumns |
|
2168 |
multipleSelectOk: true |
|
2169 |
verticalSpacing: 1 |
|
2170 |
columnAdaptor: colorColumnAdaptor |
|
2171 |
) |
|
2172 |
) |
|
2173 |
||
2174 |
) |
|
1558 | 2175 |
) |
3195 | 2176 |
(ArbitraryComponentSpec |
2177 |
name: 'imagePreView' |
|
2178 |
activeHelpKey: previewView |
|
2179 |
menu: previewMenu |
|
2180 |
hasHorizontalScrollBar: true |
|
2181 |
hasVerticalScrollBar: true |
|
2182 |
miniScrollerHorizontal: false |
|
2183 |
miniScrollerVertical: false |
|
2184 |
hasBorder: false |
|
2185 |
component: ImageView |
|
2186 |
) |
|
2187 |
) |
|
2188 |
||
2189 |
) |
|
2190 |
handles: (Any 0.5 1.0) |
|
1558 | 2191 |
) |
3195 | 2192 |
) |
2193 |
||
2194 |
) |
|
2195 |
) |
|
2196 |
(ViewSpec |
|
2197 |
name: 'rightView' |
|
2198 |
component: |
|
2199 |
(SpecCollection |
|
2200 |
collection: ( |
|
2201 |
(MenuPanelSpec |
|
2202 |
name: 'ToolBar1' |
|
2203 |
layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0) |
|
2204 |
level: 1 |
|
2205 |
menu: toolsMenuToolbar |
|
2206 |
verticalLayout: true |
|
2207 |
centerItems: true |
|
2208 |
textDefault: true |
|
2209 |
) |
|
2210 |
(ViewSpec |
|
2211 |
name: 'editingView' |
|
2212 |
layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0) |
|
2213 |
level: 1 |
|
2214 |
component: |
|
2215 |
(SpecCollection |
|
2216 |
collection: ( |
|
2217 |
(ArbitraryComponentSpec |
|
2218 |
name: 'imageEditView' |
|
2219 |
layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0) |
|
2220 |
hasHorizontalScrollBar: true |
|
2221 |
hasVerticalScrollBar: true |
|
2222 |
hasBorder: false |
|
2223 |
component: ImageEditView |
|
2224 |
) |
|
2225 |
(LabelSpec |
|
2226 |
name: 'coordLabel' |
|
2227 |
layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0) |
|
2228 |
level: -1 |
|
2229 |
translateLabel: true |
|
2230 |
labelChannel: imageInfoHolder |
|
2231 |
resizeForLabel: false |
|
2232 |
adjust: left |
|
1637 | 2233 |
) |
3195 | 2234 |
(ArrowButtonSpec |
2235 |
name: 'magnifyDownButton' |
|
2236 |
layout: (LayoutFrame -80 1 -22 1 -58 1 0 1) |
|
2237 |
activeHelpKey: magnifyImageDown |
|
2238 |
translateLabel: true |
|
2239 |
model: doMagnifyDown |
|
2240 |
enableChannel: imageIsLoadedHolder |
|
2241 |
isTriggerOnDown: true |
|
2242 |
direction: left |
|
2243 |
) |
|
2244 |
(ArrowButtonSpec |
|
2245 |
name: 'magnifyUpButton' |
|
2246 |
layout: (LayoutFrame -24 1 -22 1 -2 1 0 1) |
|
2247 |
activeHelpKey: magnifyImageUp |
|
2248 |
translateLabel: true |
|
2249 |
model: doMagnifyUp |
|
2250 |
enableChannel: imageIsLoadedHolder |
|
2251 |
isTriggerOnDown: true |
|
2252 |
direction: right |
|
2253 |
) |
|
2254 |
(InputFieldSpec |
|
2255 |
name: 'magnificationInputField' |
|
2256 |
layout: (LayoutFrame -57 1 -22 1 -26 1 0 1) |
|
2257 |
activeHelpKey: magnificationNumber |
|
2258 |
enableChannel: imageIsLoadedHolder |
|
2259 |
model: magnificationHolder |
|
2260 |
type: numberInRange |
|
2261 |
acceptOnReturn: true |
|
2262 |
acceptOnTab: true |
|
2263 |
numChars: 2 |
|
2264 |
minValue: 1 |
|
2265 |
maxValue: 99 |
|
2266 |
acceptOnPointerLeave: true |
|
2267 |
) |
|
2268 |
) |
|
2269 |
||
2270 |
) |
|
1558 | 2271 |
) |
3195 | 2272 |
) |
2273 |
||
2274 |
) |
|
1558 | 2275 |
) |
3195 | 2276 |
) |
2277 |
||
2278 |
) |
|
2279 |
handles: (Any 0.28888900000000006 1.0) |
|
1558 | 2280 |
) |
3195 | 2281 |
(UISubSpecification |
2282 |
name: 'infoBarSubSpec' |
|
2283 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
2284 |
majorKey: ToolApplicationModel |
|
2285 |
minorKey: windowSpecForInfoBar |
|
2286 |
) |
|
2287 |
) |
|
2288 |
||
2289 |
) |
|
2290 |
) |
|
519 | 2291 |
! ! |
2292 |
||
2293 |
!ImageEditor class methodsFor:'menu specs'! |
|
2294 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2295 |
colorMapMenu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2296 |
"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
|
2297 |
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
|
2298 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2299 |
"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
|
2300 |
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
|
2301 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2302 |
" |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2303 |
MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2304 |
(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
|
2305 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2306 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2307 |
<resource: #menu> |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2308 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2309 |
^ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2310 |
#(Menu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2311 |
( |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2312 |
(MenuItem |
2792 | 2313 |
enabled: hasColormapHolder |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2314 |
label: 'Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2315 |
itemValue: addColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2316 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2317 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2318 |
(MenuItem |
2792 | 2319 |
enabled: hasColormapHolder |
2539 | 2320 |
label: 'Pick and Add Color...' |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2321 |
itemValue: pickAndAddColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2322 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2323 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2324 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2325 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2326 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2327 |
(MenuItem |
3195 | 2328 |
enabled: hasColormapAndSingleColorSelected |
1852 | 2329 |
label: 'Cut Color' |
2330 |
itemValue: cutColorFromColormap |
|
2331 |
translateLabel: true |
|
2332 |
isVisible: false |
|
2333 |
) |
|
2334 |
(MenuItem |
|
3195 | 2335 |
enabled: hasSingleColorSelectedHolder |
1852 | 2336 |
label: 'Copy Color' |
2337 |
itemValue: copyColorFromColormap |
|
2338 |
translateLabel: true |
|
2841 | 2339 |
shortcutKey: Copy |
1852 | 2340 |
) |
2341 |
(MenuItem |
|
3195 | 2342 |
enabled: hasColormapAndSingleColorSelected |
2539 | 2343 |
label: 'Pick and Paste Color...' |
1933 | 2344 |
itemValue: pickAndPasteColor |
1852 | 2345 |
translateLabel: true |
2346 |
) |
|
2347 |
(MenuItem |
|
2348 |
label: 'Paste Color' |
|
2349 |
itemValue: pasteColorIntoColormap |
|
2350 |
translateLabel: true |
|
2841 | 2351 |
shortcutKey: Paste |
1852 | 2352 |
) |
2353 |
(MenuItem |
|
2354 |
label: '-' |
|
2355 |
) |
|
2356 |
(MenuItem |
|
3195 | 2357 |
enabled: hasColormapAndSingleColorSelected |
2539 | 2358 |
label: 'Edit Color...' |
1931 | 2359 |
itemValue: editSelectedColor |
2360 |
translateLabel: true |
|
2361 |
) |
|
2362 |
(MenuItem |
|
2651 | 2363 |
enabled: hasColormapAndColorSelected |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2364 |
label: 'Brighter' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2365 |
itemValue: makeSelectedColorBrighter |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2366 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2367 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2368 |
(MenuItem |
2651 | 2369 |
enabled: hasColormapAndColorSelected |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2370 |
label: 'Darker' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2371 |
itemValue: makeSelectedColorDarker |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2372 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2373 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2374 |
(MenuItem |
2651 | 2375 |
enabled: hasColormapAndColorSelected |
1884 | 2376 |
label: 'Make Gray' |
2377 |
itemValue: makeSelectedColorGray |
|
2378 |
translateLabel: true |
|
2379 |
) |
|
2380 |
(MenuItem |
|
3195 | 2381 |
enabled: hasColormapAndColorSelected |
2382 |
label: 'Color Shift' |
|
2383 |
itemValue: makeSelectedColorShifted |
|
2384 |
translateLabel: true |
|
2385 |
) |
|
2386 |
(MenuItem |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2387 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2388 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2389 |
(MenuItem |
3195 | 2390 |
enabled: hasSingleColorSelectedHolder |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2391 |
label: 'Inspect Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2392 |
itemValue: inspectColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2393 |
translateLabel: true |
2651 | 2394 |
) |
2395 |
(MenuItem |
|
2792 | 2396 |
enabled: hasColormapHolder |
2651 | 2397 |
label: 'Inspect Colormap' |
2398 |
itemValue: inspectColormap |
|
2399 |
translateLabel: true |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2400 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2401 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2402 |
nil |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2403 |
nil |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2404 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2405 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2406 |
|
400 | 2407 |
menu |
737 | 2408 |
"This resource specification was automatically generated |
2409 |
by the MenuEditor of ST/X." |
|
400 | 2410 |
|
737 | 2411 |
"Do not manually edit this!! If it is corrupted, |
2412 |
the MenuEditor may not be able to read the specification." |
|
400 | 2413 |
|
2414 |
" |
|
2415 |
MenuEditor new openOnClass:ImageEditor andSelector:#menu |
|
2416 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp |
|
2417 |
" |
|
2418 |
||
2419 |
<resource: #menu> |
|
2420 |
||
1124 | 2421 |
^ |
1882 | 2422 |
#(Menu |
2423 |
( |
|
2424 |
(MenuItem |
|
2425 |
label: '&File' |
|
2426 |
translateLabel: true |
|
2196 | 2427 |
submenuChannel: menuFile |
2585 | 2428 |
"/ keepLinkedMenu: true |
1124 | 2429 |
) |
1882 | 2430 |
(MenuItem |
2431 |
label: 'Edit' |
|
2432 |
translateLabel: true |
|
2196 | 2433 |
submenuChannel: menuEdit |
2585 | 2434 |
"/ keepLinkedMenu: true |
1124 | 2435 |
) |
1882 | 2436 |
(MenuItem |
2437 |
label: 'Mode' |
|
2438 |
translateLabel: true |
|
2439 |
submenuChannel: modeMenu |
|
3374 | 2440 |
isVisible: modeMenuVisible |
1637 | 2441 |
) |
1882 | 2442 |
(MenuItem |
1924 | 2443 |
label: 'Colors' |
1882 | 2444 |
translateLabel: true |
2585 | 2445 |
submenuChannel: menuColors |
1124 | 2446 |
) |
1882 | 2447 |
(MenuItem |
2448 |
label: 'Settings' |
|
2449 |
translateLabel: true |
|
2585 | 2450 |
submenuChannel: menuSettings |
1124 | 2451 |
) |
1882 | 2452 |
(MenuItem |
2453 |
label: 'History' |
|
2454 |
translateLabel: true |
|
1975 | 2455 |
isVisible: isStandAlone |
1882 | 2456 |
submenuChannel: menuHistory |
1124 | 2457 |
) |
1882 | 2458 |
(MenuItem |
2136
bb10485fa455
support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents:
2125
diff
changeset
|
2459 |
label: 'MENU_Help' |
1882 | 2460 |
translateLabel: true |
2125 | 2461 |
startGroup: conditionalRight |
1882 | 2462 |
submenuChannel: menuHelp |
1124 | 2463 |
) |
2464 |
) |
|
2465 |
nil |
|
2466 |
nil |
|
400 | 2467 |
) |
2468 |
! |
|
2469 |
||
2585 | 2470 |
menuColors |
2471 |
"This resource specification was automatically generated |
|
2472 |
by the MenuEditor of ST/X." |
|
2473 |
||
2474 |
"Do not manually edit this!! If it is corrupted, |
|
2475 |
the MenuEditor may not be able to read the specification." |
|
2476 |
||
2477 |
" |
|
2478 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuColors |
|
2479 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuColors)) startUp |
|
2480 |
" |
|
2481 |
||
2482 |
<resource: #menu> |
|
2483 |
||
2484 |
^ |
|
2485 |
#(Menu |
|
2486 |
( |
|
2487 |
(MenuItem |
|
2767 | 2488 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2585 | 2489 |
label: 'Depth' |
2490 |
translateLabel: true |
|
2491 |
submenu: |
|
2492 |
(Menu |
|
2493 |
( |
|
2494 |
(MenuItem |
|
2495 |
activeHelpKey: colorMap1 |
|
2496 |
label: '1-Plane' |
|
2497 |
itemValue: colorMapMode: |
|
2498 |
translateLabel: true |
|
2499 |
argument: depth1 |
|
2500 |
choice: colorMapMode |
|
2501 |
choiceValue: depth1 |
|
2502 |
) |
|
2503 |
(MenuItem |
|
2504 |
activeHelpKey: colorMap1M |
|
2505 |
label: '1-Plane + Mask' |
|
2506 |
itemValue: colorMapMode: |
|
2507 |
translateLabel: true |
|
2508 |
argument: masked1 |
|
2509 |
choice: colorMapMode |
|
2510 |
choiceValue: masked1 |
|
2511 |
) |
|
2512 |
(MenuItem |
|
2513 |
label: '-' |
|
2514 |
) |
|
2515 |
(MenuItem |
|
2516 |
activeHelpKey: colorMap2 |
|
2517 |
label: '2-Plane' |
|
2518 |
itemValue: colorMapMode: |
|
2519 |
translateLabel: true |
|
2520 |
argument: depth2 |
|
2521 |
choice: colorMapMode |
|
2522 |
choiceValue: depth2 |
|
2523 |
) |
|
2524 |
(MenuItem |
|
2525 |
activeHelpKey: colorMap2M |
|
2526 |
label: '2-Plane + Mask' |
|
2527 |
itemValue: colorMapMode: |
|
2528 |
translateLabel: true |
|
2529 |
argument: masked2 |
|
2530 |
choice: colorMapMode |
|
2531 |
choiceValue: masked2 |
|
2532 |
) |
|
2533 |
(MenuItem |
|
2534 |
label: '-' |
|
2535 |
) |
|
2536 |
(MenuItem |
|
2537 |
activeHelpKey: colorMap4 |
|
2538 |
label: '4-Plane' |
|
2539 |
itemValue: colorMapMode: |
|
2540 |
translateLabel: true |
|
2541 |
argument: depth4 |
|
2542 |
choice: colorMapMode |
|
2543 |
choiceValue: depth4 |
|
2544 |
) |
|
2545 |
(MenuItem |
|
2546 |
activeHelpKey: colorMap4M |
|
2547 |
label: '4-Plane + Mask' |
|
2548 |
itemValue: colorMapMode: |
|
2549 |
translateLabel: true |
|
2550 |
argument: masked4 |
|
2551 |
choice: colorMapMode |
|
2552 |
choiceValue: masked4 |
|
2553 |
) |
|
2554 |
(MenuItem |
|
2555 |
label: '-' |
|
2556 |
) |
|
2557 |
(MenuItem |
|
2558 |
activeHelpKey: colorMap8 |
|
2559 |
label: '8-Plane' |
|
2560 |
itemValue: colorMapMode: |
|
2561 |
translateLabel: true |
|
2562 |
argument: depth8 |
|
2563 |
choice: colorMapMode |
|
2564 |
choiceValue: depth8 |
|
2565 |
) |
|
2566 |
(MenuItem |
|
2567 |
activeHelpKey: colorMap8M |
|
2568 |
label: '8-Plane + Mask' |
|
2569 |
itemValue: colorMapMode: |
|
2570 |
translateLabel: true |
|
2571 |
argument: masked8 |
|
2572 |
choice: colorMapMode |
|
2573 |
choiceValue: masked8 |
|
2574 |
) |
|
2575 |
(MenuItem |
|
2576 |
label: '-' |
|
2577 |
) |
|
2578 |
(MenuItem |
|
2579 |
activeHelpKey: colorMap16 |
|
2580 |
label: '16-Plane' |
|
2581 |
itemValue: colorMapMode: |
|
2582 |
translateLabel: true |
|
2583 |
argument: depth16 |
|
2584 |
choice: colorMapMode |
|
2585 |
choiceValue: depth16 |
|
2586 |
) |
|
2587 |
(MenuItem |
|
2588 |
activeHelpKey: colorMap16M |
|
2589 |
label: '16-Plane + Mask' |
|
2590 |
itemValue: colorMapMode: |
|
2591 |
translateLabel: true |
|
2592 |
argument: masked16 |
|
2593 |
choice: colorMapMode |
|
2594 |
choiceValue: masked16 |
|
2595 |
) |
|
2596 |
(MenuItem |
|
2597 |
label: '-' |
|
2598 |
) |
|
2599 |
(MenuItem |
|
2600 |
activeHelpKey: colorMap24 |
|
2601 |
label: '24-Plane' |
|
2602 |
itemValue: colorMapMode: |
|
2603 |
translateLabel: true |
|
2604 |
argument: depth24 |
|
2605 |
choice: colorMapMode |
|
2606 |
choiceValue: depth24 |
|
2607 |
) |
|
2608 |
(MenuItem |
|
2609 |
activeHelpKey: colorMap24M |
|
2610 |
label: '24-Plane + Mask' |
|
2611 |
itemValue: colorMapMode: |
|
2612 |
translateLabel: true |
|
2613 |
argument: masked24 |
|
2614 |
choice: colorMapMode |
|
2615 |
choiceValue: masked24 |
|
2616 |
) |
|
2617 |
(MenuItem |
|
2618 |
label: '-' |
|
2619 |
) |
|
2620 |
(MenuItem |
|
2621 |
activeHelpKey: colorMap32 |
|
2622 |
label: '32-Plane (rgba)' |
|
2623 |
itemValue: colorMapMode: |
|
2624 |
translateLabel: true |
|
2625 |
argument: depth32 |
|
2626 |
choice: colorMapMode |
|
2627 |
choiceValue: depth32 |
|
2628 |
) |
|
2629 |
) |
|
2630 |
nil |
|
2631 |
nil |
|
2632 |
) |
|
2633 |
) |
|
2634 |
(MenuItem |
|
2792 | 2635 |
enabled: imageIsLoadedHolder |
2585 | 2636 |
label: 'ColorMap' |
2637 |
translateLabel: true |
|
2638 |
submenu: |
|
2639 |
(Menu |
|
2640 |
( |
|
2641 |
(MenuItem |
|
2642 |
activeHelpKey: compressColormap |
|
2792 | 2643 |
enabled: hasColormapHolder |
2585 | 2644 |
label: 'Compress Colormap' |
2826 | 2645 |
itemValue: #'menu_compressColorMap' |
2585 | 2646 |
translateLabel: true |
2647 |
) |
|
2648 |
(MenuItem |
|
2792 | 2649 |
enabled: hasColormapHolder |
2585 | 2650 |
label: 'Sort Colormap' |
2826 | 2651 |
itemValue: #'menu_sortColorMap' |
2585 | 2652 |
translateLabel: true |
2653 |
) |
|
2654 |
(MenuItem |
|
2655 |
label: 'Reduce Number of Colors by Rounding...' |
|
2656 |
itemValue: reduceNumberOfColors2 |
|
2657 |
translateLabel: true |
|
2658 |
) |
|
2659 |
(MenuItem |
|
2660 |
label: 'Reduce Number of Colors by Masking Bits...' |
|
2661 |
itemValue: reduceNumberOfColors |
|
2662 |
translateLabel: true |
|
2663 |
) |
|
2664 |
(MenuItem |
|
2665 |
label: 'Dither to Depth...' |
|
2666 |
itemValue: ditherToDepth |
|
2667 |
translateLabel: true |
|
2668 |
) |
|
2669 |
(MenuItem |
|
2670 |
label: '-' |
|
2671 |
) |
|
2672 |
(MenuItem |
|
2792 | 2673 |
enabled: imageIsLoadedHolder |
2585 | 2674 |
label: 'Brighten' |
2675 |
itemValue: doBrightenImage |
|
2676 |
translateLabel: true |
|
2677 |
) |
|
2678 |
(MenuItem |
|
2792 | 2679 |
enabled: imageIsLoadedHolder |
2585 | 2680 |
label: 'Darken' |
2681 |
itemValue: doDarkenImage |
|
2682 |
translateLabel: true |
|
2683 |
) |
|
2652 | 2684 |
(MenuItem |
2792 | 2685 |
enabled: imageIsLoadedHolder |
2652 | 2686 |
label: 'Invert' |
2687 |
itemValue: doNegativeImage |
|
2688 |
translateLabel: true |
|
2689 |
) |
|
2585 | 2690 |
) |
2691 |
nil |
|
2692 |
nil |
|
2693 |
) |
|
2694 |
) |
|
2695 |
(MenuItem |
|
2792 | 2696 |
enabled: imageIsLoadedHolder |
2585 | 2697 |
label: 'Process' |
2698 |
translateLabel: true |
|
2699 |
submenu: |
|
2700 |
(Menu |
|
2701 |
( |
|
2702 |
(MenuItem |
|
2703 |
label: 'Make GrayScale' |
|
2704 |
itemValue: makeGrayScaleImage |
|
2705 |
translateLabel: true |
|
2706 |
) |
|
2707 |
(MenuItem |
|
2826 | 2708 |
enabled: allowedToChangeImageDimensionAndDepth |
2585 | 2709 |
label: 'Make dithered 8Bit Palette' |
2710 |
itemValue: makeDitheredPaletteImage |
|
2711 |
translateLabel: true |
|
2712 |
isVisible: false |
|
2713 |
) |
|
2714 |
(MenuItem |
|
2826 | 2715 |
label: 'Make Inverse' |
2716 |
itemValue: makeInverse |
|
2717 |
translateLabel: true |
|
2718 |
) |
|
2719 |
(MenuItem |
|
2720 |
label: '-' |
|
2721 |
) |
|
2722 |
(MenuItem |
|
2723 |
label: 'Make Slightly Brighter' |
|
2724 |
itemValue: makeSlightlyBrighter |
|
2725 |
translateLabel: true |
|
2726 |
) |
|
2727 |
(MenuItem |
|
2728 |
label: 'Make Slightly Darker' |
|
2729 |
itemValue: makeSlightlyDarker |
|
2730 |
translateLabel: true |
|
2731 |
) |
|
2732 |
(MenuItem |
|
2733 |
label: '-' |
|
2734 |
) |
|
2735 |
(MenuItem |
|
2585 | 2736 |
label: 'Make Brighter' |
2737 |
itemValue: makeBrighter |
|
2738 |
translateLabel: true |
|
2739 |
) |
|
2740 |
(MenuItem |
|
2741 |
label: 'Make Darker' |
|
2742 |
itemValue: makeDarker |
|
2743 |
translateLabel: true |
|
2744 |
) |
|
2745 |
(MenuItem |
|
2746 |
label: '-' |
|
2747 |
) |
|
2748 |
(MenuItem |
|
2749 |
label: 'Change HLS...' |
|
2750 |
itemValue: changeHLS |
|
2751 |
translateLabel: true |
|
2752 |
) |
|
2753 |
(MenuItem |
|
2754 |
label: 'Colorize...' |
|
2755 |
itemValue: colorize |
|
2756 |
translateLabel: true |
|
2757 |
) |
|
2758 |
) |
|
2759 |
nil |
|
2760 |
nil |
|
2761 |
) |
|
2762 |
) |
|
2763 |
(MenuItem |
|
2792 | 2764 |
enabled: imageIsLoadedHolder |
2585 | 2765 |
label: 'Mask' |
2766 |
translateLabel: true |
|
2767 |
submenu: |
|
2768 |
(Menu |
|
2769 |
( |
|
2770 |
(MenuItem |
|
2771 |
activeHelpKey: copyMask |
|
2772 |
enabled: hasMask |
|
2773 |
label: 'Copy Mask' |
|
2826 | 2774 |
itemValue: #'menu_copyMask' |
2585 | 2775 |
translateLabel: true |
2776 |
) |
|
2777 |
(MenuItem |
|
2778 |
activeHelpKey: pasteMask |
|
2779 |
enabled: hasMask |
|
2780 |
label: 'Paste Mask' |
|
2826 | 2781 |
itemValue: #'menu_pasteMask' |
2585 | 2782 |
translateLabel: true |
2783 |
) |
|
2784 |
(MenuItem |
|
2785 |
enabled: hasMask |
|
2786 |
label: 'Clear Masked Pixels' |
|
2826 | 2787 |
itemValue: #'menu_clearMaskedPixels' |
2652 | 2788 |
translateLabel: true |
2789 |
) |
|
2790 |
(MenuItem |
|
2791 |
enabled: hasMask |
|
2653 | 2792 |
label: 'Clear Colormap Entry for Masked Pixels' |
2826 | 2793 |
itemValue: #'menu_clearColormapEntry0AndMaskedPixels' |
2585 | 2794 |
translateLabel: true |
2795 |
) |
|
2796 |
) |
|
2797 |
nil |
|
2798 |
nil |
|
2799 |
) |
|
2800 |
) |
|
2801 |
) |
|
2802 |
nil |
|
2803 |
nil |
|
2804 |
) |
|
2805 |
! |
|
2806 |
||
2196 | 2807 |
menuEdit |
2808 |
"This resource specification was automatically generated |
|
2809 |
by the MenuEditor of ST/X." |
|
2810 |
||
2811 |
"Do not manually edit this!! If it is corrupted, |
|
2812 |
the MenuEditor may not be able to read the specification." |
|
2813 |
||
2814 |
" |
|
2815 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuEdit |
|
2816 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuEdit)) startUp |
|
2817 |
" |
|
2818 |
||
2819 |
<resource: #menu> |
|
2820 |
||
2821 |
^ |
|
2822 |
#(Menu |
|
2823 |
( |
|
2824 |
(MenuItem |
|
2825 |
activeHelpKey: editUndo |
|
2826 |
enabled: canUndoHolder |
|
2827 |
label: 'Undo' |
|
2828 |
itemValue: doUndo |
|
2829 |
translateLabel: true |
|
2830 |
) |
|
2831 |
(MenuItem |
|
2832 |
label: '-' |
|
2833 |
) |
|
2834 |
(MenuItem |
|
2812 | 2835 |
enabled: imageIsLoadedHolder |
2836 |
label: 'Copy to Clipboard' |
|
2837 |
itemValue: doCopyImageToClipboard |
|
2838 |
translateLabel: true |
|
2839 |
) |
|
2840 |
(MenuItem |
|
2841 |
label: '-' |
|
2842 |
) |
|
2843 |
(MenuItem |
|
2844 |
activeHelpKey: editResize |
|
2767 | 2845 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2846 |
label: 'Resize...' |
2847 |
itemValue: doResizeImage |
|
2848 |
translateLabel: true |
|
2849 |
) |
|
2850 |
(MenuItem |
|
2812 | 2851 |
activeHelpKey: editMagnifyImage |
2767 | 2852 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2853 |
label: 'Magnify...' |
2854 |
itemValue: doMagnifyImage |
|
2855 |
translateLabel: true |
|
2856 |
) |
|
2857 |
(MenuItem |
|
2812 | 2858 |
activeHelpKey: editMagnifyImage |
2767 | 2859 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2860 |
label: 'Magnify By...' |
2861 |
itemValue: doMagnifyImageBy |
|
2862 |
translateLabel: true |
|
2863 |
) |
|
2864 |
(MenuItem |
|
2812 | 2865 |
activeHelpKey: editRotate |
2767 | 2866 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2867 |
label: 'Rotate...' |
2868 |
itemValue: doRotateImage |
|
2869 |
translateLabel: true |
|
2870 |
) |
|
2871 |
(MenuItem |
|
2812 | 2872 |
activeHelpKey: edit3DProjection |
2767 | 2873 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2874 |
label: '3D Projection...' |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2875 |
itemValue: do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2876 |
translateLabel: true |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2877 |
) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2878 |
(MenuItem |
2792 | 2879 |
enabled: imageIsLoadedHolder |
2196 | 2880 |
label: 'Flip' |
2881 |
translateLabel: true |
|
2882 |
submenu: |
|
2883 |
(Menu |
|
2884 |
( |
|
2885 |
(MenuItem |
|
2886 |
activeHelpKey: editFlipVertical |
|
2812 | 2887 |
enabled: imageIsLoadedHolder |
2196 | 2888 |
label: 'Flip - Vertical' |
2889 |
itemValue: doFlipVertical |
|
2890 |
translateLabel: true |
|
2837 | 2891 |
labelImage: (ResourceRetriever ImageEditor flipVerticalIcon 'Flip - Vertical') |
2196 | 2892 |
) |
2893 |
(MenuItem |
|
2894 |
activeHelpKey: editFlipHorizontal |
|
2812 | 2895 |
enabled: imageIsLoadedHolder |
2196 | 2896 |
label: 'Flip - Horizontal' |
2897 |
itemValue: doFlipHorizontal |
|
2898 |
translateLabel: true |
|
2837 | 2899 |
labelImage: (ResourceRetriever ImageEditor flipHorizontalIcon 'Flip - Horizontal') |
2196 | 2900 |
) |
2901 |
) |
|
2902 |
nil |
|
2903 |
nil |
|
2904 |
) |
|
2905 |
) |
|
2906 |
(MenuItem |
|
2907 |
label: '-' |
|
2908 |
) |
|
2909 |
(MenuItem |
|
2767 | 2910 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2911 |
label: 'Crop' |
2912 |
translateLabel: true |
|
2913 |
submenu: |
|
2914 |
(Menu |
|
2915 |
( |
|
2916 |
(MenuItem |
|
2917 |
activeHelpKey: cropManual |
|
2918 |
label: 'Manual...' |
|
2919 |
itemValue: doCropManual |
|
2920 |
translateLabel: true |
|
2921 |
) |
|
2922 |
(MenuItem |
|
2923 |
label: '-' |
|
2924 |
) |
|
2925 |
(MenuItem |
|
2926 |
activeHelpKey: cropAll |
|
2927 |
label: 'All' |
|
2928 |
itemValue: doCropAll |
|
2929 |
translateLabel: true |
|
2930 |
) |
|
2931 |
(MenuItem |
|
2932 |
label: '-' |
|
2933 |
) |
|
2934 |
(MenuItem |
|
2935 |
activeHelpKey: cropLeft |
|
2936 |
label: 'Left' |
|
2937 |
itemValue: doCropLeft |
|
2938 |
translateLabel: true |
|
2939 |
) |
|
2940 |
(MenuItem |
|
2941 |
activeHelpKey: cropRight |
|
2942 |
label: 'Right' |
|
2943 |
itemValue: doCropRight |
|
2944 |
translateLabel: true |
|
2945 |
) |
|
2946 |
(MenuItem |
|
2947 |
activeHelpKey: cropTop |
|
2948 |
label: 'Top' |
|
2949 |
itemValue: doCropTop |
|
2950 |
translateLabel: true |
|
2951 |
) |
|
2952 |
(MenuItem |
|
2953 |
activeHelpKey: cropBottom |
|
2954 |
label: 'Bottom' |
|
2955 |
itemValue: doCropBottom |
|
2956 |
translateLabel: true |
|
2957 |
) |
|
2958 |
) |
|
2959 |
nil |
|
2960 |
nil |
|
2961 |
) |
|
2962 |
) |
|
2963 |
(MenuItem |
|
2812 | 2964 |
activeHelpKey: uncropManual |
2767 | 2965 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2966 |
label: 'Uncrop (Add Border)...' |
2967 |
itemValue: doUnCropManual |
|
2968 |
translateLabel: true |
|
2969 |
) |
|
2970 |
(MenuItem |
|
2812 | 2971 |
activeHelpKey: shiftManual |
2792 | 2972 |
enabled: imageIsLoadedHolder |
2196 | 2973 |
label: 'Shift...' |
2974 |
itemValue: doShiftManual |
|
2975 |
translateLabel: true |
|
2976 |
) |
|
2977 |
(MenuItem |
|
2978 |
label: '-' |
|
2979 |
) |
|
2980 |
(MenuItem |
|
2585 | 2981 |
activeHelpKey: fileEditMask |
2792 | 2982 |
enabled: imageIsLoadedHolder |
2585 | 2983 |
label: 'Edit Mask' |
2984 |
itemValue: doEditMask |
|
2985 |
translateLabel: true |
|
2986 |
) |
|
2987 |
(MenuItem |
|
2792 | 2988 |
enabled: imageIsLoadedHolder |
2196 | 2989 |
label: 'Text...' |
2990 |
itemValue: doInsertTextFromUser |
|
2991 |
translateLabel: true |
|
2992 |
) |
|
2812 | 2993 |
(MenuItem |
2994 |
label: '-' |
|
2995 |
) |
|
2996 |
(MenuItem |
|
2814 | 2997 |
label: 'Animation Sequence' |
2812 | 2998 |
translateLabel: true |
2999 |
submenu: |
|
3000 |
(Menu |
|
3001 |
( |
|
3002 |
(MenuItem |
|
3003 |
enabled: imageHasNextImageHolder |
|
3004 |
label: 'Next in Sequence' |
|
3005 |
itemValue: nextImageInSequence |
|
3006 |
translateLabel: true |
|
3007 |
) |
|
3008 |
(MenuItem |
|
3009 |
enabled: imageHasPreviousImageHolder |
|
2813 | 3010 |
label: 'Previous in Sequence' |
2812 | 3011 |
itemValue: previousImageInSequence |
3012 |
translateLabel: true |
|
3013 |
) |
|
3014 |
(MenuItem |
|
3015 |
label: '-' |
|
3016 |
) |
|
3017 |
(MenuItem |
|
3018 |
enabled: imageHasImageSequenceHolder |
|
3019 |
label: 'Edit each from Sequence' |
|
3020 |
itemValue: editEachImageFromSequence |
|
3021 |
translateLabel: true |
|
3022 |
) |
|
3023 |
) |
|
3024 |
nil |
|
3025 |
nil |
|
3026 |
) |
|
3027 |
) |
|
2196 | 3028 |
) |
3029 |
nil |
|
3030 |
nil |
|
3031 |
) |
|
3032 |
! |
|
3033 |
||
3034 |
menuFile |
|
3035 |
"This resource specification was automatically generated |
|
3036 |
by the MenuEditor of ST/X." |
|
3037 |
||
3038 |
"Do not manually edit this!! If it is corrupted, |
|
3039 |
the MenuEditor may not be able to read the specification." |
|
3040 |
||
3022 | 3041 |
|
2196 | 3042 |
" |
3043 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuFile |
|
3044 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuFile)) startUp |
|
3045 |
" |
|
3046 |
||
3047 |
<resource: #menu> |
|
3048 |
||
3049 |
^ |
|
3050 |
#(Menu |
|
3051 |
( |
|
3052 |
(MenuItem |
|
3053 |
activeHelpKey: fileNewImageEditor |
|
3054 |
label: 'New ImageEditor' |
|
3055 |
itemValue: doNewImageEditor |
|
3056 |
) |
|
3057 |
(MenuItem |
|
2876 | 3058 |
label: '-' |
3059 |
) |
|
3060 |
(MenuItem |
|
2196 | 3061 |
activeHelpKey: fileNewImage |
3062 |
label: 'New...' |
|
3063 |
itemValue: doNewImage |
|
3064 |
) |
|
3065 |
(MenuItem |
|
3200 | 3066 |
activeHelpKey: fileNewImageFromClipboard |
2196 | 3067 |
label: 'New from ClipBoard' |
3068 |
itemValue: doNewImageFromClipboard |
|
3069 |
) |
|
3070 |
(MenuItem |
|
3200 | 3071 |
activeHelpKey: fileNewMaskFromClipboard |
3072 |
label: 'Mask from ClipBoard' |
|
3073 |
itemValue: doNewMaskFromClipboard |
|
3074 |
) |
|
3075 |
(MenuItem |
|
2196 | 3076 |
label: '-' |
3077 |
) |
|
3078 |
(MenuItem |
|
3079 |
activeHelpKey: fileLoadFromClass |
|
3080 |
label: 'Load...' |
|
3081 |
itemValue: doLoadFromClass |
|
3374 | 3082 |
isVisible: methodSaveAndLoadMenuItemsVisible |
2196 | 3083 |
) |
3084 |
(MenuItem |
|
3085 |
activeHelpKey: fileLoadFromFile |
|
3086 |
label: 'Load from File...' |
|
3087 |
itemValue: doLoadFromFile |
|
3088 |
) |
|
3089 |
(MenuItem |
|
2796 | 3090 |
activeHelpKey: fileLoadFromURL |
3091 |
label: 'Load from URL...' |
|
3092 |
itemValue: doLoadFromURL |
|
3093 |
) |
|
3094 |
(MenuItem |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3095 |
label: 'Grab' |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3096 |
submenu: |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3097 |
(Menu |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3098 |
( |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3099 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3100 |
activeHelpKey: fileGrabImageFromScreen |
2717 | 3101 |
label: 'Grab from Screen Area...' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3102 |
itemValue: grabScreenImage |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3103 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3104 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3105 |
activeHelpKey: fileGrabImageFromScreen |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3106 |
enabled: hasLastGrabScreenArea |
2711 | 3107 |
label: 'Grab again from same Screen Area' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3108 |
itemValue: grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3109 |
) |
2771 | 3110 |
(MenuItem |
3111 |
label: '-' |
|
3112 |
) |
|
3113 |
(MenuItem |
|
3114 |
activeHelpKey: fileGrabImageFromWindow |
|
3115 |
label: 'Grab from Window...' |
|
3116 |
itemValue: grabWindowImage |
|
3117 |
) |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3118 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3119 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3120 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
3121 |
) |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
3122 |
) |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
3123 |
(MenuItem |
2196 | 3124 |
label: '-' |
3125 |
) |
|
3126 |
(MenuItem |
|
3127 |
activeHelpKey: fileSaveMethod |
|
3128 |
enabled: imageIsLoadedAndClassDefined |
|
3129 |
label: 'Save' |
|
3130 |
itemValue: doSaveMethod |
|
3374 | 3131 |
isVisible: methodSaveAndLoadMenuItemsVisible |
2196 | 3132 |
) |
3133 |
(MenuItem |
|
3134 |
activeHelpKey: fileSaveMethodAs |
|
2792 | 3135 |
enabled: imageIsLoadedHolder |
2196 | 3136 |
label: 'Save As...' |
3137 |
itemValue: doSaveMethodAs |
|
3374 | 3138 |
isVisible: methodSaveAndLoadMenuItemsVisible |
2196 | 3139 |
) |
3140 |
(MenuItem |
|
3141 |
activeHelpKey: fileSaveAs |
|
2792 | 3142 |
enabled: imageIsLoadedHolder |
2196 | 3143 |
label: 'Save to File...' |
3144 |
itemValue: doSaveImageFileAs |
|
3145 |
) |
|
3146 |
(MenuItem |
|
3147 |
activeHelpKey: fileSaveMaskAs |
|
2792 | 3148 |
enabled: imageIsLoadedHolder |
2196 | 3149 |
label: 'Save Mask to File...' |
3150 |
itemValue: doSaveImageMaskFileAs |
|
3151 |
) |
|
3152 |
(MenuItem |
|
3153 |
activeHelpKey: fileSaveButtonImageAs |
|
2792 | 3154 |
enabled: imageIsLoadedHolder |
2196 | 3155 |
label: 'Save as Button to File...' |
3156 |
itemValue: doSaveButtonImageToFileAs |
|
3157 |
) |
|
3158 |
(MenuItem |
|
3159 |
label: '-' |
|
3160 |
) |
|
3161 |
(MenuItem |
|
3162 |
activeHelpKey: filePrint |
|
2792 | 3163 |
enabled: imageIsLoadedHolder |
2196 | 3164 |
label: 'Print' |
3165 |
itemValue: doPrint |
|
3166 |
) |
|
3167 |
(MenuItem |
|
3168 |
label: '-' |
|
3169 |
isVisible: isStandAlone |
|
3170 |
) |
|
3171 |
(MenuItem |
|
3172 |
activeHelpKey: fileBrowseClass |
|
2792 | 3173 |
enabled: hasClassDefinedHolder |
2196 | 3174 |
label: 'Browse Class' |
3175 |
itemValue: doBrowseClass |
|
3176 |
isVisible: isStandAlone |
|
3177 |
) |
|
3178 |
(MenuItem |
|
2792 | 3179 |
enabled: imageIsLoadedHolder |
2196 | 3180 |
label: 'Inspect Image' |
3181 |
itemValue: doInspectImage |
|
3182 |
isVisible: isStandAlone |
|
3183 |
) |
|
3184 |
(MenuItem |
|
2585 | 3185 |
activeHelpKey: fileShowStoreString |
2792 | 3186 |
enabled: imageIsLoadedHolder |
2585 | 3187 |
label: 'Show storeString' |
3188 |
itemValue: doShowStoreString |
|
3022 | 3189 |
) |
3190 |
(MenuItem |
|
3191 |
activeHelpKey: fileShowStoreString |
|
3192 |
enabled: imageIsLoadedHolder |
|
3193 |
label: 'Show Pixel Array Literal String' |
|
3194 |
itemValue: doShowPixelArrayLiteralString |
|
2585 | 3195 |
) |
3196 |
(MenuItem |
|
2196 | 3197 |
label: '-' |
3198 |
isVisible: isStandAlone |
|
3199 |
) |
|
3200 |
(MenuItem |
|
3201 |
activeHelpKey: fileExit |
|
3202 |
label: 'Exit' |
|
3203 |
itemValue: closeRequest |
|
3204 |
isVisible: isStandAlone |
|
3205 |
) |
|
3206 |
) |
|
3207 |
nil |
|
3208 |
nil |
|
3209 |
) |
|
3210 |
! |
|
3211 |
||
679 | 3212 |
menuMouseButtonColors |
737 | 3213 |
"This resource specification was automatically generated |
3214 |
by the MenuEditor of ST/X." |
|
679 | 3215 |
|
737 | 3216 |
"Do not manually edit this!! If it is corrupted, |
3217 |
the MenuEditor may not be able to read the specification." |
|
679 | 3218 |
|
3219 |
" |
|
3220 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
3221 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
3222 |
" |
|
3223 |
||
3224 |
<resource: #menu> |
|
3225 |
||
3226 |
^ |
|
3227 |
||
3228 |
#(#Menu |
|
3229 |
||
3230 |
#( |
|
3231 |
#(#MenuItem |
|
3232 |
#label: 'Left Mouse Button' |
|
3233 |
#nameKey: #leftMouseKeyButton |
|
3234 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 3235 |
#enabled: #imageIsLoadedHolder |
679 | 3236 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 3237 |
#choice: #mouseKeyColorMode |
3238 |
#choiceValue: 1 |
|
679 | 3239 |
) |
3240 |
#(#MenuItem |
|
3241 |
#label: 'Right Mouse Button' |
|
3242 |
#nameKey: #rightMouseKeyButton |
|
3243 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 3244 |
#enabled: #imageIsLoadedHolder |
679 | 3245 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 3246 |
#choice: #mouseKeyColorMode |
3247 |
#choiceValue: 2 |
|
679 | 3248 |
) |
3249 |
) nil |
|
3250 |
nil |
|
3251 |
) |
|
2792 | 3252 |
|
3253 |
"Modified: / 04-07-2010 / 10:17:37 / cg" |
|
679 | 3254 |
! |
3255 |
||
2585 | 3256 |
menuSettings |
3257 |
"This resource specification was automatically generated |
|
3258 |
by the MenuEditor of ST/X." |
|
3259 |
||
3260 |
"Do not manually edit this!! If it is corrupted, |
|
3261 |
the MenuEditor may not be able to read the specification." |
|
3262 |
||
2881 | 3263 |
|
2585 | 3264 |
" |
3265 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuSettings |
|
3266 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuSettings)) startUp |
|
3267 |
" |
|
3268 |
||
3269 |
<resource: #menu> |
|
3270 |
||
3271 |
^ |
|
3272 |
#(Menu |
|
3273 |
( |
|
3274 |
(MenuItem |
|
3275 |
activeHelpKey: settingsGridMagnification |
|
3276 |
label: 'Grid Magnification Limit...' |
|
3277 |
itemValue: doChangeGridMagnification |
|
3278 |
translateLabel: true |
|
3279 |
) |
|
3280 |
(MenuItem |
|
3281 |
label: 'Pen' |
|
3282 |
translateLabel: true |
|
3283 |
submenu: |
|
3284 |
(Menu |
|
3285 |
( |
|
3286 |
(MenuItem |
|
3287 |
label: '1' |
|
3288 |
translateLabel: true |
|
2881 | 3289 |
choice: penWidthHolder |
3290 |
choiceValue: 1 |
|
2585 | 3291 |
) |
3292 |
(MenuItem |
|
3293 |
label: '5' |
|
3294 |
translateLabel: true |
|
2881 | 3295 |
choice: penWidthHolder |
3296 |
choiceValue: 5 |
|
2585 | 3297 |
) |
3298 |
(MenuItem |
|
3299 |
label: '10' |
|
3300 |
translateLabel: true |
|
2881 | 3301 |
choice: penWidthHolder |
3302 |
choiceValue: 10 |
|
2585 | 3303 |
) |
3304 |
) |
|
3305 |
nil |
|
3306 |
nil |
|
3307 |
) |
|
3308 |
) |
|
3309 |
(MenuItem |
|
3310 |
label: 'Spray' |
|
3311 |
translateLabel: true |
|
3312 |
submenu: |
|
3313 |
(Menu |
|
3314 |
( |
|
3315 |
(MenuItem |
|
3316 |
label: '4' |
|
3317 |
translateLabel: true |
|
2881 | 3318 |
choice: spraySpotHolder |
3319 |
choiceValue: 4 |
|
2585 | 3320 |
) |
3321 |
(MenuItem |
|
3322 |
label: '8' |
|
3323 |
translateLabel: true |
|
2881 | 3324 |
choice: spraySpotHolder |
3325 |
choiceValue: 8 |
|
2585 | 3326 |
) |
3327 |
(MenuItem |
|
3328 |
label: '16' |
|
3329 |
translateLabel: true |
|
2881 | 3330 |
choice: spraySpotHolder |
3331 |
choiceValue: 16 |
|
2585 | 3332 |
) |
3333 |
(MenuItem |
|
3334 |
label: '32' |
|
3335 |
translateLabel: true |
|
2881 | 3336 |
choice: spraySpotHolder |
3337 |
choiceValue: 32 |
|
2585 | 3338 |
) |
3339 |
) |
|
3340 |
nil |
|
3341 |
nil |
|
3342 |
) |
|
3343 |
) |
|
3344 |
) |
|
3345 |
nil |
|
3346 |
nil |
|
3347 |
) |
|
3348 |
! |
|
3349 |
||
400 | 3350 |
menuToolbar |
737 | 3351 |
"This resource specification was automatically generated |
3352 |
by the MenuEditor of ST/X." |
|
400 | 3353 |
|
737 | 3354 |
"Do not manually edit this!! If it is corrupted, |
3355 |
the MenuEditor may not be able to read the specification." |
|
400 | 3356 |
|
2876 | 3357 |
|
400 | 3358 |
" |
3359 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
3360 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
3361 |
" |
|
3362 |
||
3363 |
<resource: #menu> |
|
3364 |
||
1196 | 3365 |
^ |
1820 | 3366 |
#(Menu |
3367 |
( |
|
3368 |
(MenuItem |
|
3369 |
activeHelpKey: fileNewImage |
|
3370 |
label: 'newImage' |
|
3371 |
itemValue: doNewImage |
|
3372 |
isButton: true |
|
1883 | 3373 |
labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon) |
1196 | 3374 |
) |
1820 | 3375 |
(MenuItem |
2876 | 3376 |
activeHelpKey: fileGrabImageFromScreen |
3377 |
label: 'grabScreenImage' |
|
3378 |
itemValue: grabScreenImage |
|
3379 |
isButton: true |
|
2877 | 3380 |
labelImage: (ResourceRetriever ToolbarIconLibrary snapshot24x24Icon) |
2876 | 3381 |
) |
3382 |
(MenuItem |
|
1949 | 3383 |
label: '-' |
3384 |
) |
|
3385 |
(MenuItem |
|
1970 | 3386 |
activeHelpKey: fileLoadFromClass |
3387 |
label: 'loadFromClass' |
|
3388 |
itemValue: doLoadFromClass |
|
3389 |
isButton: true |
|
3374 | 3390 |
isVisible: isStandAloneAndMethodSaveAndLoadMenuItemsVisible |
1970 | 3391 |
submenuChannel: menuHistory |
3392 |
labelImage: (ResourceRetriever XPToolbarIconLibrary loadImageFromMethodIcon) |
|
3393 |
keepLinkedMenu: true |
|
3394 |
) |
|
3395 |
(MenuItem |
|
2567 | 3396 |
activeHelpKey: fileSaveMethodAs |
2792 | 3397 |
enabled: imageIsLoadedHolder |
2567 | 3398 |
label: 'fileSaveMethodAs' |
1970 | 3399 |
itemValue: doSaveMethodAs |
3400 |
isButton: true |
|
3374 | 3401 |
isVisible: isStandAloneAndMethodSaveAndLoadMenuItemsVisible |
1970 | 3402 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon) |
3403 |
) |
|
3404 |
(MenuItem |
|
3405 |
activeHelpKey: fileSaveMethod |
|
2792 | 3406 |
enabled: imageIsLoadedHolder |
1970 | 3407 |
label: 'saveAsMethod' |
3408 |
itemValue: doSaveMethod |
|
3409 |
isButton: true |
|
3374 | 3410 |
isVisible: isNotStandAloneAndMethodSaveAndLoadMenuItemsVisible |
2590 | 3411 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodIcon) |
1970 | 3412 |
) |
3413 |
(MenuItem |
|
3414 |
label: '-' |
|
3374 | 3415 |
isVisible: methodSaveAndLoadMenuItemsVisible |
1970 | 3416 |
) |
3417 |
(MenuItem |
|
1820 | 3418 |
activeHelpKey: fileLoadFromFile |
3419 |
label: 'loadFromFile' |
|
3420 |
itemValue: doLoadFromFile |
|
3421 |
isButton: true |
|
1884 | 3422 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon) |
1820 | 3423 |
) |
3424 |
(MenuItem |
|
3425 |
activeHelpKey: fileSaveAs |
|
2792 | 3426 |
enabled: imageIsLoadedHolder |
1820 | 3427 |
label: 'saveAsFile' |
3428 |
itemValue: doSaveImageFileAs |
|
3429 |
isButton: true |
|
1885 | 3430 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon) |
1820 | 3431 |
) |
3432 |
(MenuItem |
|
1949 | 3433 |
label: '-' |
1196 | 3434 |
) |
1820 | 3435 |
(MenuItem |
3436 |
activeHelpKey: editUndo |
|
1987 | 3437 |
enabled: canUndoHolder |
1820 | 3438 |
label: 'Undo' |
3439 |
itemValue: doUndo |
|
3440 |
isButton: true |
|
1883 | 3441 |
labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
1196 | 3442 |
) |
2812 | 3443 |
(MenuItem |
3444 |
label: '-' |
|
3445 |
isVisible: imageHasImageSequenceHolder |
|
3446 |
) |
|
3447 |
(MenuItem |
|
3448 |
activeHelpKey: previousImageInSequence |
|
3449 |
enabled: imageHasPreviousImageHolder |
|
3450 |
label: 'Previous Image' |
|
3451 |
itemValue: previousImageInSequence |
|
3452 |
isVisible: imageHasImageSequenceHolder |
|
3453 |
labelImage: (ResourceRetriever ToolbarIconLibrary leftArrow24x24Icon) |
|
3454 |
) |
|
3455 |
(MenuItem |
|
3456 |
activeHelpKey: nextImageInSequence |
|
3457 |
enabled: imageHasNextImageHolder |
|
3458 |
label: 'Next Image' |
|
3459 |
itemValue: nextImageInSequence |
|
3460 |
isVisible: imageHasImageSequenceHolder |
|
3461 |
labelImage: (ResourceRetriever ToolbarIconLibrary rightArrow24x24Icon) |
|
3462 |
) |
|
1637 | 3463 |
) |
3464 |
nil |
|
3465 |
nil |
|
3466 |
) |
|
3467 |
! |
|
3468 |
||
3469 |
modeMenu |
|
3470 |
"This resource specification was automatically generated |
|
3471 |
by the MenuEditor of ST/X." |
|
3472 |
||
3473 |
"Do not manually edit this!! If it is corrupted, |
|
3474 |
the MenuEditor may not be able to read the specification." |
|
3475 |
||
3476 |
" |
|
3477 |
MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu |
|
3478 |
(Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp |
|
3479 |
" |
|
3480 |
||
3481 |
<resource: #menu> |
|
3482 |
||
3483 |
^ |
|
2592 | 3484 |
#(Menu |
3485 |
( |
|
3486 |
(MenuItem |
|
3487 |
activeHelpKey: drawModePoint |
|
2792 | 3488 |
enabled: imageIsLoadedHolder |
2592 | 3489 |
label: 'Point' |
3490 |
translateLabel: true |
|
3491 |
labelImage: (ResourceRetriever ImageEditor pointIcon 'Point') |
|
3492 |
choice: editMode |
|
3493 |
choiceValue: point |
|
3494 |
) |
|
3495 |
(MenuItem |
|
3496 |
activeHelpKey: drawModePoint |
|
2792 | 3497 |
enabled: imageIsLoadedHolder |
2592 | 3498 |
label: 'Spray' |
3499 |
translateLabel: true |
|
3500 |
labelImage: (ResourceRetriever ImageEditor sprayIcon 'Spray') |
|
3501 |
choice: editMode |
|
3502 |
choiceValue: spray |
|
1196 | 3503 |
) |
2592 | 3504 |
(MenuItem |
3191 | 3505 |
activeHelpKey: drawModeSmooth |
3506 |
enabled: imageIsLoadedHolder |
|
3507 |
label: 'Smooth' |
|
3508 |
translateLabel: true |
|
3509 |
labelImage: (ResourceRetriever ImageEditor smoothIcon 'Smooth') |
|
3510 |
choice: editMode |
|
3511 |
choiceValue: smooth |
|
3512 |
) |
|
3513 |
(MenuItem |
|
2592 | 3514 |
activeHelpKey: drawModeBox |
2792 | 3515 |
enabled: imageIsLoadedHolder |
2592 | 3516 |
label: 'Rect' |
3517 |
translateLabel: true |
|
3518 |
labelImage: (ResourceRetriever ImageEditor rectIcon 'Rect') |
|
3519 |
choice: editMode |
|
3520 |
choiceValue: box |
|
1196 | 3521 |
) |
2592 | 3522 |
(MenuItem |
3523 |
activeHelpKey: drawModeFilledBox |
|
2792 | 3524 |
enabled: imageIsLoadedHolder |
2592 | 3525 |
label: 'Filled Rectangle' |
3526 |
translateLabel: true |
|
3527 |
labelImage: (ResourceRetriever ImageEditor fillRectIcon 'Filled Rectangle') |
|
3528 |
choice: editMode |
|
3529 |
choiceValue: filledBox |
|
1196 | 3530 |
) |
2592 | 3531 |
(MenuItem |
3532 |
activeHelpKey: drawModeBox |
|
2792 | 3533 |
enabled: imageIsLoadedHolder |
2592 | 3534 |
label: 'Circle' |
3535 |
translateLabel: true |
|
3536 |
labelImage: (ResourceRetriever ImageEditor circleIcon 'Circle') |
|
3537 |
choice: editMode |
|
3538 |
choiceValue: circle |
|
1196 | 3539 |
) |
2592 | 3540 |
(MenuItem |
3541 |
activeHelpKey: drawModeFill |
|
2792 | 3542 |
enabled: imageIsLoadedHolder |
2592 | 3543 |
label: 'Fill' |
3544 |
translateLabel: true |
|
3545 |
labelImage: (ResourceRetriever ImageEditor fillIcon 'Fill') |
|
3546 |
choice: editMode |
|
3547 |
choiceValue: fill |
|
1196 | 3548 |
) |
2592 | 3549 |
(MenuItem |
3550 |
activeHelpKey: drawModeCopy |
|
2792 | 3551 |
enabled: imageIsLoadedHolder |
2592 | 3552 |
label: 'Copy' |
3553 |
translateLabel: true |
|
3554 |
labelImage: (ResourceRetriever ImageEditor copyIcon 'Copy') |
|
3555 |
choice: editMode |
|
3556 |
choiceValue: copy |
|
3557 |
) |
|
3558 |
(MenuItem |
|
3559 |
activeHelpKey: drawModePaste |
|
2792 | 3560 |
enabled: imageIsLoadedHolder |
2592 | 3561 |
label: 'Paste' |
3562 |
translateLabel: true |
|
3563 |
labelImage: (ResourceRetriever ImageEditor pasteIcon 'Paste') |
|
3564 |
choice: editMode |
|
3565 |
choiceValue: paste |
|
1196 | 3566 |
) |
2592 | 3567 |
(MenuItem |
3568 |
activeHelpKey: drawModePasteUnder |
|
2792 | 3569 |
enabled: imageIsLoadedHolder |
2592 | 3570 |
label: 'Paste Under' |
3571 |
translateLabel: true |
|
3572 |
labelImage: (ResourceRetriever ImageEditor pasteUnderIcon 'Paste Under') |
|
3573 |
choice: editMode |
|
3574 |
choiceValue: pasteUnder |
|
1196 | 3575 |
) |
2592 | 3576 |
(MenuItem |
3577 |
activeHelpKey: drawModePasteWithMask |
|
2792 | 3578 |
enabled: imageIsLoadedHolder |
2592 | 3579 |
label: 'Paste with Mask' |
3580 |
translateLabel: true |
|
3581 |
labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon 'Paste with Mask') |
|
3582 |
choice: editMode |
|
3583 |
choiceValue: pasteWithMask |
|
1579 | 3584 |
) |
2592 | 3585 |
(MenuItem |
3586 |
activeHelpKey: drawModeSpecial |
|
2792 | 3587 |
enabled: imageIsLoadedHolder |
2592 | 3588 |
label: 'Special' |
3589 |
translateLabel: true |
|
3590 |
labelImage: (ResourceRetriever ImageEditor specialIcon 'Special') |
|
3591 |
choice: editMode |
|
3592 |
choiceValue: specialOperation |
|
1411 | 3593 |
) |
1196 | 3594 |
) |
3595 |
nil |
|
3596 |
nil |
|
400 | 3597 |
) |
2792 | 3598 |
|
3599 |
"Modified: / 04-07-2010 / 10:18:08 / cg" |
|
1558 | 3600 |
! |
3601 |
||
3602 |
previewMenu |
|
3603 |
"This resource specification was automatically generated |
|
3604 |
by the MenuEditor of ST/X." |
|
3605 |
||
3606 |
"Do not manually edit this!! If it is corrupted, |
|
3607 |
the MenuEditor may not be able to read the specification." |
|
3608 |
||
3609 |
" |
|
3610 |
MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu |
|
3611 |
(Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp |
|
3612 |
" |
|
3613 |
||
3614 |
<resource: #menu> |
|
3615 |
||
3616 |
^ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3617 |
#(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3618 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3619 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3620 |
label: 'TileMode' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3621 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3622 |
indication: tileModeHolder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3623 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3624 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3625 |
label: '-' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3626 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3627 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3628 |
label: 'Background Color' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3629 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3630 |
submenu: |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3631 |
(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3632 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3633 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3634 |
label: 'Gray' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3635 |
translateLabel: true |
2792 | 3636 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3637 |
choiceValue: nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3638 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3639 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3640 |
label: 'Black' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3641 |
translateLabel: true |
2792 | 3642 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3643 |
choiceValue: black |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3644 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3645 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3646 |
label: 'White' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3647 |
translateLabel: true |
2792 | 3648 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3649 |
choiceValue: white |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3650 |
) |
1774 | 3651 |
(MenuItem |
3652 |
label: '-' |
|
3653 |
) |
|
3654 |
(MenuItem |
|
3655 |
label: 'Red' |
|
3656 |
translateLabel: true |
|
2792 | 3657 |
choice: previewBackgroundColorHolder |
1774 | 3658 |
choiceValue: red |
3659 |
) |
|
3660 |
(MenuItem |
|
3661 |
label: 'Green' |
|
3662 |
translateLabel: true |
|
2792 | 3663 |
choice: previewBackgroundColorHolder |
1774 | 3664 |
choiceValue: green |
3665 |
) |
|
3666 |
(MenuItem |
|
3667 |
label: 'Blue' |
|
3668 |
translateLabel: true |
|
2792 | 3669 |
choice: previewBackgroundColorHolder |
1774 | 3670 |
choiceValue: blue |
3671 |
) |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3672 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3673 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3674 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3675 |
) |
1558 | 3676 |
) |
3677 |
) |
|
3678 |
nil |
|
3679 |
nil |
|
3680 |
) |
|
2792 | 3681 |
|
3682 |
"Modified: / 04-07-2010 / 10:20:09 / cg" |
|
1637 | 3683 |
! |
3684 |
||
3685 |
toolsMenuToolbar |
|
3686 |
"This resource specification was automatically generated |
|
3687 |
by the MenuEditor of ST/X." |
|
3688 |
||
3689 |
"Do not manually edit this!! If it is corrupted, |
|
3690 |
the MenuEditor may not be able to read the specification." |
|
3691 |
||
2881 | 3692 |
|
1637 | 3693 |
" |
3694 |
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar |
|
3695 |
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp |
|
3696 |
" |
|
3697 |
||
3698 |
<resource: #menu> |
|
3699 |
||
3700 |
^ |
|
2881 | 3701 |
#(Menu |
3702 |
( |
|
3703 |
(MenuItem |
|
3704 |
activeHelpKey: drawModePoint |
|
3705 |
enabled: imageIsLoadedHolder |
|
3706 |
label: 'Point' |
|
3707 |
translateLabel: true |
|
3708 |
isButton: true |
|
3709 |
labelImage: (ResourceRetriever ImageEditor pointIcon) |
|
3710 |
choice: editMode |
|
3711 |
choiceValue: point |
|
1637 | 3712 |
) |
2881 | 3713 |
(MenuItem |
3714 |
activeHelpKey: drawModeSpray |
|
3715 |
enabled: imageIsLoadedHolder |
|
3716 |
label: 'Spray' |
|
3717 |
translateLabel: true |
|
3718 |
isButton: true |
|
3719 |
labelImage: (ResourceRetriever ImageEditor sprayIcon) |
|
3720 |
choice: editMode |
|
3721 |
choiceValue: spray |
|
2375 | 3722 |
) |
2881 | 3723 |
(MenuItem |
3724 |
activeHelpKey: drawModeBox |
|
3725 |
enabled: imageIsLoadedHolder |
|
3726 |
label: 'Rect' |
|
3727 |
translateLabel: true |
|
3728 |
isButton: true |
|
3729 |
labelImage: (ResourceRetriever ImageEditor rectIcon) |
|
3730 |
choice: editMode |
|
3731 |
choiceValue: box |
|
1637 | 3732 |
) |
2881 | 3733 |
(MenuItem |
3734 |
activeHelpKey: drawModeFilledBox |
|
3735 |
enabled: imageIsLoadedHolder |
|
3736 |
label: 'FillRect' |
|
3737 |
translateLabel: true |
|
3738 |
isButton: true |
|
3739 |
labelImage: (ResourceRetriever ImageEditor fillRectIcon) |
|
3740 |
choice: editMode |
|
3741 |
choiceValue: filledBox |
|
1637 | 3742 |
) |
2881 | 3743 |
(MenuItem |
3744 |
activeHelpKey: drawModeCircle |
|
3745 |
enabled: imageIsLoadedHolder |
|
3746 |
label: 'Circle' |
|
3747 |
translateLabel: true |
|
3748 |
isButton: true |
|
3749 |
labelImage: (ResourceRetriever ImageEditor circleIcon) |
|
3750 |
choice: editMode |
|
3751 |
choiceValue: circle |
|
2375 | 3752 |
) |
2881 | 3753 |
(MenuItem |
3754 |
activeHelpKey: drawModeFill |
|
3755 |
enabled: imageIsLoadedHolder |
|
3756 |
label: 'Fill' |
|
3757 |
translateLabel: true |
|
3758 |
isButton: true |
|
3759 |
labelImage: (ResourceRetriever ImageEditor fillIcon) |
|
3760 |
choice: editMode |
|
3761 |
choiceValue: fill |
|
1637 | 3762 |
) |
2881 | 3763 |
(MenuItem |
3764 |
activeHelpKey: drawModeCopy |
|
3765 |
enabled: imageIsLoadedHolder |
|
3766 |
label: 'Copy' |
|
3767 |
translateLabel: true |
|
3768 |
isButton: true |
|
3769 |
labelImage: (ResourceRetriever ImageEditor copyIcon) |
|
3770 |
choice: editMode |
|
3771 |
choiceValue: copy |
|
1637 | 3772 |
) |
2881 | 3773 |
(MenuItem |
3774 |
activeHelpKey: drawModePasteWithMask |
|
3775 |
enabled: imageIsLoadedHolder |
|
3776 |
label: 'Paste With Mask' |
|
3777 |
translateLabel: true |
|
3778 |
isButton: true |
|
3779 |
labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon) |
|
3780 |
choice: editMode |
|
3781 |
choiceValue: pasteWithMask |
|
1637 | 3782 |
) |
2881 | 3783 |
(MenuItem |
3784 |
activeHelpKey: drawModePaste |
|
3785 |
enabled: imageIsLoadedHolder |
|
3786 |
label: 'Paste' |
|
3787 |
translateLabel: true |
|
3788 |
isButton: true |
|
3789 |
labelImage: (ResourceRetriever ImageEditor pasteIcon) |
|
3790 |
choice: editMode |
|
3791 |
choiceValue: paste |
|
1637 | 3792 |
) |
2881 | 3793 |
(MenuItem |
3794 |
activeHelpKey: drawModePasteUnder |
|
3795 |
enabled: imageIsLoadedHolder |
|
3796 |
label: 'Paste Under' |
|
3797 |
translateLabel: true |
|
3798 |
isButton: true |
|
3799 |
labelImage: (ResourceRetriever ImageEditor pasteUnderIcon) |
|
3800 |
choice: editMode |
|
3801 |
choiceValue: pasteUnder |
|
1637 | 3802 |
) |
2881 | 3803 |
(MenuItem |
3804 |
activeHelpKey: drawModeSpecial |
|
3805 |
enabled: imageIsLoadedHolder |
|
3806 |
label: 'Special' |
|
3807 |
translateLabel: true |
|
3808 |
isButton: true |
|
3809 |
labelImage: (ResourceRetriever ImageEditor specialIcon) |
|
3810 |
choice: editMode |
|
3811 |
choiceValue: specialOperation |
|
1637 | 3812 |
) |
3813 |
) |
|
3814 |
nil |
|
3815 |
nil |
|
3816 |
) |
|
400 | 3817 |
! ! |
3818 |
||
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3819 |
!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
|
3820 |
|
1900 | 3821 |
colorTableColumns |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3822 |
"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
|
3823 |
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
|
3824 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3825 |
"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
|
3826 |
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
|
3827 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3828 |
" |
1975 | 3829 |
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
|
3830 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3831 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3832 |
<resource: #tableColumns> |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3833 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3834 |
^#( |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3835 |
(DataSetColumnSpec |
2174 | 3836 |
activeHelpKey: '' |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3837 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3838 |
rendererType: rowSelector |
2712 | 3839 |
backgroundSelector: theColorItself: |
3840 |
selectedBackgroundSelector: theColorItself: |
|
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3841 |
isResizeable: false |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3842 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3843 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3844 |
label: 'R' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3845 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3846 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3847 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3848 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3849 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3850 |
model: redFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3851 |
writeSelector: redAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3852 |
selectSelector: canSelectRedInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3853 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3854 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3855 |
label: 'G' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3856 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3857 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3858 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3859 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3860 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3861 |
model: greenFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3862 |
writeSelector: greenAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3863 |
selectSelector: canSelectGreenInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3864 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3865 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3866 |
label: 'B' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3867 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3868 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3869 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3870 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3871 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3872 |
model: blueFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3873 |
writeSelector: blueAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3874 |
selectSelector: canSelectBlueInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3875 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3876 |
) |
2174 | 3877 |
|
3878 |
"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
|
3879 |
! ! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3880 |
|
400 | 3881 |
!ImageEditor methodsFor:'accessing'! |
3882 |
||
3883 |
image |
|
767 | 3884 |
"returns the current editing image" |
400 | 3885 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3886 |
^ imageEditView image |
400 | 3887 |
! |
3888 |
||
3889 |
postOpenAction: anAction |
|
767 | 3890 |
"sets an action which is evaluated after opening" |
400 | 3891 |
|
3892 |
postOpenAction := anAction |
|
1381 | 3893 |
! |
3894 |
||
3895 |
resourceClass:aClass |
|
3896 |
imageEditView resourceClass:aClass |
|
3375 | 3897 |
! |
3898 |
||
3899 |
savedImage |
|
3900 |
"if user did a save, return what was saved last. |
|
3901 |
Otherwise, this returns nil" |
|
3902 |
||
3903 |
^ savedImage |
|
400 | 3904 |
! ! |
3905 |
||
2767 | 3906 |
!ImageEditor methodsFor:'accessing-behavior'! |
3907 |
||
3908 |
allowedToChangeImageDimensionAndDepth |
|
3909 |
"used to edit an existing image's contents only (Expecco)" |
|
3910 |
||
3911 |
^ allowedToChangeImageDimensionAndDepth ? true |
|
3912 |
! |
|
3913 |
||
3914 |
allowedToChangeImageDimensionAndDepth:aBoolean |
|
3915 |
"used to edit an existing image's contents only (Expecco)" |
|
3916 |
||
3917 |
allowedToChangeImageDimensionAndDepth := aBoolean |
|
3918 |
! ! |
|
3919 |
||
1398 | 3920 |
!ImageEditor methodsFor:'accessing-views'! |
400 | 3921 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3922 |
colorDataSetView |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3923 |
"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
|
3924 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3925 |
^(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
|
3926 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3927 |
"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
|
3928 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3929 |
|
487 | 3930 |
coordLabel |
767 | 3931 |
"returns the view the coord label" |
487 | 3932 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3933 |
^self componentAt: #coordLabel |
487 | 3934 |
! |
3935 |
||
400 | 3936 |
imageEditView |
911 | 3937 |
"returns the view of the image" |
400 | 3938 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3939 |
imageEditView isNil ifTrue:[ |
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3940 |
imageEditView := (self componentAt: #imageEditView) scrolledView. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3941 |
imageEditView addDependent:self. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3942 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3943 |
^ imageEditView |
1345 | 3944 |
|
3945 |
"Modified: / 10.2.2000 / 23:19:20 / cg" |
|
400 | 3946 |
! |
3947 |
||
3948 |
imagePreView |
|
767 | 3949 |
"returns the preview of the image" |
400 | 3950 |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3951 |
|imagePreViewSubViews| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3952 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3953 |
imagePreViewSubViews := (self componentAt: #imagePreView) subViews. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3954 |
|
2043 | 3955 |
"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
|
3956 |
imagePreViewSubViews isEmptyOrNil ifTrue:[ |
2043 | 3957 |
^ nil |
3958 |
]. |
|
3959 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3960 |
^ imagePreViewSubViews first |
475 | 3961 |
! ! |
3962 |
||
400 | 3963 |
!ImageEditor methodsFor:'aspects'! |
3964 |
||
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3965 |
activityInfoHolder |
1987 | 3966 |
^ self infoLabelHolder |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3967 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3968 |
"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
|
3969 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3970 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3971 |
colorColumnAdaptor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3972 |
^ self |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3973 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3974 |
"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
|
3975 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3976 |
|
2792 | 3977 |
hasClassAndSelectorDefinedHolder |
1054 | 3978 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3979 |
|cls| |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3980 |
|
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3981 |
(cls := imageEditView resourceClass) notNil |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3982 |
and:[imageEditView resourceSelector notNil] |
1054 | 3983 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3984 |
|
2792 | 3985 |
"Created: / 04-07-2010 / 10:11:10 / cg" |
3986 |
! |
|
3987 |
||
3988 |
hasClassDefinedHolder |
|
1054 | 3989 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3990 |
imageEditView resourceClass notNil |
1054 | 3991 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3992 |
|
2792 | 3993 |
"Created: / 04-07-2010 / 10:11:47 / cg" |
3994 |
! |
|
3995 |
||
3996 |
hasColorSelectedHolder |
|
3195 | 3997 |
^ [ self selectedColors value notEmptyOrNil "self selectedColorIndexOrNil notNil" ] |
2792 | 3998 |
|
3999 |
"Created: / 04-07-2010 / 10:12:22 / cg" |
|
2651 | 4000 |
! |
4001 |
||
1008 | 4002 |
hasColormap |
2792 | 4003 |
^ self image notNil and:[self image colorMap notNil] |
4004 |
||
4005 |
"Created: / 30-09-1998 / 23:53:55 / cg" |
|
4006 |
"Modified: / 04-07-2010 / 10:13:26 / cg" |
|
1008 | 4007 |
! |
4008 |
||
2651 | 4009 |
hasColormapAndColorSelected |
2792 | 4010 |
^ [ self hasColormapHolder value and:[self hasColorSelectedHolder value]] |
4011 |
||
4012 |
"Modified: / 04-07-2010 / 10:13:13 / cg" |
|
4013 |
! |
|
4014 |
||
3195 | 4015 |
hasColormapAndSingleColorSelected |
4016 |
^ [ self hasColormapHolder value and:[self hasSingleColorSelectedHolder value]] |
|
4017 |
||
4018 |
"Modified: / 04-07-2010 / 10:13:13 / cg" |
|
4019 |
! |
|
4020 |
||
2792 | 4021 |
hasColormapHolder |
4022 |
^ [self hasColormap] |
|
4023 |
||
4024 |
"Created: / 04-07-2010 / 10:13:05 / cg" |
|
4025 |
! |
|
4026 |
||
3195 | 4027 |
hasSingleColorSelectedHolder |
4028 |
^ [ self selectedColors value size == 1 "self selectedColorIndexOrNil notNil" ] |
|
4029 |
||
4030 |
"Created: / 04-07-2010 / 10:12:22 / cg" |
|
4031 |
! |
|
4032 |
||
2812 | 4033 |
imageHasImageSequence |
3080 | 4034 |
|img| |
4035 |
||
4036 |
^ (img := self image) notNil and:[img imageSequence notNil] |
|
2812 | 4037 |
|
4038 |
"Created: / 21-10-2010 / 14:35:45 / cg" |
|
4039 |
! |
|
4040 |
||
4041 |
imageHasImageSequenceHolder |
|
4042 |
|holder| |
|
4043 |
||
4044 |
(holder := builder bindingAt:#imageHasImageSequenceHolder) isNil ifTrue:[ |
|
4045 |
builder aspectAt:#imageHasImageSequenceHolder put:(holder := false asValue). |
|
4046 |
holder value:(self imageHasImageSequence). |
|
4047 |
]. |
|
4048 |
^ holder |
|
4049 |
||
4050 |
"Modified: / 21-10-2010 / 14:36:57 / cg" |
|
4051 |
! |
|
4052 |
||
4053 |
imageHasNextImage |
|
4054 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) < self image imageSequence size ] |
|
4055 |
||
4056 |
"Created: / 21-10-2010 / 14:37:10 / cg" |
|
4057 |
! |
|
4058 |
||
2792 | 4059 |
imageHasNextImageHolder |
2812 | 4060 |
|holder| |
4061 |
||
4062 |
(holder := builder bindingAt:#imageHasNextImageHolder) isNil ifTrue:[ |
|
4063 |
builder aspectAt:#imageHasNextImageHolder put:(holder := false asValue). |
|
4064 |
holder value:(self imageHasNextImage). |
|
4065 |
]. |
|
4066 |
^ holder |
|
4067 |
||
4068 |
"Modified: / 21-10-2010 / 14:37:40 / cg" |
|
4069 |
! |
|
4070 |
||
4071 |
imageHasPreviousImage |
|
4072 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) > 1 ] |
|
4073 |
||
4074 |
"Created: / 21-10-2010 / 14:37:21 / cg" |
|
4075 |
! |
|
4076 |
||
4077 |
imageHasPreviousImageHolder |
|
4078 |
|holder| |
|
4079 |
||
4080 |
(holder := builder bindingAt:#imageHasPreviousImageHolder) isNil ifTrue:[ |
|
4081 |
builder aspectAt:#imageHasPreviousImageHolder put:(holder := false asValue). |
|
4082 |
holder value:(self imageHasPreviousImage). |
|
4083 |
]. |
|
4084 |
^ holder |
|
4085 |
||
4086 |
"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
|
4087 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4088 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4089 |
imageInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4090 |
|holder| |
2792 | 4091 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4092 |
(holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4093 |
builder aspectAt:#imageInfoHolder put:(holder := '' asValue). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4094 |
]. |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4095 |
^ holder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
4096 |
|
2792 | 4097 |
"Modified: / 04-07-2010 / 10:15:14 / cg" |
400 | 4098 |
! |
4099 |
||
2767 | 4100 |
imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
4101 |
"returns whether an image is loaded as value holder" |
|
4102 |
||
4103 |
^ [ |
|
2792 | 4104 |
self imageIsLoadedHolder value |
2767 | 4105 |
and:[ self allowedToChangeImageDimensionAndDepth ] |
4106 |
] |
|
2792 | 4107 |
|
4108 |
"Modified: / 04-07-2010 / 10:15:43 / cg" |
|
2767 | 4109 |
! |
4110 |
||
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4111 |
imageIsLoadedAndClassDefined |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4112 |
"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
|
4113 |
|
2792 | 4114 |
^ [self hasClassAndSelectorDefinedHolder value |
4115 |
and:[self imageIsLoadedHolder value]] |
|
4116 |
||
4117 |
"Created: / 31-07-1998 / 02:04:18 / cg" |
|
4118 |
"Modified: / 04-07-2010 / 10:15:48 / cg" |
|
4119 |
! |
|
4120 |
||
4121 |
imageIsLoadedHolder |
|
4122 |
"returns whether an image is loaded as value holder" |
|
4123 |
||
4124 |
|holder| |
|
4125 |
||
4126 |
(holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
4127 |
builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
4128 |
]. |
|
4129 |
^ holder |
|
4130 |
||
4131 |
"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
|
4132 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4133 |
|
400 | 4134 |
listOfColors |
1896 | 4135 |
"returns the list of colors" |
4136 |
||
4137 |
|list| |
|
4138 |
||
4139 |
(list := builder bindingAt:#listOfColors) isNil ifTrue:[ |
|
4140 |
builder aspectAt:#listOfColors put:(list := List new). |
|
4141 |
list addDependent:self. |
|
400 | 4142 |
]. |
1896 | 4143 |
^ list |
400 | 4144 |
! |
4145 |
||
1987 | 4146 |
magnificationHolder |
4147 |
"returns current magnification of the image as an AspectAdaptor" |
|
4148 |
||
4149 |
|holder| |
|
4150 |
(holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[ |
|
4151 |
builder aspectAt:#valueOfMagnification put:( |
|
4152 |
holder := AspectAdaptor new subject:self; forAspect:#magnification) |
|
4153 |
]. |
|
4154 |
^ holder |
|
4155 |
! |
|
4156 |
||
2881 | 4157 |
penWidthHolder |
4158 |
|holder| |
|
4159 |
||
4160 |
(holder := builder bindingAt:#penWidthHolder) isNil ifTrue:[ |
|
4161 |
builder aspectAt:#penWidthHolder put:(holder := imageEditView penWidth asValue). |
|
4162 |
holder onChangeSend:#penWidthHolderChanged to:self. |
|
4163 |
]. |
|
4164 |
^ holder |
|
4165 |
||
4166 |
"Created: / 15-02-2012 / 22:30:58 / cg" |
|
4167 |
! |
|
4168 |
||
2792 | 4169 |
previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4170 |
|holder| |
2792 | 4171 |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4172 |
(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
|
4173 |
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
|
4174 |
holder addDependent:self. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4175 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4176 |
^ holder |
2792 | 4177 |
|
4178 |
"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
|
4179 |
! |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4180 |
|
3195 | 4181 |
selectedColors |
4182 |
"returns a valueHolder for the current set of selected colors." |
|
4183 |
||
4184 |
|holder| |
|
4185 |
||
4186 |
(holder := builder bindingAt:#selectedColors) isNil ifTrue:[ |
|
4187 |
builder aspectAt:#selectedColors put:(holder := nil asValue). |
|
4188 |
holder onChangeSend:#selectedColorsChanged to:self. |
|
4189 |
]. |
|
4190 |
^ holder |
|
4191 |
! |
|
4192 |
||
400 | 4193 |
selectionOfColor |
1682 | 4194 |
"returns a valueHolder for the current selection of the edit color. |
4195 |
Here, an AspectAdaptor which accesses selectedColorIndex is returned." |
|
400 | 4196 |
|
4197 |
|holder| |
|
1682 | 4198 |
|
400 | 4199 |
(holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[ |
4200 |
builder aspectAt:#selectionOfColor put:( |
|
1682 | 4201 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ). |
400 | 4202 |
]. |
4203 |
^ holder |
|
4204 |
! |
|
4205 |
||
2881 | 4206 |
spraySpotHolder |
4207 |
|holder| |
|
4208 |
||
4209 |
(holder := builder bindingAt:#spraySpotHolder) isNil ifTrue:[ |
|
4210 |
builder aspectAt:#spraySpotHolder put:(holder := imageEditView spraySpot asValue). |
|
4211 |
holder onChangeSend:#spraySpotHolderChanged to:self. |
|
4212 |
]. |
|
4213 |
^ holder |
|
4214 |
||
4215 |
"Created: / 15-02-2012 / 22:36:38 / cg" |
|
4216 |
! |
|
4217 |
||
1558 | 4218 |
tileModeHolder |
4219 |
|holder| |
|
2812 | 4220 |
|
1558 | 4221 |
(holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[ |
4222 |
builder aspectAt:#tileModeHolder put:(holder := false asValue). |
|
4223 |
holder addDependent:self. |
|
4224 |
]. |
|
4225 |
^ holder |
|
2812 | 4226 |
|
4227 |
"Modified: / 21-10-2010 / 14:35:24 / cg" |
|
1558 | 4228 |
! |
4229 |
||
400 | 4230 |
valueOfMagnification |
2308 | 4231 |
<resource: #obsolete> |
767 | 4232 |
"returns current magnification of the image as an AspectAdaptor" |
400 | 4233 |
|
1987 | 4234 |
self obsoleteMethodWarning:'stupid method name - use #magnificationHolder'. |
4235 |
^ self magnificationHolder |
|
400 | 4236 |
! ! |
4237 |
||
767 | 4238 |
!ImageEditor methodsFor:'change & update'! |
4239 |
||
4240 |
findColorMapMode |
|
899 | 4241 |
"finds the colorMapMode for a new image" |
767 | 4242 |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4243 |
|image newListOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors| |
1054 | 4244 |
|
4245 |
image := self image. |
|
1975 | 4246 |
image isNil ifTrue:[^ self ]. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4247 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4248 |
image mask notNil ifTrue: [ |
1896 | 4249 |
colorMapModeKey := 'masked'. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4250 |
] ifFalse:[ |
1896 | 4251 |
colorMapModeKey := 'depth'. |
1054 | 4252 |
]. |
1896 | 4253 |
colorMapModeKey := colorMapModeKey , image depth printString. |
1967 | 4254 |
self colorMapMode setValue:colorMapModeKey. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4255 |
|
3359 | 4256 |
image photometric == #palette ifTrue:[ |
4257 |
image colorMap isNil ifTrue:[ |
|
4258 |
image depth > 16 ifTrue:[ |
|
4259 |
image photometric:#rgb |
|
4260 |
]. |
|
4261 |
]. |
|
4262 |
]. |
|
1928 | 4263 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4264 |
image depth > 12 ifTrue:[ |
2447 | 4265 |
newListOfColors := OrderedCollection new. |
2870 | 4266 |
(image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[ |
1927 | 4267 |
someOrAllUsedColors := image usedColorsMax:10000. |
2054 | 4268 |
someOrAllUsedColors notNil ifTrue:[ |
4269 |
someOrAllUsedColors := someOrAllUsedColors asArray. |
|
4270 |
someOrAllUsedColors sort:self sortBlockForColors. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4271 |
newListOfColors addAll:someOrAllUsedColors. |
2054 | 4272 |
"/ listOfColors add:Color black; add:Color white. |
3317 | 4273 |
]. |
4274 |
image mask notNil ifTrue:[ |
|
4275 |
newListOfColors := (Array with:(Color noColor)),newListOfColors. |
|
4276 |
]. |
|
1904 | 4277 |
] ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4278 |
newListOfColors addAll:(image colorMap). |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4279 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4280 |
] ifFalse:[ |
2447 | 4281 |
newListOfColors := OrderedCollection withAll:(self listOfColors). |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4282 |
newListOfColors isEmpty ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4283 |
self colorMapMode: colorMapMode value. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4284 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4285 |
]. |
3317 | 4286 |
"/ image mask notNil ifTrue:[ |
4287 |
"/ newListOfColors := (Array with:(Color noColor)),newListOfColors. |
|
4288 |
"/ ]. |
|
2054 | 4289 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4290 |
newListOfColors notEmptyOrNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4291 |
drawColor1 := newListOfColors at:1. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4292 |
drawColor2 := newListOfColors at:2 ifAbsent:drawColor1. |
2054 | 4293 |
|
4294 |
self hasMask ifTrue: [ |
|
3367 | 4295 |
(newListOfColors includes:(Color colorId:0)) ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4296 |
newListOfColors addFirst:(Color colorId:0). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4297 |
drawColor1 := newListOfColors at:2. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4298 |
drawColor2 := newListOfColors at:3 ifAbsent:drawColor1. |
2054 | 4299 |
] |
4300 |
]. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4301 |
"/ imageEditView drawingColors:(Array with: drawColor1 with: drawColor2). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4302 |
"/ self selectionOfColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4303 |
"/ setValue: 0; |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4304 |
"/ value: (listOfColors indexOf: imageEditView selectedColor). |
767 | 4305 |
]. |
2447 | 4306 |
self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[ |
4307 |
self listOfColors contents:newListOfColors. |
|
4308 |
]. |
|
2870 | 4309 |
|
3359 | 4310 |
"Modified: / 06-12-2016 / 12:51:36 / cg" |
767 | 4311 |
! |
4312 |
||
3195 | 4313 |
selectedColorsChanged |
4314 |
|colorIndices| |
|
4315 |
||
4316 |
(colorIndices := self selectedColors value) isEmptyOrNil ifTrue:[ |
|
4317 |
self selectionOfColor value:nil |
|
4318 |
] ifFalse:[ |
|
4319 |
colorIndices size == 1 ifTrue:[ |
|
4320 |
"/ as single color selected |
|
4321 |
self selectionOfColor value:colorIndices first |
|
4322 |
] ifFalse:[ |
|
4323 |
"/ multipl selected |
|
4324 |
self selectionOfColor value:nil |
|
4325 |
]. |
|
4326 |
]. |
|
4327 |
! |
|
4328 |
||
942 | 4329 |
update:something with:aParameter from:changedObject |
2042 | 4330 |
|clrIndex img imagePreView clr changedColor| |
1436 | 4331 |
|
4332 |
img := self image. |
|
2042 | 4333 |
imagePreView := self imagePreView. |
1558 | 4334 |
|
4335 |
changedObject == self tileModeHolder ifTrue:[ |
|
2042 | 4336 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4337 |
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
|
4338 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4339 |
invalidate. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4340 |
^ self |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4341 |
]. |
2792 | 4342 |
changedObject == self previewBackgroundColorHolder ifTrue:[ |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4343 |
clr := changedObject value isNil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4344 |
ifTrue:[imageEditView viewBackground] |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4345 |
ifFalse:[Color perform:changedObject value]. |
2042 | 4346 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4347 |
viewBackground:clr; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4348 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4349 |
invalidate. |
1558 | 4350 |
^ self |
4351 |
]. |
|
4352 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4353 |
changedObject == self listOfColors ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4354 |
something == #at: ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4355 |
"/ colormap entry changed at aParameter |
960 | 4356 |
|
4357 |
clrIndex := aParameter. |
|
4358 |
(self hasMask) ifTrue:[ |
|
4359 |
clrIndex := clrIndex - 1. |
|
4360 |
]. |
|
1928 | 4361 |
changedColor := changedObject at:aParameter. |
4362 |
img colorMap notNil ifTrue:[ |
|
4363 |
img colorMap at:clrIndex put:changedColor. |
|
4364 |
self colorMapChanged. |
|
4365 |
] ifFalse:[ |
|
4366 |
drawingColormap notNil ifTrue:[ |
|
4367 |
drawingColormap at:clrIndex put:changedColor. |
|
4368 |
]. |
|
4369 |
]. |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4370 |
^ self |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4371 |
]. |
1896 | 4372 |
^ self |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4373 |
]. |
1124 | 4374 |
|
4375 |
changedObject == imageEditView undoImages ifTrue:[ |
|
1987 | 4376 |
self canUndoHolder value:(changedObject notEmpty). |
1124 | 4377 |
^ self. |
4378 |
]. |
|
4379 |
||
1345 | 4380 |
changedObject == imageEditView ifTrue:[ |
4381 |
something == #imageColors ifTrue:[ |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4382 |
self updateListOfColorsAndColormapMode. |
1345 | 4383 |
^ self. |
4384 |
]. |
|
4385 |
something == #image ifTrue:[ |
|
2812 | 4386 |
self updateAfterImageChange. |
2728 | 4387 |
imagePreView image:img scroll:false. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4388 |
self updateListOfColorsAndColormapMode. |
1558 | 4389 |
self tileModeHolder value ifTrue:[ |
2042 | 4390 |
imagePreView tileMode:true tileOffset:(img extent). |
1558 | 4391 |
]. |
1345 | 4392 |
^ self. |
4393 |
]. |
|
4394 |
something == #subImageIn ifTrue:[ |
|
2042 | 4395 |
imagePreView image ~~ img ifTrue:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4396 |
self error:'internal error' mayProceed:true. |
1406 | 4397 |
]. |
1558 | 4398 |
self tileModeHolder value ifTrue:[ |
2042 | 4399 |
imagePreView invalidate. |
1558 | 4400 |
] ifFalse:[ |
2042 | 4401 |
imagePreView invalidate:aParameter. |
1558 | 4402 |
]. |
1345 | 4403 |
^ self. |
4404 |
]. |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
4405 |
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
|
4406 |
(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
|
4407 |
"/ no color/mask */ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
4408 |
"/ self halt. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
4409 |
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
|
4410 |
] ifFalse:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
4411 |
clrIndex := self listOfColors indexOf:aParameter. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
4412 |
]. |
3195 | 4413 |
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
|
4414 |
^ self. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
4415 |
]. |
1345 | 4416 |
^ self. |
4417 |
]. |
|
4418 |
||
1880 | 4419 |
changedObject == imageEditView modifiedHolder ifTrue:[ |
4420 |
"/ self halt:'to be implemented'. |
|
4421 |
^ self |
|
4422 |
]. |
|
4423 |
||
1345 | 4424 |
changedObject == imageEditView image ifTrue:[ |
2042 | 4425 |
"/ self halt:'to be implemented'. |
2812 | 4426 |
self updateAfterImageChange. |
1345 | 4427 |
^ self. |
4428 |
]. |
|
4429 |
||
942 | 4430 |
super update:something with:aParameter from:changedObject |
4431 |
||
2812 | 4432 |
"Modified: / 21-10-2010 / 14:34:31 / cg" |
4433 |
! |
|
4434 |
||
4435 |
updateAfterImageChange |
|
4436 |
|img| |
|
4437 |
||
4438 |
(img := self image) notNil ifTrue:[ |
|
4439 |
img := img onDevice:device. |
|
4440 |
self updateColorsFromImage:img. |
|
4441 |
self findColorMapMode. |
|
4442 |
self updateLabelsAndHistory. |
|
4443 |
||
4444 |
imageSeqNr isNil ifTrue:[ |
|
4445 |
imageSeqNr := 1 |
|
4446 |
]. |
|
4447 |
self imageHasImageSequenceHolder value:(self imageHasImageSequence). |
|
4448 |
self imageHasNextImageHolder value:(self imageHasNextImage). |
|
4449 |
self imageHasPreviousImageHolder value:(self imageHasPreviousImage). |
|
4450 |
] ifFalse:[ |
|
4451 |
self updateForNoImage |
|
4452 |
] |
|
4453 |
||
4454 |
"Modified: / 21-10-2010 / 14:40:45 / cg" |
|
942 | 4455 |
! |
4456 |
||
1900 | 4457 |
updateColorsFromImage:image |
4458 |
|colors| |
|
4459 |
||
2870 | 4460 |
image depth > 16 ifTrue:[ |
4461 |
self listOfColors contents:#(). |
|
4462 |
^ self. |
|
4463 |
]. |
|
4464 |
||
1904 | 4465 |
colors := image colorMap. |
4466 |
colors isNil ifTrue:[ |
|
1906 | 4467 |
Error handle:[:ex | |
4468 |
colors := OrderedCollection new. |
|
4469 |
] do:[ |
|
4470 |
colors := image usedColors asSet. |
|
2870 | 4471 |
]. |
1900 | 4472 |
]. |
1904 | 4473 |
self listOfColors contents:(colors asOrderedCollection). |
2870 | 4474 |
|
4475 |
"Modified: / 18-01-2012 / 13:57:43 / cg" |
|
1900 | 4476 |
! |
4477 |
||
1054 | 4478 |
updateForNoImage |
767 | 4479 |
"updates channels and view, if image is loaded" |
4480 |
||
2792 | 4481 |
self imageIsLoadedHolder value: false. |
767 | 4482 |
self listOfColors removeAll. |
2812 | 4483 |
self imagePreView image: nil. |
4484 |
self imageHasImageSequenceHolder value:false. |
|
4485 |
||
4486 |
"Modified: / 21-10-2010 / 14:39:13 / cg" |
|
767 | 4487 |
! |
4488 |
||
4489 |
updateLabelsAndHistory |
|
4490 |
"updates labels and history, if something has changed" |
|
4491 |
||
1910 | 4492 |
|image| |
4493 |
||
4494 |
image := self image. |
|
4495 |
||
2792 | 4496 |
self imageIsLoadedHolder value: image notNil. |
1910 | 4497 |
image isNil ifTrue: [^nil]. |
767 | 4498 |
|
4499 |
self updateInfoLabel. |
|
4500 |
||
1975 | 4501 |
imageEditView resourceClass notNil ifTrue:[ |
4502 |
imageEditView resourceSelector notNil ifTrue:[ |
|
4503 |
self addHistoryEntryForClass:imageEditView resourceClass selector:imageEditView resourceSelector. |
|
4504 |
] |
|
4505 |
]. |
|
4506 |
||
4507 |
image fileName notNil ifTrue: [ |
|
4508 |
self addHistoryEntryForFile:image fileName. |
|
4509 |
]. |
|
2792 | 4510 |
|
4511 |
"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
|
4512 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4513 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4514 |
updateListOfColorsAndColormapMode |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4515 |
|selectedColor colorMap image| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4516 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4517 |
selectedColor := self selectedColorOrNil. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4518 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4519 |
image := self image. |
1975 | 4520 |
image isNil ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4521 |
self listOfColors removeAll. |
1975 | 4522 |
] ifFalse:[ |
4523 |
colorMap := image colorMap. |
|
2447 | 4524 |
colorMap notNil ifTrue:[ |
4525 |
(colorMap size <= 4096) ifTrue:[ |
|
4526 |
image mask notNil ifTrue:[ |
|
4527 |
colorMap := (Array with:(Color noColor)),colorMap. |
|
4528 |
]. |
|
4529 |
self listOfColors contents:colorMap. |
|
4530 |
] ifFalse:[ |
|
4531 |
self listOfColors removeAll. |
|
4532 |
colorMap isFixedPalette ifTrue:[ |
|
4533 |
image colorMap:nil. |
|
4534 |
image photometric:#rgb. |
|
4535 |
image samplesPerPixel:3. |
|
4536 |
||
4537 |
image bitsPerSample:(Array |
|
4538 |
with:(colorMap bitsRed) |
|
4539 |
with:(colorMap bitsGreen) |
|
4540 |
with:(colorMap bitsBlue)). |
|
4541 |
]. |
|
4542 |
] |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4543 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4544 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4545 |
self findColorMapMode. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4546 |
selectedColor notNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4547 |
self selectColor:selectedColor. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4548 |
]. |
767 | 4549 |
! ! |
4550 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4551 |
!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
|
4552 |
|
1951 | 4553 |
atColor:anOldColor put:newColor |
1952 | 4554 |
"a color changed to a new color" |
4555 |
||
1930 | 4556 |
|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
|
4557 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4558 |
list := self listOfColors. |
1951 | 4559 |
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
|
4560 |
|
1930 | 4561 |
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
|
4562 |
index ~~ 0 ifTrue:[ |
1928 | 4563 |
oldColor := list at:index. |
4564 |
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
|
4565 |
] ifFalse:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4566 |
self error:'internal error' mayProceed:true. |
1928 | 4567 |
list add:newColor |
4568 |
]. |
|
4569 |
||
4570 |
image := self image. |
|
4571 |
(image colorMap isNil |
|
4572 |
and:[drawingColormap isNil]) ifTrue:[ |
|
4573 |
oldColor notNil ifTrue:[ |
|
4574 |
imageEditView makeUndo. |
|
4575 |
newImage := image copy. |
|
4576 |
newImage |
|
4577 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
4578 |
do:[:x :y :clr | |
|
4579 |
|newClr| |
|
4580 |
||
1951 | 4581 |
newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr]. |
1928 | 4582 |
newImage colorAtX:x y:y put:newClr |
4583 |
]. |
|
4584 |
imageEditView image:newImage. |
|
4585 |
imageEditView setModified. |
|
4586 |
self updateImage. |
|
4587 |
self updateImagePreView. |
|
1930 | 4588 |
|
3195 | 4589 |
self selectedColors value:{oldSel}. |
1930 | 4590 |
imageEditView selectedColorIndex:oldSel. |
4591 |
imageEditView selectedColor:(self listOfColors at:oldSel). |
|
1928 | 4592 |
] |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4593 |
]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4594 |
! |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4595 |
|
942 | 4596 |
blueAtColor:aColor put:newBlue |
4597 |
"helper used to return a new row element, when blue is changed" |
|
4598 |
||
4599 |
|byte| |
|
4600 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4601 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4602 |
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
|
4603 |
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
|
4604 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4605 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4606 |
put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte). |
942 | 4607 |
! |
4608 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4609 |
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
|
4610 |
"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
|
4611 |
|
930 | 4612 |
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
|
4613 |
^ 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
|
4614 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4615 |
"Created: / 26.7.1998 / 12:30:35 / cg" |
930 | 4616 |
"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
|
4617 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4618 |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4619 |
canSelectBlueInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4620 |
^ aColor blueByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4621 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4622 |
"Created: / 7.8.1998 / 22:50:34 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4623 |
"Modified: / 7.8.1998 / 22:52:57 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4624 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4625 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4626 |
canSelectGreenInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4627 |
^ aColor greenByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4628 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4629 |
"Created: / 7.8.1998 / 22:50:22 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4630 |
"Modified: / 7.8.1998 / 22:52:46 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4631 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4632 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4633 |
canSelectRedInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4634 |
^ aColor redByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4635 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4636 |
"Created: / 7.8.1998 / 22:50:00 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4637 |
"Modified: / 7.8.1998 / 22:51:03 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4638 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4639 |
|
942 | 4640 |
greenAtColor:aColor put:newGreen |
4641 |
"helper used to return a new row element, when green is changed" |
|
4642 |
||
4643 |
|byte| |
|
4644 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4645 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4646 |
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
|
4647 |
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
|
4648 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4649 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4650 |
put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)). |
942 | 4651 |
! |
4652 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4653 |
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
|
4654 |
"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
|
4655 |
|
930 | 4656 |
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
|
4657 |
^ 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
|
4658 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4659 |
"Created: / 26.7.1998 / 12:30:29 / cg" |
930 | 4660 |
"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
|
4661 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4662 |
|
942 | 4663 |
redAtColor:aColor put:newRed |
4664 |
"helper used to return a new row element, when red is changed" |
|
4665 |
||
4666 |
|byte| |
|
4667 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4668 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4669 |
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
|
4670 |
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
|
4671 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4672 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4673 |
put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)). |
942 | 4674 |
! |
4675 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4676 |
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
|
4677 |
"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
|
4678 |
|
930 | 4679 |
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
|
4680 |
^ 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
|
4681 |
|
930 | 4682 |
"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
|
4683 |
! |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4684 |
|
2712 | 4685 |
theColorItself:aColor |
4686 |
"an accessor for the table-column" |
|
4687 |
||
1449
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4688 |
^ 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
|
4689 |
! ! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4690 |
|
2663 | 4691 |
!ImageEditor methodsFor:'defaults'! |
4692 |
||
4693 |
aboutIcon |
|
4694 |
^ self class defaultIcon |
|
4695 |
! ! |
|
4696 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4697 |
!ImageEditor methodsFor:'drag & drop'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4698 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4699 |
canDropObjects:aCollectionOfDropObjects in:aWidget |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4700 |
^ (aCollectionOfDropObjects size == 1) |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4701 |
and:[ aCollectionOfDropObjects |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4702 |
contains:[:dropObject | dropObject isFileObject]] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4703 |
! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4704 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4705 |
dropObjects:aCollectionOfDropObjects in:aWidget at:position |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4706 |
|dropObject| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4707 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4708 |
dropObject := aCollectionOfDropObjects first. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4709 |
dropObject isFileObject ifTrue:[ |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4710 |
self loadFromFile:dropObject asFilename. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4711 |
] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4712 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4713 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4714 |
!ImageEditor methodsFor:'event handling'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4715 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4716 |
processEvent:anEvent |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4717 |
"Return true, if I have eaten the event" |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4718 |
|
2945 | 4719 |
<resource: #keyboard (#Paste #Copy )> |
4720 |
||
2841 | 4721 |
|view focusView p transformation| |
4722 |
||
4723 |
view := anEvent view. |
|
4724 |
view notNil ifTrue:[ |
|
4725 |
view == self imagePreView ifTrue:[ |
|
4726 |
((anEvent isButtonPressEvent and:[ anEvent button == 1 ]) |
|
4727 |
or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]]) ifTrue:[ |
|
4728 |
p := anEvent x @ anEvent y. |
|
4729 |
(transformation := view transformation) notNil ifTrue:[ |
|
4730 |
p := transformation applyInverseTo:p. |
|
4731 |
]. |
|
4732 |
self imageEditView scrollToMakeVisible:p. |
|
4733 |
^ true. |
|
2546 | 4734 |
]. |
2841 | 4735 |
]. |
4736 |
||
4737 |
anEvent isKeyPressEvent ifTrue:[ |
|
4738 |
focusView := view windowGroup focusView ? view. |
|
4739 |
(focusView isComponentOf:(builder componentAt:#colorDataSetView)) ifTrue:[ |
|
4740 |
anEvent key == #Paste ifTrue:[ |
|
4741 |
self pasteColorIntoColormap. |
|
4742 |
^ true. |
|
4743 |
]. |
|
4744 |
anEvent key == #Copy ifTrue:[ |
|
4745 |
self copyColorFromColormap. |
|
4746 |
^ true. |
|
4747 |
]. |
|
4748 |
]. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4749 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4750 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4751 |
^ false. |
2841 | 4752 |
|
4753 |
"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
|
4754 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4755 |
|
672 | 4756 |
!ImageEditor methodsFor:'help'! |
4757 |
||
4758 |
defaultInfoLabel |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4759 |
"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
|
4760 |
some widget with a help text." |
672 | 4761 |
|
1966 | 4762 |
|resourceClass resourceSelector| |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4763 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4764 |
resourceClass := imageEditView resourceClass. |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
4765 |
resourceClass notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4766 |
resourceSelector := imageEditView resourceSelector. |
1966 | 4767 |
resourceSelector notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4768 |
^ resourceClass name, ' >> ', resourceSelector |
1966 | 4769 |
]. |
672 | 4770 |
]. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4771 |
^ 'No class and selector defined.' |
674 | 4772 |
! |
4773 |
||
702 | 4774 |
openDocumentation |
767 | 4775 |
"opens the documentation file of the Image Editor" |
674 | 4776 |
|
763 | 4777 |
self openHTMLDocument: 'tools/uipainter/ImageEditor.html' |
4778 |
||
672 | 4779 |
! ! |
4780 |
||
767 | 4781 |
!ImageEditor methodsFor:'loading'! |
4782 |
||
1975 | 4783 |
loadFromClass:aClass andSelector:aSelector |
4784 |
"loads an image from the method specified by class and selector" |
|
4785 |
||
4786 |
self assert:(aClass isNil or:[aClass isClass]). |
|
4787 |
||
2932
7f305ee14e98
changed: #loadFromClass:andSelector:
Claus Gittinger <cg@exept.de>
parents:
2893
diff
changeset
|
4788 |
(aClass isNil or:[aSelector isNil]) ifTrue:[ |
1975 | 4789 |
imageEditView resourceClass:aClass. |
4790 |
imageEditView resourceSelector:aSelector. |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4791 |
imageEditView image:nil. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4792 |
self clearModified. |
1966 | 4793 |
^ self. |
4794 |
]. |
|
4795 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4796 |
"/ (imageEditView resourceClass == aClass |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4797 |
"/ and:[ imageEditView resourceSelector == aSelector ]) ifTrue:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4798 |
"/ imageEditView modified ifFalse:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4799 |
"/ ^ self. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4800 |
"/ ]. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4801 |
"/ ]. |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4802 |
|
1975 | 4803 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[ |
1966 | 4804 |
self updateAfterImageChange. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4805 |
self clearModified. |
1966 | 4806 |
] |
1975 | 4807 |
|
4808 |
"Modified: / 16.3.1999 / 21:44:41 / cg" |
|
1966 | 4809 |
! |
4810 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4811 |
loadFromFile:aFileName |
767 | 4812 |
"loads an image from aFileName and sets up color map list and other info labels" |
4813 |
||
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4814 |
self withCursor:Cursor wait do:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4815 |
(imageEditView loadFromFile: aFileName) notNil ifTrue:[ |
1966 | 4816 |
self updateAfterImageChange |
767 | 4817 |
] |
4818 |
] |
|
960 | 4819 |
|
1057 | 4820 |
"Modified: / 16.3.1999 / 21:44:26 / cg" |
767 | 4821 |
! |
4822 |
||
960 | 4823 |
loadFromImage:anImage |
767 | 4824 |
"loads an image from anImage and sets up color map list and other info labels" |
4825 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4826 |
|img| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4827 |
|
1057 | 4828 |
anImage notNil ifTrue:[ |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4829 |
img := anImage onDevice:device. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4830 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4831 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4832 |
imageEditView image:img. |
1799
e605f0af928a
clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents:
1796
diff
changeset
|
4833 |
imageEditView clearModified. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4834 |
|
1966 | 4835 |
self updateAfterImageChange. |
4836 |
"/ img notNil ifTrue:[ |
|
4837 |
"/ self updateColorsFromImage:img. |
|
4838 |
"/ self findColorMapMode. |
|
4839 |
"/ self updateLabelsAndHistory. |
|
4840 |
"/ ] ifFalse:[ |
|
4841 |
"/ self updateForNoImage |
|
4842 |
"/ ] |
|
960 | 4843 |
|
1057 | 4844 |
"Modified: / 16.3.1999 / 21:43:56 / cg" |
767 | 4845 |
! |
4846 |
||
1975 | 4847 |
loadFromOrPrepareForClass: aClass andSelector: aSelector |
767 | 4848 |
"loads an image by evaluating aMessage; |
4849 |
if no image could extract from aMessage; do set the class and the selector from |
|
4850 |
the aMessage for a saving at the end of editing" |
|
4851 |
||
1975 | 4852 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue: [ |
1900 | 4853 |
self updateColorsFromImage:self image. |
767 | 4854 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4855 |
] ifFalse: [ |
1975 | 4856 |
imageEditView resourceClass: aClass. |
4857 |
imageEditView resourceSelector:aSelector. |
|
767 | 4858 |
]. |
4859 |
self updateLabelsAndHistory. |
|
1057 | 4860 |
|
4861 |
"Modified: / 16.3.1999 / 21:45:07 / cg" |
|
767 | 4862 |
! ! |
4863 |
||
3374 | 4864 |
!ImageEditor methodsFor:'menu item visibility'! |
4865 |
||
4866 |
isNotStandAloneAndMethodSaveAndLoadMenuItemsVisible |
|
4867 |
^ self isNotStandAlone and:[ self methodSaveAndLoadMenuItemsVisible ] |
|
4868 |
! |
|
4869 |
||
4870 |
isStandAloneAndMethodSaveAndLoadMenuItemsVisible |
|
4871 |
^ self isStandAlone and:[ self methodSaveAndLoadMenuItemsVisible ] |
|
4872 |
! |
|
4873 |
||
4874 |
methodSaveAndLoadMenuItemsVisible |
|
4875 |
^ true |
|
4876 |
! |
|
4877 |
||
4878 |
modeMenuVisible |
|
4879 |
^ true |
|
4880 |
! ! |
|
4881 |
||
400 | 4882 |
!ImageEditor methodsFor:'menu modes'! |
4883 |
||
975 | 4884 |
colorMapMode |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4885 |
"returns the colorMapMode" |
400 | 4886 |
|
975 | 4887 |
colorMapMode isNil ifTrue: [colorMapMode := '' asValue]. |
400 | 4888 |
|
975 | 4889 |
^colorMapMode |
400 | 4890 |
! |
4891 |
||
975 | 4892 |
editMode |
4893 |
"returns editMode" |
|
400 | 4894 |
|
1054 | 4895 |
editMode isNil ifTrue: [ |
975 | 4896 |
editMode := #point asValue. |
1329 | 4897 |
editMode onChangeEvaluate:[imageEditView editMode:(editMode value)] |
975 | 4898 |
]. |
4899 |
||
4900 |
^editMode |
|
400 | 4901 |
! |
4902 |
||
975 | 4903 |
mouseKeyColorMode |
4904 |
"returns mouseKeyColorMode" |
|
400 | 4905 |
|
1345 | 4906 |
mouseKeyColorMode isNil ifTrue:[ |
975 | 4907 |
mouseKeyColorMode := 1 asValue. |
1345 | 4908 |
mouseKeyColorMode onChangeEvaluate: [ |
4909 |
imageEditView mouseKeyColorMode:mouseKeyColorMode value. |
|
3195 | 4910 |
self selectedColors value:{ self listOfColors indexOf:imageEditView selectedColor }. |
1345 | 4911 |
] |
956 | 4912 |
]. |
400 | 4913 |
|
975 | 4914 |
^mouseKeyColorMode |
1345 | 4915 |
|
4916 |
"Modified: / 10.2.2000 / 23:16:42 / cg" |
|
400 | 4917 |
! ! |
4918 |
||
1558 | 4919 |
!ImageEditor methodsFor:'private'! |
4920 |
||
1975 | 4921 |
checkModified |
4922 |
imageEditView modified value ifTrue:[ |
|
4923 |
(Dialog |
|
4924 |
confirm:(resources string:'Image was not saved. Proceed anyway ?') |
|
4925 |
yesLabel:(resources string:'Proceed') |
|
4926 |
noLabel:(resources string:'Cancel') |
|
4927 |
initialAnswer:false |
|
4928 |
) ifFalse: [^false]. |
|
4929 |
||
4930 |
imageEditView clearModified. |
|
4931 |
]. |
|
4932 |
^ true |
|
4933 |
||
4934 |
"Modified: / 29.7.1998 / 18:55:24 / cg" |
|
4935 |
! |
|
4936 |
||
3375 | 4937 |
clearModifiedAndRememberSavedImage |
4938 |
"called after a save-to-file/or whereever operation" |
|
4939 |
||
4940 |
self clearModified. |
|
4941 |
savedImage := self image. |
|
4942 |
! |
|
4943 |
||
1960 | 4944 |
pointFromString:aString |
4945 |
|p s x y| |
|
4946 |
||
4947 |
p := Object readFromString:aString onError:nil. |
|
1962 | 4948 |
p isPoint ifTrue:[^ p]. |
1960 | 4949 |
|
4950 |
s := aString readStream. |
|
4951 |
x := Number readFrom:s onError:nil. |
|
4952 |
x notNil ifTrue:[ |
|
4953 |
s skipSeparators. |
|
1962 | 4954 |
[s atEnd not and:[s peek isDigit not]] whileTrue:[s next]. |
1960 | 4955 |
y := Number readFrom:s onError:nil. |
1961 | 4956 |
^ x @ (y ? x) |
1960 | 4957 |
]. |
1962 | 4958 |
^ nil |
1960 | 4959 |
! |
4960 |
||
1939 | 4961 |
sortBlockForColors |
3195 | 4962 |
^ self sortBlockForColorsByHLS. |
4963 |
"/ ^ self sortBlockForColorsByRGB |
|
4964 |
! |
|
4965 |
||
4966 |
sortBlockForColorsByHLS |
|
4967 |
^ [:a :b | |
|
4968 |
|h1 h2 s1 s2 l1 l2| |
|
4969 |
||
4970 |
h1 := a hue ? 0. |
|
4971 |
h2 := b hue ? 0. |
|
4972 |
(h1 between: h2-30 and:h2+30) ifTrue:[ |
|
4973 |
l1 := a light. |
|
4974 |
l2 := b light. |
|
4975 |
l1 = l2 ifTrue:[ |
|
4976 |
a saturation < b saturation |
|
4977 |
] ifFalse:[ |
|
4978 |
l1 < l2 |
|
4979 |
]. |
|
4980 |
"/ s1 := a saturation. |
|
4981 |
"/ s2 := b saturation. |
|
4982 |
"/ s1 = s2 ifTrue:[ |
|
4983 |
"/ a light < b light |
|
4984 |
"/ ] ifFalse:[ |
|
4985 |
"/ s1 < s2 |
|
4986 |
"/ ] |
|
4987 |
] ifFalse:[ |
|
4988 |
h1 < h2 |
|
4989 |
] |
|
4990 |
] |
|
4991 |
! |
|
4992 |
||
4993 |
sortBlockForColorsByRGB |
|
1939 | 4994 |
^ [:a :b | |
4995 |
a redByte == b redByte ifTrue:[ |
|
4996 |
a greenByte == b greenByte ifTrue:[ |
|
4997 |
a blueByte < b blueByte |
|
4998 |
] ifFalse:[ |
|
4999 |
a greenByte < b greenByte |
|
5000 |
] |
|
5001 |
] ifFalse:[ |
|
5002 |
a redByte < b redByte |
|
5003 |
] |
|
5004 |
] |
|
5005 |
! |
|
5006 |
||
1598 | 5007 |
updateImage |
5008 |
|img| |
|
5009 |
||
5010 |
img := imageEditView image. |
|
5011 |
imageEditView image:img. |
|
5012 |
self fetchImageData. |
|
5013 |
! |
|
5014 |
||
1558 | 5015 |
updateImagePreView |
5016 |
self tileModeHolder value ifTrue:[ |
|
5017 |
self imagePreView tileMode:true tileOffset:(self image extent). |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5018 |
]. |
3253 | 5019 |
self imagePreView |
5020 |
setImage:(self image) scroll:false invalidate:false; "/ true. |
|
5021 |
invalidate. |
|
1558 | 5022 |
! ! |
5023 |
||
535 | 5024 |
!ImageEditor methodsFor:'queries'! |
5025 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
5026 |
hasLastGrabScreenArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
5027 |
^ [ lastGrabbedScreenArea notNil ] |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
5028 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
5029 |
|
960 | 5030 |
hasMask |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5031 |
^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask'] |
960 | 5032 |
|
5033 |
"Created: / 18.8.1998 / 17:17:38 / cg" |
|
5034 |
! |
|
5035 |
||
1975 | 5036 |
modified |
5037 |
^ imageEditView modified |
|
5038 |
! |
|
5039 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
5040 |
modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
5041 |
super modified:aBoolean. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
5042 |
imageEditView modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
5043 |
! |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
5044 |
|
535 | 5045 |
preferredExtent |
767 | 5046 |
"returns the preferred extent" |
535 | 5047 |
|
2423
0c5ac1daf0e4
changed #preferredExtent - formating
Stefan Vogel <sv@exept.de>
parents:
2420
diff
changeset
|
5048 |
^ super preferredExtent max: (Screen current width//3)@(Screen current height//3.5) |
535 | 5049 |
! ! |
5050 |
||
400 | 5051 |
!ImageEditor methodsFor:'selection'! |
5052 |
||
5053 |
magnification |
|
767 | 5054 |
"returns the magnification of the image" |
400 | 5055 |
|
911 | 5056 |
self imageEditView isNil ifTrue: [^1]. |
5057 |
^imageEditView magnification x |
|
400 | 5058 |
! |
5059 |
||
5060 |
magnification: aValue |
|
767 | 5061 |
"sets the magnification of the image" |
400 | 5062 |
|
905 | 5063 |
|magnification| |
5064 |
magnification := (aValue ? 1) asPoint. |
|
911 | 5065 |
(magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil]. |
5066 |
imageEditView magnification: magnification |
|
400 | 5067 |
! |
5068 |
||
5069 |
selectedColorIndex |
|
767 | 5070 |
"returns the index of the selected color" |
400 | 5071 |
|
5072 |
^selectedColorIndex |
|
5073 |
! |
|
5074 |
||
5075 |
selectedColorIndex: anIndex |
|
767 | 5076 |
"sets the index of the selected color" |
400 | 5077 |
|
1054 | 5078 |
|clr pixel| |
5079 |
||
5080 |
selectedColorIndex := anIndex. |
|
2447 | 5081 |
anIndex isNil ifTrue:[^ self]. |
1054 | 5082 |
clr := self listOfColors at:anIndex ifAbsent:nil. |
5083 |
clr isNil ifTrue:[^ self]. |
|
5084 |
||
1075 | 5085 |
pixel := anIndex - 1. |
1054 | 5086 |
(self listOfColors at:1) = Color noColor ifTrue:[ |
5087 |
anIndex == 1 ifTrue:[ |
|
5088 |
pixel := nil. "/ mask |
|
5089 |
] ifFalse:[ |
|
1075 | 5090 |
pixel := pixel - 1 |
1054 | 5091 |
] |
5092 |
]. |
|
5093 |
imageEditView selectedColorIndex:pixel. |
|
5094 |
imageEditView selectedColor:clr. |
|
400 | 5095 |
! ! |
5096 |
||
1716 | 5097 |
!ImageEditor methodsFor:'startup & release'! |
400 | 5098 |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
5099 |
closeDownViews |
1644 | 5100 |
builder notNil ifTrue:[ |
5101 |
DefaultRelativeSizes := |
|
5102 |
Array |
|
1998 | 5103 |
with:(builder componentAt:#mainPanel) relativeCorners |
1644 | 5104 |
with:(builder componentAt:#verticalPanel) relativeCorners. |
5105 |
]. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
5106 |
super closeDownViews |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
5107 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
5108 |
|
400 | 5109 |
closeRequest |
2016 | 5110 |
"asks for permission before closing" |
5111 |
||
5112 |
imageEditView checkModified ifTrue:[ |
|
5113 |
super closeRequest |
|
5114 |
] |
|
400 | 5115 |
! |
5116 |
||
1980 | 5117 |
commonPostBuild |
1975 | 5118 |
imageEditView undoImages addDependent:self. |
5119 |
imageEditView imageInfoHolder:(self imageInfoHolder). |
|
5120 |
imageEditView activityInfoHolder:(self activityInfoHolder). |
|
5121 |
||
5122 |
imageEditView clickInfoCallBack:[:button :point | |
|
5123 |
|mouseButtonColorToolBar| |
|
3170 | 5124 |
button <= 2 ifTrue:[ |
5125 |
mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar. |
|
5126 |
(mouseButtonColorToolBar itemAt:button) toggleIndication. |
|
5127 |
mouseButtonColorToolBar do: [:i| i updateIndicators]. |
|
5128 |
]. |
|
1975 | 5129 |
]. |
5130 |
||
5131 |
imageEditView addDependent:self. |
|
5132 |
imageEditView modifiedHolder addDependent:self. |
|
5133 |
||
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
5134 |
DefaultRelativeSizes notNil ifTrue:[ |
1998 | 5135 |
(builder componentAt:#mainPanel) relativeCorners:DefaultRelativeSizes first. |
1980 | 5136 |
(builder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
5137 |
]. |
1995 | 5138 |
|
1996 | 5139 |
"/ using masters infoHolder ? |
5140 |
(builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[ |
|
1998 | 5141 |
(builder componentAt:#mainPanel) layout bottomOffset:0. |
1995 | 5142 |
(builder componentAt:#infoBarSubSpec) beInvisible |
5143 |
] |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
5144 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
5145 |
|
1980 | 5146 |
open |
5147 |
"after opening, sets the masterApplication of the imageEditView to self" |
|
5148 |
||
5149 |
super open. |
|
5150 |
||
5151 |
imageEditView := (self componentAt: #imageEditView) subViews first. |
|
5152 |
! |
|
5153 |
||
400 | 5154 |
postOpenWith:aBuilder |
767 | 5155 |
"after opening, sets the masterApplication of the imageEditView to self; |
5156 |
evaluate the postOpenAction" |
|
400 | 5157 |
|
1921 | 5158 |
postOpenAction value. |
400 | 5159 |
|
1250 | 5160 |
super postOpenWith:aBuilder. |
5161 |
||
5162 |
aBuilder keyboardProcessor menuBar:nil. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
5163 |
self windowGroup addPreEventHook:self. |
400 | 5164 |
! ! |
5165 |
||
1715 | 5166 |
!ImageEditor methodsFor:'user actions-colormap'! |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5167 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5168 |
addColorToColormap |
1682 | 5169 |
self addColorToColormap:(Color black) |
5170 |
! |
|
5171 |
||
5172 |
addColorToColormap:newColor |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
5173 |
|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
|
5174 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5175 |
img := self image. |
1499
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
5176 |
img isNil ifTrue:[ |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
5177 |
self warn:'No Image.'. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
5178 |
^ self |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
5179 |
]. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
5180 |
|
1054 | 5181 |
depth := img depth. |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5182 |
cMap := img colorMap. |
1054 | 5183 |
cMap isNil ifTrue:[ |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
5184 |
drawingColormap isNil ifTrue:[ |
1916 | 5185 |
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
|
5186 |
drawingColormap := OrderedCollection new. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
5187 |
]. |
1682 | 5188 |
drawingColormap add:newColor. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
5189 |
self listOfColors contents:drawingColormap. |
3195 | 5190 |
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
|
5191 |
"/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs. |
1054 | 5192 |
^ self |
5193 |
]. |
|
5194 |
||
1583 | 5195 |
("(depth == 1)" false |
1054 | 5196 |
or:[cMap size == (1 bitShift:depth)]) ifTrue:[ |
5197 |
depth >= 8 ifTrue:[ |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5198 |
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
|
5199 |
^ self |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5200 |
]. |
1916 | 5201 |
(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
|
5202 |
ifFalse:[ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5203 |
^ self |
1057 | 5204 |
]. |
5205 |
||
5206 |
imageEditView makeUndo. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5207 |
img mask notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5208 |
newMode := 'masked' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5209 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5210 |
newMode := 'depth' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5211 |
]. |
1057 | 5212 |
self colorMapMode:newMode. |
5213 |
] ifFalse:[ |
|
5214 |
imageEditView makeUndo. |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5215 |
]. |
1054 | 5216 |
|
5217 |
cMap := cMap asArray. |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
5218 |
listOfColors := self listOfColors. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
5219 |
oldCListSize := listOfColors size. |
1054 | 5220 |
|
1682 | 5221 |
newColorMap := cMap copyWith:newColor. |
1054 | 5222 |
|
5223 |
newImage := img species new |
|
5224 |
width:img width |
|
5225 |
height:img height |
|
5226 |
depth:depth |
|
5227 |
fromArray:img bits. |
|
5228 |
||
5229 |
newImage colorMap:newColorMap. |
|
5230 |
newImage fileName:img fileName. |
|
5231 |
newImage mask:(img mask copy). |
|
5232 |
||
5233 |
(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
|
5234 |
listOfColors contents: newImage colorMap. |
1054 | 5235 |
self findColorMapMode. |
5236 |
"/ 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
|
5237 |
listOfColors size > (oldCListSize + 1) ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
5238 |
listOfColors removeLast |
1054 | 5239 |
]. |
3195 | 5240 |
self selectedColors value:{listOfColors size}. |
1054 | 5241 |
self updateLabelsAndHistory. |
5242 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5243 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5244 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
1057 | 5245 |
"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
|
5246 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5247 |
|
1650 | 5248 |
changeHLS |
5249 |
"interactive Hue/Light/Saturation editing" |
|
5250 |
||
5251 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5252 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
2438 | 5253 |
originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels |
5254 |
anyChange | |
|
1652 | 5255 |
|
1741 | 5256 |
"/ compute the averageColor in the background (while asking user) |
2438 | 5257 |
avgColorHolder := nil asValue. |
5258 |
previewImageHolder := nil asValue. |
|
5259 |
||
1652 | 5260 |
readySema := Semaphore new. |
5261 |
[ |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5262 |
|image| |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5263 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5264 |
image := imageEditView image. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5265 |
originalColormap := image colorMap copy. |
2438 | 5266 |
originalPixels := image bits. |
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5267 |
avgColor := image averageColor. |
2438 | 5268 |
avgColorHolder value:avgColor. |
5269 |
||
5270 |
previewImage := self image magnifiedPreservingRatioTo:100@100. |
|
5271 |
previewImageHolder value: previewImage. |
|
5272 |
originalPreviewColormap := previewImage colorMap copy. |
|
5273 |
originalPreviewPixels := previewImage bits. |
|
5274 |
||
1652 | 5275 |
readySema signal. |
5276 |
] forkAt:7. |
|
1649 | 5277 |
|
5278 |
acceptChannel := TriggerValue new. |
|
5279 |
||
5280 |
firstChange := true. |
|
2438 | 5281 |
anyChange := false. |
1649 | 5282 |
|
1651 | 5283 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
5284 |
Color |
|
5285 |
hue:((clr hue) ? 0 + hShift) |
|
3172 | 5286 |
light:((clr light * lFactor / 100) min:100) |
5287 |
saturation:((clr saturation * sFactor / 100) min:100)]. |
|
1652 | 5288 |
|
1649 | 5289 |
shiftAction := |
5290 |
[ |
|
1650 | 5291 |
|hShift lFactor sFactor| |
5292 |
||
1649 | 5293 |
acceptChannel value:true. |
5294 |
||
5295 |
firstChange ifTrue:[ |
|
5296 |
imageEditView makeUndo. |
|
5297 |
firstChange := false. |
|
2438 | 5298 |
anyChange := true. |
1649 | 5299 |
]. |
1652 | 5300 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
1650 | 5301 |
|
5302 |
hShift := hueShift value. |
|
5303 |
lFactor := lightValue value. |
|
5304 |
sFactor := saturationValue value. |
|
5305 |
||
1652 | 5306 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
5307 |
||
2438 | 5308 |
previewImage |
5309 |
colorMap:originalPreviewColormap copy; |
|
5310 |
bits:originalPreviewPixels copy; |
|
5311 |
release; |
|
5312 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
5313 |
previewImageHolder value:nil; value:previewImage. |
|
5314 |
||
1652 | 5315 |
shiftProcess notNil ifTrue:[ |
5316 |
shiftProcess terminate. |
|
5317 |
shiftProcess waitUntilTerminated. |
|
5318 |
shiftProcess := nil. |
|
5319 |
]. |
|
5320 |
shiftProcess := |
|
5321 |
[ |
|
5322 |
[ |
|
1656 | 5323 |
imageEditView image |
5324 |
colorMap:originalColormap copy; |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5325 |
bits:originalPixels copy; |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5326 |
release; |
1656 | 5327 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
1652 | 5328 |
self updateImage. |
5329 |
self updateInfoLabel. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5330 |
self updateImagePreView. |
1652 | 5331 |
] ensure:[ shiftProcess := nil ]. |
5332 |
] forkAt:7. |
|
1649 | 5333 |
]. |
5334 |
||
5335 |
bindings := IdentityDictionary new. |
|
1650 | 5336 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
1656 | 5337 |
hueShift onChangeEvaluate:shiftAction. |
1650 | 5338 |
|
5339 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
1656 | 5340 |
lightValue onChangeEvaluate:shiftAction. |
1650 | 5341 |
|
5342 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
1656 | 5343 |
saturationValue onChangeEvaluate:shiftAction. |
1650 | 5344 |
|
1649 | 5345 |
bindings at:#acceptChannel put:acceptChannel. |
1652 | 5346 |
bindings at:#hlsColor put:avgColorHolder. |
2438 | 5347 |
bindings at:#previewImageHolder put:previewImageHolder. |
1650 | 5348 |
|
5349 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
1649 | 5350 |
ifFalse:[ |
2438 | 5351 |
anyChange ifTrue:[ |
1649 | 5352 |
imageEditView undo |
5353 |
] |
|
5354 |
]. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5355 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5356 |
(p := shiftProcess) notNil ifTrue:[ |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5357 |
p waitUntilTerminated. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5358 |
]. |
2438 | 5359 |
|
5360 |
anyChange ifTrue:[ |
|
5361 |
self updateImage. |
|
5362 |
self updateImagePreView. |
|
5363 |
]. |
|
1649 | 5364 |
! |
5365 |
||
3195 | 5366 |
changeHLSOfColors:colorsToShift |
5367 |
"interactive Hue/Light/Saturation editing" |
|
5368 |
||
5369 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
5370 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
|
5371 |
originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels |
|
5372 |
anyChange | |
|
5373 |
||
5374 |
"/ compute the averageColor in the background (while asking user) |
|
5375 |
avgColorHolder := nil asValue. |
|
5376 |
previewImageHolder := nil asValue. |
|
5377 |
||
5378 |
readySema := Semaphore new. |
|
5379 |
[ |
|
5380 |
|image red green blue| |
|
5381 |
||
5382 |
image := imageEditView image. |
|
5383 |
originalColormap := image colorMap copy. |
|
5384 |
originalPixels := image bits. |
|
5385 |
red := (colorsToShift collect:[:clr | clr red]) average. |
|
5386 |
green := (colorsToShift collect:[:clr | clr green]) average. |
|
5387 |
blue := (colorsToShift collect:[:clr | clr blue]) average. |
|
5388 |
avgColor := Color red:red green:green blue:blue. |
|
5389 |
avgColorHolder value:avgColor. |
|
5390 |
||
5391 |
previewImage := self image magnifiedPreservingRatioTo:100@100. |
|
5392 |
previewImageHolder value: previewImage. |
|
5393 |
originalPreviewColormap := previewImage colorMap copy. |
|
5394 |
originalPreviewPixels := previewImage bits. |
|
5395 |
||
5396 |
readySema signal. |
|
5397 |
] forkAt:7. |
|
5398 |
||
5399 |
acceptChannel := TriggerValue new. |
|
5400 |
||
5401 |
firstChange := true. |
|
5402 |
anyChange := false. |
|
5403 |
||
5404 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
|
5405 |
Color |
|
5406 |
hue:((clr hue) ? 0 + hShift) |
|
5407 |
light:((clr light * lFactor / 100) min:100) |
|
5408 |
saturation:((clr saturation * sFactor / 100) min:100)]. |
|
5409 |
||
5410 |
shiftAction := |
|
5411 |
[ |
|
5412 |
|hShift lFactor sFactor| |
|
5413 |
||
5414 |
acceptChannel value:true. |
|
5415 |
||
5416 |
firstChange ifTrue:[ |
|
5417 |
imageEditView makeUndo. |
|
5418 |
firstChange := false. |
|
5419 |
anyChange := true. |
|
5420 |
]. |
|
5421 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
|
5422 |
||
5423 |
hShift := hueShift value. |
|
5424 |
lFactor := lightValue value. |
|
5425 |
sFactor := saturationValue value. |
|
5426 |
||
5427 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
|
5428 |
||
5429 |
previewImage |
|
5430 |
colorMap:originalPreviewColormap copy; |
|
5431 |
bits:originalPreviewPixels copy; |
|
5432 |
release; |
|
5433 |
colorMapProcessing:[:clr | |
|
5434 |
(colorsToShift includes:clr) ifTrue:[ |
|
5435 |
shiftedColor value:clr value:hShift value:lFactor value:sFactor. |
|
5436 |
] ifFalse:[ |
|
5437 |
clr |
|
5438 |
] |
|
5439 |
]. |
|
5440 |
previewImageHolder value:nil; value:previewImage. |
|
5441 |
||
5442 |
shiftProcess notNil ifTrue:[ |
|
5443 |
shiftProcess terminate. |
|
5444 |
shiftProcess waitUntilTerminated. |
|
5445 |
shiftProcess := nil. |
|
5446 |
]. |
|
5447 |
||
5448 |
shiftProcess := |
|
5449 |
[ |
|
5450 |
[ |
|
5451 |
imageEditView image |
|
5452 |
colorMap:originalColormap copy; |
|
5453 |
bits:originalPixels copy; |
|
5454 |
release; |
|
5455 |
colorMapProcessing:[:clr | |
|
5456 |
(colorsToShift includes:clr) ifTrue:[ |
|
5457 |
shiftedColor value:clr value:hShift value:lFactor value:sFactor. |
|
5458 |
] ifFalse:[ |
|
5459 |
clr |
|
5460 |
] |
|
5461 |
]. |
|
5462 |
self updateImage. |
|
5463 |
self updateInfoLabel. |
|
5464 |
self updateImagePreView. |
|
5465 |
] ensure:[ shiftProcess := nil ]. |
|
5466 |
] forkAt:7. |
|
5467 |
]. |
|
5468 |
||
5469 |
bindings := IdentityDictionary new. |
|
5470 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
|
5471 |
hueShift onChangeEvaluate:shiftAction. |
|
5472 |
||
5473 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
5474 |
lightValue onChangeEvaluate:shiftAction. |
|
5475 |
||
5476 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
5477 |
saturationValue onChangeEvaluate:shiftAction. |
|
5478 |
||
5479 |
bindings at:#acceptChannel put:acceptChannel. |
|
5480 |
bindings at:#hlsColor put:avgColorHolder. |
|
5481 |
bindings at:#previewImageHolder put:previewImageHolder. |
|
5482 |
||
5483 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
5484 |
ifFalse:[ |
|
5485 |
anyChange ifTrue:[ |
|
5486 |
imageEditView undo |
|
5487 |
] |
|
5488 |
]. |
|
5489 |
||
5490 |
(p := shiftProcess) notNil ifTrue:[ |
|
5491 |
p waitUntilTerminated. |
|
5492 |
]. |
|
5493 |
||
5494 |
anyChange ifTrue:[ |
|
5495 |
self updateImage. |
|
5496 |
self updateImagePreView. |
|
5497 |
]. |
|
5498 |
! |
|
5499 |
||
2652 | 5500 |
clearColormapEntry0AndMaskedPixels |
5501 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
5502 |
0 and then clear all masked pixels (to pixelValue 0). |
|
5503 |
This is required for windows icons to be really transparent" |
|
5504 |
||
5505 |
|index colorMap| |
|
5506 |
||
5507 |
self compressColorMap. |
|
5508 |
colorMap := self image colorMap. |
|
5509 |
(colorMap includes:(Color black)) ifFalse:[ |
|
5510 |
self addColorToColormap:(Color black). |
|
5511 |
colorMap := self image colorMap. |
|
5512 |
]. |
|
5513 |
index := colorMap indexOf:(Color black). |
|
5514 |
index == 1 ifFalse:[ |
|
5515 |
self sortColorMap. |
|
5516 |
colorMap := self image colorMap. |
|
5517 |
]. |
|
5518 |
self clearMaskedPixels |
|
5519 |
! |
|
5520 |
||
1403 | 5521 |
clearMaskedPixels |
5522 |
"clear all masked pixels (to pixelValue 0)" |
|
5523 |
||
2652 | 5524 |
|newImage| |
5525 |
||
5526 |
newImage := self image clearMaskedPixels. |
|
5527 |
0 to:newImage height - 1 do:[:y | |
|
5528 |
0 to:newImage width - 1 do:[:x | |
|
5529 |
(newImage maskAtX:x y:y) == 0 ifTrue:[ |
|
5530 |
newImage pixelAtX:x y:y put:0 |
|
1460 | 5531 |
] |
1403 | 5532 |
] |
2652 | 5533 |
]. |
5534 |
||
5535 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5536 |
self fetchImageData. |
|
1403 | 5537 |
] |
5538 |
! |
|
5539 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5540 |
colorMapChanged |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5541 |
|img| |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5542 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5543 |
img := self image. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5544 |
img release. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
5545 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
5546 |
self imageEditView invalidate. |
960 | 5547 |
self imagePreView invalidate. |
5548 |
||
5549 |
"/ (imageEditView image:img) notNil ifTrue:[ |
|
5550 |
"/ self updateLabelsAndHistory. |
|
5551 |
"/ self imagePreView image:img |
|
5552 |
"/ ] |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5553 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5554 |
"Created: / 7.8.1998 / 22:26:10 / cg" |
960 | 5555 |
"Modified: / 18.8.1998 / 17:08:55 / cg" |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5556 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5557 |
|
975 | 5558 |
colorMapMode:aMode |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5559 |
"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
|
5560 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5561 |
|depth numColors newColorMap newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5562 |
oldImage image newColors realColorMap oldFileName |
1008 | 5563 |
usedColors useNearest usageCounts tmpBits tmpMap quest |
5564 |
prevMode maskThreshold maskImage| |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5565 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5566 |
self withExecuteCursorDo:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5567 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5568 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5569 |
prevMode := colorMapMode value. |
1008 | 5570 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5571 |
newColorMap := self class listOfColorMaps at:aMode. |
3230 | 5572 |
(aMode == #depth32 or:[aMode == #masked32]) ifTrue:[ |
2572 | 5573 |
depth := 32. |
5574 |
] ifFalse:[ |
|
3230 | 5575 |
(aMode == #depth24 or:[aMode == #masked24]) ifTrue:[ |
5576 |
depth := 24. |
|
5577 |
] ifFalse:[ |
|
3370 | 5578 |
(aMode == #depth16 or:[aMode == #masked16]) ifTrue:[ |
5579 |
depth := 16. |
|
5580 |
] ifFalse:[ |
|
5581 |
depth := (newColorMap size log:2) asInteger. |
|
5582 |
]. |
|
3230 | 5583 |
]. |
2572 | 5584 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5585 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5586 |
useNearest := false. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5587 |
depth == 1 ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5588 |
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
|
5589 |
] ifFalse:[ |
1008 | 5590 |
prevMode isNil ifTrue:[ |
5591 |
quest := 'Compute colormap (or use standard)' |
|
5592 |
] ifFalse:[ |
|
5593 |
quest := 'Keep colormap (or use standard)' |
|
5594 |
] |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5595 |
]. |
1008 | 5596 |
((prevMode = aMode) |
1057 | 5597 |
or:[depth > oldImage depth |
5598 |
or:[self confirm:(resources string:quest)]]) ifTrue:[ |
|
1937 | 5599 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 5600 |
|
5601 |
"/ keep the colormap |
|
3355 | 5602 |
"/ newColorMap atAllPut:Color black. |
1935 | 5603 |
depth > oldImage depth ifTrue:[ |
5604 |
"/ easy - simply copy the part |
|
5605 |
numColors := 1 bitShift:oldImage depth. |
|
5606 |
0 to:numColors-1 do:[:pixel | |
|
5607 |
newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel) |
|
1008 | 5608 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5609 |
] ifFalse:[ |
1935 | 5610 |
"/ see if all used color fit the new colormap |
5611 |
usedColors := oldImage usedColorsMax:(1 bitShift:depth). |
|
5612 |
(usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[ |
|
5613 |
usedColors := oldImage realUsedColors |
|
5614 |
]. |
|
5615 |
(usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[ |
|
5616 |
"/ yea - just install them |
|
5617 |
usedColors asArray keysAndValuesDo:[:idx :clr | |
|
5618 |
newColorMap at:idx put:clr |
|
5619 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5620 |
] ifFalse:[ |
1935 | 5621 |
"/ copy over those that are most often used. |
5622 |
oldImage depth < 8 ifTrue:[ |
|
5623 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
5624 |
oldImage bits |
|
5625 |
expandPixels:(oldImage depth) |
|
5626 |
width:oldImage width |
|
5627 |
height:oldImage height |
|
5628 |
into:tmpBits |
|
5629 |
mapping:nil. |
|
986 | 5630 |
] ifFalse:[ |
1935 | 5631 |
oldImage depth == 8 ifTrue:[ |
5632 |
tmpBits := oldImage bits |
|
5633 |
] ifFalse:[ |
|
5634 |
colorMapMode value:prevMode. |
|
5635 |
self findColorMapMode. |
|
5636 |
self warn:('Too many used colors in image (', oldImage usedColors size printString , ').'). |
|
5637 |
^ self |
|
5638 |
"/ (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs)) |
|
5639 |
"/ ifFalse:[. |
|
5640 |
"/ ^ self |
|
5641 |
"/ ]. |
|
5642 |
"/ self image: (Image newForDepth:depth) fromImage:oldImage. |
|
5643 |
"/ ^ self. |
|
5644 |
] |
|
5645 |
]. |
|
5646 |
usageCounts := tmpBits usageCounts. |
|
5647 |
tmpMap := Array new:usageCounts size. |
|
5648 |
oldImage colorMap asArray keysAndValuesDo:[:i :clr | |
|
5649 |
tmpMap at:i put:clr |
|
5650 |
]. |
|
5651 |
usageCounts sort:[:a :b | a > b] with:tmpMap. |
|
5652 |
||
5653 |
1 to:(1 bitShift:depth) do:[:idx | |
|
5654 |
newColorMap at:idx put:(tmpMap at:idx) |
|
5655 |
]. |
|
5656 |
||
5657 |
useNearest := Dialog |
|
5658 |
confirmWithCancel:(resources |
|
5659 |
stringWithCRs:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?' |
|
5660 |
with:usedColors size |
|
5661 |
with:(1 bitShift:depth)) |
|
5662 |
labels:(resources array:#('Cancel' 'First' 'Nearest')). |
|
5663 |
useNearest isNil ifTrue:[ |
|
1124 | 5664 |
colorMapMode value:prevMode. |
1935 | 5665 |
^ self "/ cancel |
5666 |
]. |
|
5667 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5668 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5669 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5670 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5671 |
"/ standard colormap |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5672 |
usedColors := oldImage usedColors. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5673 |
(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
|
5674 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5675 |
confirmWithCancel:(resources |
1916 | 5676 |
stringWithCRs:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?' |
5677 |
) |
|
1542 | 5678 |
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
|
5679 |
useNearest isNil ifTrue:[ |
1542 | 5680 |
colorMapMode value:prevMode. |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5681 |
^ self "/ cancel |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5682 |
]. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5683 |
]. |
3356 | 5684 |
newColorMap := oldImage colorMap. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5685 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5686 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5687 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5688 |
|
2260 | 5689 |
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
|
5690 |
newImage depth:depth. |
3230 | 5691 |
depth >= 16 ifTrue:[ |
5692 |
depth == 32 ifTrue:[ |
|
5693 |
newImage colorMap:nil. |
|
5694 |
newImage samplesPerPixel:4. |
|
5695 |
newImage photometric:#rgba. |
|
5696 |
] ifFalse:[ |
|
5697 |
newImage colorMap:nil. |
|
5698 |
newImage samplesPerPixel:3. |
|
5699 |
newImage photometric:#rgb. |
|
5700 |
]. |
|
5701 |
]. |
|
3125
9d5624af77ab
Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents:
3122
diff
changeset
|
5702 |
"/ newImage photometric:oldImage photometric. |
2260 | 5703 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5704 |
oldFileName := oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5705 |
|
1008 | 5706 |
Image imageErrorSignal handle:[:ex| |
3227 | 5707 |
"/ arrive here only if not all colors can be represented; |
5708 |
"/ then do a more expensive nearest color search |
|
1008 | 5709 |
Color colorErrorSignal handle:[:ex| |
1542 | 5710 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5711 |
imageEditView undo. |
1008 | 5712 |
^ self warn:(resources string:'Conversion failed !!') |
5713 |
] do:[ |
|
1393 | 5714 |
newImage := Image newForDepth:depth. |
3103 | 5715 |
newImage |
5716 |
width:oldImage width height:oldImage height depth:depth; |
|
5717 |
colorMap:newColorMap; |
|
5718 |
photometric:#palette; |
|
5719 |
bits:(ByteArray new:(newImage bytesPerRow * newImage height)); |
|
5720 |
mask:oldImage mask. |
|
2260 | 5721 |
|
3227 | 5722 |
oldImage |
5723 |
colorsFromX:0 y:0 |
|
5724 |
toX:(oldImage width-1) y:(oldImage height-1) |
|
5725 |
do:[:x :y :clr | |
|
5726 |
|newColor| |
|
5727 |
||
5728 |
(newColorMap includes:clr) |
|
5729 |
ifTrue: [newColor := clr] |
|
5730 |
ifFalse: [ |
|
5731 |
newColor := clr nearestIn:newColorMap. |
|
5732 |
useNearest ifFalse:[ |
|
5733 |
(newColor deltaFrom:clr) > 0.5 ifTrue:[ |
|
5734 |
newColor := oldImage colorFromValue:0 |
|
5735 |
] |
|
1008 | 5736 |
] |
3227 | 5737 |
]. |
5738 |
newImage colorAtX:x y:y put:newColor. |
|
5739 |
]. |
|
5740 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5741 |
image := newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5742 |
]. |
1008 | 5743 |
] do:[ |
3356 | 5744 |
image := newImage |
5745 |
fromImage:oldImage |
|
3370 | 5746 |
photometric:((newColorMap notNil and:[newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]]) |
3356 | 5747 |
ifTrue:[#palette] |
5748 |
ifFalse:[nil]). |
|
5749 |
"/ -- 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
|
5750 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5751 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5752 |
(aMode asString startsWith:'mask') ifTrue:[ |
1008 | 5753 |
image mask isNil ifTrue:[ |
1949 | 5754 |
false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
1008 | 5755 |
maskThreshold := 0.1. |
5756 |
maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
|
5757 |
] ifFalse:[ |
|
3122 | 5758 |
maskImage := ImageMask extent:image extent. |
1770 | 5759 |
maskImage bits:(ByteArray |
1008 | 5760 |
new:(maskImage bytesPerRow * maskImage height) |
5761 |
withAll:16rFF). |
|
5762 |
||
5763 |
"/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
|
5764 |
]. |
|
5765 |
image mask:maskImage. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5766 |
]. |
1008 | 5767 |
] ifFalse:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5768 |
image mask: nil. |
3317 | 5769 |
oldImage mask notNil ifTrue:[ |
5770 |
newImage depth == 32 ifTrue:[ |
|
5771 |
newImage computeAlphaValuesFromMask:oldImage mask |
|
5772 |
]. |
|
5773 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5774 |
]. |
1935 | 5775 |
|
1937 | 5776 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 5777 |
realColorMap := OrderedCollection new. |
5778 |
image realColorMap do:[:clr| |
|
5779 |
(realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
|
5780 |
]. |
|
5781 |
newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
|
5782 |
newColorMap do:[:clr| |
|
5783 |
((newColors size < newColorMap size) and: [(newColors includes: clr) not]) |
|
5784 |
ifTrue:[ |
|
5785 |
newColors add: clr |
|
5786 |
] |
|
5787 |
]. |
|
5788 |
image colorMap: newColors. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5789 |
]. |
1446 | 5790 |
image fileName: oldFileName. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5791 |
|
1054 | 5792 |
(imageEditView image: image) notNil ifTrue:[ |
1446 | 5793 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5794 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5795 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5796 |
|
3356 | 5797 |
"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
|
5798 |
! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5799 |
|
2192 | 5800 |
colorize |
5801 |
"interactive Hue editing" |
|
5802 |
||
5803 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
5804 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
|
5805 |
originalPixels p| |
|
5806 |
||
5807 |
"/ compute the averageColor in the background (while asking user) |
|
5808 |
readySema := Semaphore new. |
|
5809 |
[ |
|
5810 |
|image| |
|
5811 |
||
5812 |
image := imageEditView image. |
|
5813 |
originalColormap := image colorMap copy. |
|
5814 |
avgColor := image averageColor. |
|
5815 |
originalPixels := image bits. |
|
5816 |
readySema signal. |
|
5817 |
] forkAt:7. |
|
5818 |
||
5819 |
acceptChannel := TriggerValue new. |
|
5820 |
avgColorHolder := avgColor asValue. |
|
5821 |
||
5822 |
firstChange := true. |
|
5823 |
||
5824 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
|
5825 |
Color |
|
5826 |
hue:((clr hue) ? 0 + hShift) |
|
3173 | 5827 |
light:((clr light * lFactor / 100) min:100) |
5828 |
saturation:(((clr saturation max:20) * sFactor / 100) min:100)]. |
|
2192 | 5829 |
|
5830 |
||
5831 |
shiftAction := |
|
5832 |
[ |
|
5833 |
|hShift lFactor sFactor| |
|
5834 |
||
5835 |
acceptChannel value:true. |
|
5836 |
||
5837 |
firstChange ifTrue:[ |
|
5838 |
imageEditView makeUndo. |
|
5839 |
firstChange := false. |
|
5840 |
]. |
|
5841 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
|
5842 |
||
5843 |
hShift := hueShift value. |
|
5844 |
lFactor := lightValue value. |
|
5845 |
sFactor := saturationValue value. |
|
5846 |
||
5847 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
|
5848 |
||
5849 |
shiftProcess notNil ifTrue:[ |
|
5850 |
shiftProcess terminate. |
|
5851 |
shiftProcess waitUntilTerminated. |
|
5852 |
shiftProcess := nil. |
|
5853 |
]. |
|
5854 |
shiftProcess := |
|
5855 |
[ |
|
5856 |
[ |
|
5857 |
imageEditView image |
|
5858 |
colorMap:originalColormap copy; |
|
5859 |
bits:originalPixels copy; |
|
5860 |
release; |
|
5861 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
5862 |
self updateImage. |
|
5863 |
self updateInfoLabel. |
|
5864 |
self updateImagePreView. |
|
5865 |
] ensure:[ shiftProcess := nil ]. |
|
5866 |
] forkAt:7. |
|
5867 |
]. |
|
5868 |
||
5869 |
bindings := IdentityDictionary new. |
|
5870 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
|
5871 |
hueShift onChangeEvaluate:shiftAction. |
|
5872 |
||
5873 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
5874 |
lightValue onChangeEvaluate:shiftAction. |
|
5875 |
||
5876 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
5877 |
saturationValue onChangeEvaluate:shiftAction. |
|
5878 |
||
5879 |
bindings at:#acceptChannel put:acceptChannel. |
|
5880 |
bindings at:#hlsColor put:avgColorHolder. |
|
5881 |
||
5882 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
5883 |
ifFalse:[ |
|
5884 |
firstChange ~~ true ifTrue:[ |
|
5885 |
imageEditView undo |
|
5886 |
] |
|
5887 |
]. |
|
5888 |
||
5889 |
(p := shiftProcess) notNil ifTrue:[ |
|
5890 |
p waitUntilTerminated. |
|
5891 |
]. |
|
5892 |
self updateImage. |
|
5893 |
self updateImagePreView. |
|
5894 |
||
5895 |
"Created: / 01-11-2007 / 23:27:37 / cg" |
|
5896 |
! |
|
5897 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5898 |
compressColorMap |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5899 |
"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
|
5900 |
|
2893 | 5901 |
|newImage| |
5902 |
||
5903 |
newImage := self image. |
|
5904 |
newImage compressColorMap. |
|
2652 | 5905 |
|
5906 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5907 |
self fetchImageData. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5908 |
] |
1008 | 5909 |
! |
5910 |
||
1852 | 5911 |
copyColorFromColormap |
1871 | 5912 |
imageEditView setClipboardObject:(self selectedColorOrNil) |
1852 | 5913 |
! |
5914 |
||
2054 | 5915 |
ditherToDepth |
5916 |
|depth| |
|
5917 |
||
5918 |
depth := Dialog request:'New depth ?'. |
|
5919 |
depth isEmptyOrNil ifTrue:[^ self]. |
|
5920 |
depth := Number readFrom:depth onError:nil. |
|
5921 |
depth isNil ifTrue:[^ self]. |
|
5922 |
||
5923 |
self ditherToDepth:depth |
|
5924 |
||
5925 |
"Created: / 07-07-2006 / 13:22:10 / cg" |
|
5926 |
! |
|
5927 |
||
5928 |
ditherToDepth:depth |
|
3331 | 5929 |
|ditherColors newImage useStandardColors nGrey greyColorsAlready moreColors d| |
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5930 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5931 |
useStandardColors := true. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5932 |
"/ 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
|
5933 |
"/ useStandardColors isNil ifTrue:[^ self]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5934 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5935 |
useStandardColors ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5936 |
depth = 1 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5937 |
ditherColors := Array with:(Color black) with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5938 |
] ifFalse:[ depth = 2 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5939 |
ditherColors := Array |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5940 |
with:(Color black) |
3140 | 5941 |
with:(Color darkGray) |
5942 |
with:(Color lightGray) |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5943 |
with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5944 |
] ifFalse:[ depth = 3 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5945 |
ditherColors := Color colorCubeWithRed:2 green:2 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5946 |
] ifFalse:[ depth = 4 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5947 |
ditherColors := Color vgaColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5948 |
] ifFalse:[ depth = 5 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5949 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5950 |
] ifFalse:[ depth = 6 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5951 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:3. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5952 |
] ifFalse:[ depth <= 8 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5953 |
ditherColors := Color colorCubeWithRed:6 green:6 blue:5. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5954 |
] ifFalse:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5955 |
self error:'unsupported depth'. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5956 |
]]]]]]]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5957 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5958 |
nGrey := (2 raisedTo:depth) - ditherColors size. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5959 |
nGrey > 0 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5960 |
nGrey := nGrey min:128. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5961 |
greyColorsAlready := ditherColors select:[:clr | clr isGreyColor]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5962 |
d := 1 / nGrey. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5963 |
moreColors := (1 to:nGrey-1) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5964 |
collect:[:i | Color brightness:(d * i)] |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5965 |
thenReject:[:clr | greyColorsAlready includes:clr ]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5966 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5967 |
ditherColors := ditherColors , moreColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5968 |
]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5969 |
] ifFalse:[ |
3020 | 5970 |
self halt:'unhandled dither color setup'. |
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5971 |
]. |
2054 | 5972 |
|
5973 |
self withExecuteCursorDo:[ |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5974 |
"/ newImage := self image asDitheredImageUsing:ditherColors depth:depth. |
2054 | 5975 |
newImage := self image asDitheredImageUsing:ditherColors depth:8. |
5976 |
||
5977 |
imageEditView makeUndo. |
|
5978 |
imageEditView image:newImage. |
|
5979 |
imageEditView setModified. |
|
5980 |
self updateImage. |
|
5981 |
self updateImagePreView. |
|
5982 |
||
5983 |
self fetchImageData. |
|
5984 |
]. |
|
5985 |
||
5986 |
"Created: / 07-07-2006 / 13:20:56 / cg" |
|
2073 | 5987 |
"Modified: / 05-09-2006 / 16:13:25 / cg" |
2054 | 5988 |
! |
5989 |
||
2174 | 5990 |
doubleClickOnColor:aColorIndex |
5991 |
self editSelectedColor. |
|
5992 |
||
5993 |
"Created: / 22-07-2007 / 13:14:37 / cg" |
|
5994 |
! |
|
5995 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5996 |
editSelectedColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5997 |
self processSelectedColorWith:[:clr | |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5998 |
|editor| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5999 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6000 |
editor := ColorEditDialog new. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6001 |
editor color:clr. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6002 |
editor open. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6003 |
editor accepted ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6004 |
AbortOperationRequest raise. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6005 |
]. |
3180 | 6006 |
editor color |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6007 |
] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6008 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6009 |
|
1446 | 6010 |
fetchImageData |
1460 | 6011 |
|image| |
6012 |
||
6013 |
(image := imageEditView image) notNil ifTrue:[ |
|
6014 |
self findColorMapMode. |
|
6015 |
self updateLabelsAndHistory. |
|
6016 |
] |
|
1446 | 6017 |
! |
6018 |
||
1544 | 6019 |
inspectColor |
2573 | 6020 |
|clrIndex clr| |
6021 |
||
6022 |
self hasColormap ifFalse:[ |
|
6023 |
clr := self selectedColorOrNil |
|
6024 |
] ifTrue:[ |
|
6025 |
clrIndex := self selectedColorIndexOrNil. |
|
6026 |
clrIndex isNil ifTrue:[ |
|
6027 |
^ self |
|
6028 |
]. |
|
6029 |
clr := self image colorFromValue:clrIndex-1 |
|
1544 | 6030 |
]. |
2573 | 6031 |
clr inspect |
1544 | 6032 |
! |
6033 |
||
2651 | 6034 |
inspectColormap |
6035 |
self hasColormap ifTrue:[ |
|
6036 |
self image colorMap inspect |
|
6037 |
]. |
|
6038 |
! |
|
6039 |
||
1598 | 6040 |
makeBrighter |
6041 |
| anyChange| |
|
6042 |
||
6043 |
self withExecuteCursorDo:[ |
|
6044 |
anyChange := imageEditView makeBrighter. |
|
6045 |
anyChange ifFalse:[ |
|
6046 |
Dialog warn:'Image unchanged'. |
|
6047 |
] ifTrue:[ |
|
6048 |
self updateImage. |
|
6049 |
] |
|
6050 |
]. |
|
6051 |
! |
|
6052 |
||
6053 |
makeDarker |
|
6054 |
| anyChange| |
|
6055 |
||
6056 |
self withExecuteCursorDo:[ |
|
6057 |
anyChange := imageEditView makeDarker. |
|
6058 |
anyChange ifFalse:[ |
|
6059 |
Dialog warn:'Image unchanged'. |
|
6060 |
] ifTrue:[ |
|
6061 |
self updateImage. |
|
6062 |
] |
|
6063 |
]. |
|
6064 |
! |
|
6065 |
||
1926 | 6066 |
makeGrayScaleImage |
1598 | 6067 |
|anyChange| |
1436 | 6068 |
|
6069 |
self withExecuteCursorDo:[ |
|
1926 | 6070 |
anyChange := imageEditView makeGrayScaleImage. |
1436 | 6071 |
anyChange ifFalse:[ |
6072 |
Dialog warn:'Image unchanged'. |
|
6073 |
] ifTrue:[ |
|
1598 | 6074 |
self updateImage. |
6075 |
] |
|
6076 |
]. |
|
6077 |
! |
|
6078 |
||
6079 |
makeInverse |
|
6080 |
| anyChange| |
|
6081 |
||
6082 |
self withExecuteCursorDo:[ |
|
6083 |
anyChange := imageEditView makeInverse. |
|
6084 |
anyChange ifFalse:[ |
|
6085 |
Dialog warn:'Image unchanged'. |
|
6086 |
] ifTrue:[ |
|
6087 |
self updateImage. |
|
1436 | 6088 |
] |
6089 |
]. |
|
6090 |
! |
|
6091 |
||
1446 | 6092 |
makeSelectedColorBrighter |
3195 | 6093 |
self processSelectedColorsWith:[:clr | clr lightened] |
1446 | 6094 |
! |
6095 |
||
6096 |
makeSelectedColorDarker |
|
3195 | 6097 |
self processSelectedColorsWith:[:clr | clr darkened] |
1446 | 6098 |
! |
6099 |
||
1884 | 6100 |
makeSelectedColorGray |
3195 | 6101 |
self processSelectedColorsWith:[:clr | Color brightness:(clr brightness)] |
6102 |
! |
|
6103 |
||
6104 |
makeSelectedColorShifted |
|
6105 |
|cMap colors| |
|
6106 |
||
6107 |
cMap := self image colorMap. |
|
6108 |
self hasMask ifTrue:[ |
|
6109 |
colors := self selectedColors value collect:[:idx | cMap at:idx-1]. |
|
6110 |
] ifFalse:[ |
|
6111 |
colors := self selectedColors value collect:[:idx | cMap at:idx]. |
|
6112 |
]. |
|
6113 |
self changeHLSOfColors:colors. |
|
1884 | 6114 |
! |
6115 |
||
2826 | 6116 |
makeSlightlyBrighter |
6117 |
| anyChange| |
|
6118 |
||
6119 |
self withExecuteCursorDo:[ |
|
6120 |
anyChange := imageEditView makeSlightlyBrighter. |
|
6121 |
anyChange ifFalse:[ |
|
6122 |
Dialog warn:'Image unchanged'. |
|
6123 |
] ifTrue:[ |
|
6124 |
self updateImage. |
|
6125 |
] |
|
6126 |
]. |
|
6127 |
||
6128 |
"Created: / 24-11-2010 / 11:06:11 / cg" |
|
6129 |
! |
|
6130 |
||
6131 |
makeSlightlyDarker |
|
6132 |
| anyChange| |
|
6133 |
||
6134 |
self withExecuteCursorDo:[ |
|
6135 |
anyChange := imageEditView makeSlightlyDarker. |
|
6136 |
anyChange ifFalse:[ |
|
6137 |
Dialog warn:'Image unchanged'. |
|
6138 |
] ifTrue:[ |
|
6139 |
self updateImage. |
|
6140 |
] |
|
6141 |
]. |
|
6142 |
||
6143 |
"Created: / 24-11-2010 / 11:06:23 / cg" |
|
6144 |
! |
|
6145 |
||
2652 | 6146 |
menu_clearColormapEntry0AndMaskedPixels |
6147 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
6148 |
0 and then clear all masked pixels (to pixelValue 0)" |
|
6149 |
||
6150 |
imageEditView makeUndo. |
|
6151 |
self withExecuteCursorDo:[ |
|
6152 |
self clearColormapEntry0AndMaskedPixels |
|
6153 |
] |
|
6154 |
! |
|
6155 |
||
6156 |
menu_clearMaskedPixels |
|
6157 |
"clear all masked pixels (to pixelValue 0)" |
|
6158 |
||
6159 |
imageEditView makeUndo. |
|
6160 |
||
6161 |
self withExecuteCursorDo:[ |
|
6162 |
self clearMaskedPixels |
|
6163 |
] |
|
6164 |
! |
|
6165 |
||
6166 |
menu_compressColorMap |
|
6167 |
"calculates a new color map for the image, using only used colors" |
|
6168 |
||
2893 | 6169 |
|depth oldImage usedColors colorMap| |
2652 | 6170 |
|
6171 |
oldImage := self image. |
|
6172 |
||
6173 |
oldImage photometric ~~ #palette ifTrue:[ |
|
6174 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
1852 | 6175 |
^ self |
6176 |
]. |
|
2893 | 6177 |
depth := oldImage depth. |
3103 | 6178 |
colorMap := oldImage colorMap asArray. |
2652 | 6179 |
usedColors := oldImage realUsedColors. |
2893 | 6180 |
usedColors size == colorMap size ifTrue:[ |
2652 | 6181 |
self information:'Compress colorMap: Colormap already compressed - no compression.'. |
6182 |
^ self |
|
6183 |
]. |
|
6184 |
||
6185 |
imageEditView makeUndo. |
|
6186 |
||
6187 |
self withExecuteCursorDo:[ |
|
6188 |
self compressColorMap |
|
1852 | 6189 |
] |
6190 |
! |
|
6191 |
||
2652 | 6192 |
menu_copyMask |
6193 |
|mask| |
|
6194 |
||
6195 |
mask := self image mask. |
|
6196 |
MaskClipboard := mask subImageIn: (0@0 extent:mask extent). |
|
6197 |
! |
|
6198 |
||
6199 |
menu_pasteMask |
|
1480 | 6200 |
|img mask| |
6201 |
||
6202 |
imageEditView makeUndo. |
|
6203 |
||
6204 |
img := self image. |
|
6205 |
mask := img mask. |
|
6206 |
||
6207 |
mask |
|
6208 |
copyFrom:MaskClipboard |
|
6209 |
x:0 y:0 |
|
6210 |
toX:0 y:0 |
|
6211 |
width:(mask width min:MaskClipboard width) |
|
6212 |
height:(mask height min:MaskClipboard height). |
|
6213 |
img mask:mask. |
|
6214 |
(imageEditView image:img copy) notNil ifTrue:[ |
|
6215 |
self fetchImageData. |
|
6216 |
] |
|
6217 |
! |
|
6218 |
||
2652 | 6219 |
menu_sortColorMap |
6220 |
"calculates a new color map for the image, sorting colors" |
|
6221 |
||
6222 |
self menu_sortColorMapWith:self sortBlockForColors |
|
6223 |
! |
|
6224 |
||
6225 |
menu_sortColorMapWith:sortBlock |
|
6226 |
"calculates a new color map for the image, sorting colors" |
|
6227 |
||
6228 |
self image photometric ~~ #palette ifTrue:[ |
|
6229 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
6230 |
^ self |
|
6231 |
]. |
|
6232 |
||
6233 |
imageEditView makeUndo. |
|
6234 |
||
6235 |
self withExecuteCursorDo:[ |
|
6236 |
self sortColorMapWith:sortBlock |
|
6237 |
] |
|
6238 |
||
6239 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
6240 |
"Created: / 30.9.1998 / 23:51:23 / cg" |
|
6241 |
! |
|
6242 |
||
6243 |
pasteColorIntoColormap |
|
6244 |
|copyBufferColor| |
|
6245 |
||
6246 |
copyBufferColor := imageEditView getClipboardObject. |
|
6247 |
copyBufferColor isColor ifFalse:[ |
|
6248 |
UserPreferences current beepInEditor ifTrue:[ |
|
6249 |
self window beep. |
|
6250 |
]. |
|
6251 |
^ self |
|
6252 |
]. |
|
6253 |
||
6254 |
self processSelectedColorWith:[:clr | |
|
6255 |
copyBufferColor |
|
6256 |
] |
|
6257 |
! |
|
6258 |
||
1682 | 6259 |
pickAndAddColorToColormap |
6260 |
self addColorToColormap:(Color fromUser) |
|
6261 |
! |
|
6262 |
||
1933 | 6263 |
pickAndPasteColor |
6264 |
self pickColor. |
|
6265 |
self pasteColorIntoColormap. |
|
6266 |
! |
|
6267 |
||
1852 | 6268 |
pickColor |
1871 | 6269 |
imageEditView setClipboardObject:(Color fromUser) |
1852 | 6270 |
! |
6271 |
||
1682 | 6272 |
processSelectedColorWith:aBlock |
3195 | 6273 |
"undoable color processing: |
6274 |
the selected color will be replaced by the value of aBlock" |
|
6275 |
||
6276 |
self processSelectedColorsWith:aBlock. |
|
6277 |
! |
|
6278 |
||
6279 |
processSelectedColorsWith:aBlock |
|
6280 |
"undoable color processing: |
|
6281 |
the selected colors will be replaced by the value of aBlock |
|
6282 |
(which gets a color vector and must return a color vector)" |
|
6283 |
||
3281 | 6284 |
|img cMap modifiedColormap oldColors newImage selectedColorIndices newColors maskOffset| |
3195 | 6285 |
|
6286 |
selectedColorIndices := self selectedColors value. |
|
6287 |
selectedColorIndices isEmptyOrNil ifTrue:[^ self]. |
|
1682 | 6288 |
|
6289 |
img := self image. |
|
6290 |
cMap := img colorMap. |
|
6291 |
cMap isNil ifTrue:[ |
|
1916 | 6292 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1682 | 6293 |
^ self |
6294 |
]. |
|
3195 | 6295 |
self hasMask ifTrue:[ |
3281 | 6296 |
maskOffset := 1. |
3195 | 6297 |
] ifFalse:[ |
3281 | 6298 |
maskOffset := 0. |
3195 | 6299 |
]. |
3281 | 6300 |
oldColors := selectedColorIndices collect:[:idx | cMap at:idx-maskOffset]. |
1682 | 6301 |
imageEditView makeUndo. |
6302 |
||
2992 | 6303 |
modifiedColormap := cMap asNewArray. |
1852 | 6304 |
|
3195 | 6305 |
newColors := oldColors collect:aBlock. |
6306 |
selectedColorIndices with:newColors do:[:idx :newColor | |
|
3281 | 6307 |
modifiedColormap at:idx-maskOffset put:newColor |
3195 | 6308 |
]. |
1682 | 6309 |
|
6310 |
newImage := img species new |
|
6311 |
width:img width |
|
6312 |
height:img height |
|
1843 | 6313 |
depth:img depth |
1682 | 6314 |
fromArray:img bits. |
6315 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6316 |
newImage colorMap:modifiedColormap. |
1682 | 6317 |
newImage fileName:img fileName. |
6318 |
newImage mask:(img mask copy). |
|
6319 |
||
6320 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
6321 |
self fetchImageData. |
|
6322 |
]. |
|
3195 | 6323 |
self selectedColors value:selectedColorIndices. |
1682 | 6324 |
! |
6325 |
||
1124 | 6326 |
reduceNumberOfColors |
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6327 |
|s n anyChange img usedColors| |
1124 | 6328 |
|
2817 | 6329 |
s := Dialog request:'Number of color bits to strip (1-7) ?' initialAnswer:3. |
1435 | 6330 |
s size == 0 ifTrue:[^ self]. |
1934 | 6331 |
|
1124 | 6332 |
n := Integer readFrom:s onError:0. |
6333 |
(n between:1 and:7) ifFalse:[ |
|
6334 |
Dialog warn:'Image unchanged'. |
|
6335 |
^ self |
|
6336 |
]. |
|
6337 |
||
6338 |
self withExecuteCursorDo:[ |
|
6339 |
anyChange := imageEditView reduceColorResolutionBy:n. |
|
6340 |
anyChange ifFalse:[ |
|
6341 |
Dialog warn:'Image unchanged'. |
|
6342 |
] ifTrue:[ |
|
6343 |
img := imageEditView image. |
|
6344 |
imageEditView image:img. |
|
1446 | 6345 |
|
6346 |
self fetchImageData. |
|
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6347 |
usedColors := img usedColorsMax:10000. |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6348 |
usedColors size == 10000 ifTrue:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6349 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6350 |
] ifFalse:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6351 |
Dialog information:(usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6352 |
] |
1124 | 6353 |
] |
6354 |
]. |
|
2817 | 6355 |
|
6356 |
"Modified: / 29-10-2010 / 18:08:01 / cg" |
|
1124 | 6357 |
! |
6358 |
||
1930 | 6359 |
reduceNumberOfColors2 |
1938 | 6360 |
|s rndR rndG rndB usedColors image newImage| |
6361 |
||
6362 |
s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4. |
|
1934 | 6363 |
s size == 0 ifTrue:[^ self]. |
1938 | 6364 |
rndR := Integer readFrom:s onError:0. |
1939 | 6365 |
|
1938 | 6366 |
s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2. |
6367 |
s size == 0 ifTrue:[^ self]. |
|
6368 |
rndG := Integer readFrom:s onError:0. |
|
1939 | 6369 |
|
1938 | 6370 |
s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10. |
6371 |
s size == 0 ifTrue:[^ self]. |
|
6372 |
rndB := Integer readFrom:s onError:0. |
|
1939 | 6373 |
|
6374 |
((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[ |
|
1930 | 6375 |
Dialog warn:'Image unchanged'. |
6376 |
^ self |
|
6377 |
]. |
|
6378 |
||
6379 |
self withExecuteCursorDo:[ |
|
3195 | 6380 |
|reduceColor| |
6381 |
||
6382 |
reduceColor := |
|
6383 |
[:clr | |
|
6384 |
|r g b nr ng nb| |
|
1934 | 6385 |
|
6386 |
r := clr redByte. |
|
6387 |
g := clr greenByte. |
|
6388 |
b := clr blueByte. |
|
1938 | 6389 |
nr := (r roundTo:rndR) min:255. |
6390 |
ng := (g roundTo:rndG) min:255. |
|
6391 |
nb := (b roundTo:rndB) min:255. |
|
1934 | 6392 |
|
3195 | 6393 |
Color redByte:nr greenByte:ng blueByte:nb. |
6394 |
]. |
|
6395 |
||
6396 |
image := self image. |
|
6397 |
"/ usedColors := image usedColorsMax:4096. |
|
6398 |
imageEditView makeUndo. |
|
6399 |
||
6400 |
newImage := image copy. |
|
6401 |
newImage photometric == #palette ifTrue:[ |
|
6402 |
newImage colorMap:(image colorMap collect:reduceColor). |
|
6403 |
] ifFalse:[ |
|
6404 |
image |
|
6405 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
6406 |
do:[:x :y :clr | |
|
6407 |
newImage colorAtX:x y:y put:(reduceColor value:clr) |
|
2260 | 6408 |
]. |
3195 | 6409 |
]. |
1934 | 6410 |
imageEditView image:newImage. |
6411 |
imageEditView setModified. |
|
6412 |
self updateImage. |
|
6413 |
self updateImagePreView. |
|
6414 |
||
6415 |
self fetchImageData. |
|
6416 |
usedColors := newImage usedColorsMax:10000. |
|
6417 |
usedColors size == 10000 ifTrue:[ |
|
6418 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
|
6419 |
] ifFalse:[ |
|
6420 |
Dialog information:(usedColors size printString , ' colors used.') |
|
6421 |
] |
|
1930 | 6422 |
]. |
2054 | 6423 |
|
6424 |
"Modified: / 07-07-2006 / 13:10:42 / cg" |
|
1930 | 6425 |
! |
6426 |
||
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6427 |
selectColor:aColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6428 |
|idx img cMap| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6429 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6430 |
aColor isNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6431 |
idx := nil. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6432 |
] ifFalse:[ |
2791 | 6433 |
img := self image. |
6434 |
img notNil ifTrue: [ |
|
6435 |
aColor == Color noColor ifTrue:[ |
|
6436 |
(img mask notNil) ifTrue:[ |
|
6437 |
idx := 1. |
|
6438 |
] |
|
6439 |
] ifFalse:[ |
|
2447 | 6440 |
(cMap := self listOfColors) notNil ifTrue:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6441 |
idx := cMap indexOf:aColor ifAbsent:nil. |
2447 | 6442 |
]. |
6443 |
idx isNil ifTrue:[ |
|
6444 |
"/ should not happen... |
|
6445 |
(cMap := img colorMap) notNil ifTrue:[ |
|
6446 |
idx := cMap indexOf:aColor ifAbsent:nil. |
|
6447 |
idx notNil ifTrue:[ |
|
6448 |
img mask notNil ifTrue:[ |
|
6449 |
idx := idx + 1. |
|
6450 |
]. |
|
6451 |
] |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6452 |
]. |
2447 | 6453 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6454 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6455 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6456 |
]. |
3195 | 6457 |
self selectedColors value:{idx}. |
2790 | 6458 |
|
2791 | 6459 |
"Modified: / 02-07-2010 / 12:06:07 / cg" |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6460 |
! |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6461 |
|
1682 | 6462 |
selectedColorIndexOrNil |
2651 | 6463 |
|img clrIndex| |
1682 | 6464 |
|
6465 |
img := self image. |
|
6466 |
img isNil ifTrue:[ |
|
2764 | 6467 |
"/ self warn:'No Image.'. |
1682 | 6468 |
^ nil |
6469 |
]. |
|
6470 |
clrIndex := self selectionOfColor value. |
|
1896 | 6471 |
self hasMask "img mask notNil" ifTrue: [ |
2449
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6472 |
(clrIndex isInteger and:[clrIndex > 1]) ifTrue:[ |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6473 |
^ clrIndex - 1 |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6474 |
]. |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6475 |
^ nil |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6476 |
]. |
1682 | 6477 |
^ clrIndex |
6478 |
! |
|
6479 |
||
1852 | 6480 |
selectedColorOrNil |
2447 | 6481 |
|cmapIndex img cMap colorList| |
1896 | 6482 |
|
6483 |
cmapIndex := self selectedColorIndexOrNil. |
|
1900 | 6484 |
cmapIndex isNil ifTrue:[^ nil]. |
2556 | 6485 |
cmapIndex == 0 ifTrue:[^ nil]. |
1852 | 6486 |
|
6487 |
img := self image. |
|
6488 |
cMap := img colorMap. |
|
6489 |
cMap isNil ifTrue:[ |
|
2447 | 6490 |
"/ self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
6491 |
colorList := self listOfColors. |
|
6492 |
colorList notNil ifTrue:[ |
|
6493 |
^ colorList at:cmapIndex ifAbsent:nil |
|
6494 |
]. |
|
1900 | 6495 |
^ nil |
1852 | 6496 |
]. |
1896 | 6497 |
^ cMap at:cmapIndex. |
1852 | 6498 |
! |
6499 |
||
1008 | 6500 |
sortColorMap |
6501 |
"calculates a new color map for the image, sorting colors" |
|
6502 |
||
3195 | 6503 |
self sortColorMapWith:self sortBlockForColorsByRGB |
1939 | 6504 |
! |
6505 |
||
6506 |
sortColorMapWith:sortBlock |
|
6507 |
"calculates a new color map for the image, sorting colors" |
|
6508 |
||
3224 | 6509 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits |
6510 |
expectedSize w h| |
|
1008 | 6511 |
|
6512 |
oldImage := self image. |
|
6513 |
depth := oldImage depth. |
|
3224 | 6514 |
w := oldImage width. |
6515 |
h := oldImage height. |
|
1008 | 6516 |
|
2652 | 6517 |
usedColors := oldImage realColorMap. |
6518 |
||
6519 |
"/ translation table |
|
6520 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
6521 |
newColorMap := usedColors asArray. |
|
6522 |
newColorMap sort:sortBlock. |
|
6523 |
||
6524 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
6525 |
|newPixel| |
|
6526 |
||
6527 |
(usedColors includes:clr) ifTrue:[ |
|
6528 |
newPixel := newColorMap indexOf:clr. |
|
6529 |
oldToNew at:oldIdx put:newPixel-1. |
|
6530 |
] |
|
1008 | 6531 |
]. |
6532 |
||
2652 | 6533 |
oldBits := oldImage bits. |
3224 | 6534 |
"/ sanity check... |
6535 |
expectedSize := ((w * h * depth + 7) // 8). |
|
6536 |
(oldBits size < expectedSize) ifTrue:[ |
|
6537 |
self halt:'incorrect pixeldata size'. |
|
6538 |
oldBits := (ByteArray new:expectedSize) replaceFrom:1 with:oldBits; yourself. |
|
6539 |
]. |
|
2652 | 6540 |
newBits := ByteArray new:(oldBits size). |
6541 |
depth ~~ 8 ifTrue:[ |
|
3224 | 6542 |
|
2652 | 6543 |
"/ expand/compress can only handle 8bits |
3224 | 6544 |
tmpBits := ByteArray uninitializedNew:(w*h). |
2652 | 6545 |
oldBits |
6546 |
expandPixels:depth |
|
3224 | 6547 |
width:w height:h |
2652 | 6548 |
into:tmpBits |
6549 |
mapping:oldToNew. |
|
6550 |
tmpBits |
|
6551 |
compressPixels:depth |
|
3224 | 6552 |
width:w height:h |
2652 | 6553 |
into:newBits |
6554 |
mapping:nil |
|
6555 |
] ifFalse:[ |
|
6556 |
oldBits |
|
6557 |
expandPixels:depth |
|
3224 | 6558 |
width:w height:h |
2652 | 6559 |
into:newBits |
6560 |
mapping:oldToNew. |
|
6561 |
]. |
|
6562 |
||
6563 |
newImage := oldImage species new |
|
3224 | 6564 |
width:w height:h depth:depth |
2652 | 6565 |
fromArray:newBits. |
6566 |
||
6567 |
newImage colorMap:newColorMap. |
|
6568 |
newImage fileName:oldImage fileName. |
|
6569 |
newImage mask:(oldImage mask copy). |
|
6570 |
||
6571 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
6572 |
self fetchImageData. |
|
1008 | 6573 |
] |
6574 |
||
6575 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
6576 |
"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
|
6577 |
! ! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
6578 |
|
1715 | 6579 |
!ImageEditor methodsFor:'user actions-editing'! |
400 | 6580 |
|
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6581 |
do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6582 |
|box dx1 dx2 image| |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6583 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6584 |
image := imageEditView image. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6585 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6586 |
box := EnterBox new. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6587 |
box title:(resources string:'dX1 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6588 |
box okText:(resources string:'OK'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6589 |
box abortText:(resources string:'Cancel'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6590 |
box initialText:'0.1'. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6591 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6592 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6593 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6594 |
and: [(dx1 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6595 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6596 |
box title:(resources string:'dX2 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6597 |
box initialText:(dx1 printString). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6598 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6599 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6600 |
and: [(dx2 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6601 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6602 |
imageEditView threeDProjection:dx1 and:dx2. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6603 |
] |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6604 |
]. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6605 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6606 |
self updateInfoLabel |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6607 |
! |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6608 |
|
1882 | 6609 |
doBrightenImage |
6610 |
imageEditView brightenImage. |
|
6611 |
self listOfColors removeAll. |
|
6612 |
self findColorMapMode. |
|
2585 | 6613 |
"/ imageEditView removelastUndo |
1882 | 6614 |
! |
6615 |
||
767 | 6616 |
doBrowseClass |
6617 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
400 | 6618 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6619 |
|cls| |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6620 |
|
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
6621 |
cls := imageEditView resourceClass. |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6622 |
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
|
6623 |
|
3242 | 6624 |
cls browserClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6625 |
openInClass:cls class |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6626 |
selector:(imageEditView resourceSelector) |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6627 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6628 |
"Modified: / 31.7.1998 / 02:01:15 / cg" |
400 | 6629 |
! |
6630 |
||
1703 | 6631 |
doCopyImageToClipboard |
6632 |
imageEditView copyImageToClipboard. |
|
6633 |
! |
|
6634 |
||
1045 | 6635 |
doCropAll |
986 | 6636 |
"find all borders and cut them off" |
6637 |
||
1045 | 6638 |
imageEditView cropLeft:true right:true top:true bottom:true. |
986 | 6639 |
self updateInfoLabel |
6640 |
||
6641 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
6642 |
"Created: / 7.9.1998 / 16:33:43 / cg" |
|
6643 |
! |
|
6644 |
||
1045 | 6645 |
doCropBottom |
986 | 6646 |
"find a bottom border and cut it off" |
6647 |
||
1045 | 6648 |
imageEditView cropLeft:false right:false top:false bottom:true. |
986 | 6649 |
self updateInfoLabel |
6650 |
||
6651 |
"Created: / 7.9.1998 / 13:00:20 / cg" |
|
6652 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
6653 |
! |
|
6654 |
||
1045 | 6655 |
doCropLeft |
986 | 6656 |
"find a left border and cut it off" |
6657 |
||
1045 | 6658 |
imageEditView cropLeft:true right:false top:false bottom:false. |
986 | 6659 |
self updateInfoLabel |
6660 |
||
6661 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
6662 |
"Modified: / 7.9.1998 / 14:26:34 / cg" |
|
6663 |
! |
|
6664 |
||
1045 | 6665 |
doCropManual |
986 | 6666 |
"let user specify borders and cut them off" |
6667 |
||
1502 | 6668 |
|bindings left top right bottom img firstChange gropAction acceptChannel| |
6669 |
||
6670 |
acceptChannel := TriggerValue new. |
|
1490 | 6671 |
|
6672 |
firstChange := true. |
|
6673 |
||
1502 | 6674 |
gropAction := |
6675 |
[:lV :rV :tV :bV | |l r t b| |
|
6676 |
acceptChannel value:true. |
|
6677 |
||
6678 |
l := lV value. |
|
6679 |
r := rV value. |
|
6680 |
t := tV value. |
|
6681 |
b := bV value. |
|
6682 |
(l + r + t + b) == 0 ifTrue:[ |
|
2520 | 6683 |
UserPreferences current beepInEditor ifTrue:[ |
6684 |
self window beep |
|
6685 |
] |
|
1502 | 6686 |
] ifFalse:[ |
6687 |
img := imageEditView image. |
|
6688 |
firstChange ifTrue:[ |
|
6689 |
imageEditView makeUndo. |
|
6690 |
firstChange := false. |
|
6691 |
]. |
|
6692 |
imageEditView |
|
6693 |
makeSubImageX:l y:t |
|
6694 |
width:(img width - l - r) |
|
6695 |
height:(img height - t - b). |
|
2546 | 6696 |
|
6697 |
self updateImagePreView. |
|
1502 | 6698 |
self updateInfoLabel |
6699 |
]. |
|
1490 | 6700 |
]. |
986 | 6701 |
|
6702 |
bindings := IdentityDictionary new. |
|
1507 | 6703 |
bindings at:#left put:(left := 1 asValue). |
6704 |
bindings at:#right put:(right := 1 asValue). |
|
6705 |
bindings at:#top put:(top := 1 asValue). |
|
6706 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1502 | 6707 |
bindings at:#acceptChannel put:acceptChannel. |
6708 |
||
6709 |
bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
|
6710 |
bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
|
6711 |
bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
|
6712 |
bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
|
6713 |
||
6714 |
bindings at:#applyAction put:[ gropAction value:left value:right value:top value:bottom ]. |
|
1490 | 6715 |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
6716 |
(self openDialogInterface:#cropDialogSpec withBindings:bindings) |
1507 | 6717 |
ifFalse:[ |
6718 |
firstChange ~~ true ifTrue:[ |
|
1558 | 6719 |
imageEditView undo. |
6720 |
self updateImagePreView. |
|
1507 | 6721 |
] |
6722 |
]. |
|
986 | 6723 |
|
6724 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6725 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6726 |
! |
|
6727 |
||
1045 | 6728 |
doCropRight |
986 | 6729 |
"find a right border and cut it off" |
6730 |
||
1045 | 6731 |
imageEditView cropLeft:false right:true top:false bottom:false. |
986 | 6732 |
self updateInfoLabel |
6733 |
||
6734 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
6735 |
"Modified: / 7.9.1998 / 14:26:44 / cg" |
|
6736 |
! |
|
6737 |
||
1045 | 6738 |
doCropTop |
986 | 6739 |
"find a top border and cut it off" |
6740 |
||
1045 | 6741 |
imageEditView cropLeft:false right:false top:true bottom:false. |
986 | 6742 |
self updateInfoLabel |
6743 |
||
6744 |
"Created: / 7.9.1998 / 13:00:19 / cg" |
|
6745 |
"Modified: / 7.9.1998 / 14:26:52 / cg" |
|
6746 |
! |
|
6747 |
||
1882 | 6748 |
doDarkenImage |
6749 |
imageEditView darkenImage. |
|
6750 |
self listOfColors removeAll. |
|
6751 |
self findColorMapMode. |
|
2585 | 6752 |
"/ imageEditView removelastUndo |
1882 | 6753 |
! |
6754 |
||
1433 | 6755 |
doEditMask |
6756 |
self image mask edit |
|
6757 |
! |
|
6758 |
||
767 | 6759 |
doFlipHorizontal |
6760 |
"flips horizontally current image" |
|
400 | 6761 |
|
911 | 6762 |
imageEditView flipHorizontal |
400 | 6763 |
! |
6764 |
||
767 | 6765 |
doFlipVertical |
6766 |
"flips vertically current image" |
|
400 | 6767 |
|
911 | 6768 |
imageEditView flipVertical |
400 | 6769 |
! |
6770 |
||
2196 | 6771 |
doInsertTextFromUser |
3157 | 6772 |
|text tempForm tempImage maskImage font w h paintColor| |
2196 | 6773 |
|
2424 | 6774 |
text := Dialog request:'Text to be inserted (placed as bitmap into clipboard for paste):'. |
6775 |
text isEmptyOrNil ifTrue:[^ self ]. |
|
2196 | 6776 |
|
6777 |
font := Font family:'arial' size:20. |
|
6778 |
font := font onDevice:Screen current. |
|
6779 |
w := font widthOf:text. |
|
6780 |
h := font heightOf:text. |
|
6781 |
||
6782 |
tempForm := Form extent:(w@h) depth:1 onDevice:(Screen current). |
|
6783 |
tempForm clear. |
|
6784 |
tempForm font:font. |
|
6785 |
tempForm paint:(Color colorId:1). |
|
6786 |
tempForm displayString:text at:(0@font ascent). |
|
6787 |
||
6788 |
tempImage := tempForm asImage. |
|
6789 |
maskImage := tempForm asImage. |
|
3157 | 6790 |
|
6791 |
paintColor := imageEditView selectedColor. |
|
6792 |
paintColor colorId == 0 ifTrue:[ |
|
6793 |
paintColor := Color black |
|
6794 |
]. |
|
2196 | 6795 |
tempImage |
6796 |
photometric:#palette; |
|
3157 | 6797 |
colorMap:(Array |
6798 |
with:Color white |
|
6799 |
with:paintColor); |
|
2196 | 6800 |
mask:maskImage. |
6801 |
||
6802 |
ImageEditView copyImageToClipboard:tempImage. |
|
6803 |
self editMode value:#paste. |
|
6804 |
||
6805 |
"Modified: / 11-11-2007 / 12:32:55 / cg" |
|
6806 |
! |
|
6807 |
||
1896 | 6808 |
doInspectImage |
6809 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
6810 |
||
6811 |
self image inspect |
|
6812 |
! |
|
6813 |
||
767 | 6814 |
doMagnifyDown |
1987 | 6815 |
"magnifies the current image one step down" |
400 | 6816 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6817 |
|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
|
6818 |
|
1987 | 6819 |
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
|
6820 |
(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
|
6821 |
magHolder value: mag - 1 |
400 | 6822 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6823 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6824 |
"Modified: / 26.7.1998 / 20:24:08 / cg" |
400 | 6825 |
! |
6826 |
||
767 | 6827 |
doMagnifyImage |
1479 | 6828 |
"magnifies the current image to a new size" |
400 | 6829 |
|
3196 | 6830 |
|box newSize image antiAliased| |
6831 |
||
6832 |
antiAliased := false asValue. |
|
1353 | 6833 |
image := imageEditView image. |
6834 |
||
6835 |
box := EnterBox new. |
|
6836 |
box title:(resources string:'Images new size:'). |
|
6837 |
box okText:(resources string:'OK'). |
|
6838 |
box abortText:(resources string:'Cancel'). |
|
6839 |
box initialText:image extent printString. |
|
3196 | 6840 |
box addCheckBox:(resources string:'Antialiased') on:antiAliased. |
1353 | 6841 |
box showAtPointer. |
3196 | 6842 |
|
1353 | 6843 |
(box accepted |
1960 | 6844 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6845 |
ifTrue:[ |
1479 | 6846 |
newSize isPoint ifFalse:[ |
3196 | 6847 |
self warn:'Please enter the new size as ''x @ y''.'. |
1479 | 6848 |
^ self. |
6849 |
]. |
|
3196 | 6850 |
antiAliased value ifTrue:[ |
6851 |
imageEditView magnifyAntiAliasedImageTo:newSize. |
|
6852 |
] ifFalse:[ |
|
6853 |
imageEditView magnifyImageTo:newSize. |
|
6854 |
]. |
|
1479 | 6855 |
]. |
6856 |
||
6857 |
self updateInfoLabel |
|
6858 |
! |
|
6859 |
||
6860 |
doMagnifyImageBy |
|
6861 |
"magnifies the current image (by a scale)" |
|
6862 |
||
3196 | 6863 |
|oldSize newSize scaleString scale image antiAliased| |
1479 | 6864 |
|
6865 |
image := imageEditView image. |
|
6866 |
oldSize := image extent. |
|
6867 |
||
3196 | 6868 |
antiAliased := false asValue. |
6869 |
||
6870 |
Dialog modifyingBoxWith:[:box | |
|
6871 |
box addCheckBox:(resources string:'Antialiased') on:antiAliased. |
|
6872 |
] do:[ |
|
6873 |
scaleString := Dialog |
|
2260 | 6874 |
request:(resources string:'Scale factor (<1 to shrink; >1 to magnify):') |
6875 |
initialAnswer:'1' |
|
6876 |
list:#('0.25' '0.5' '2' '4'). |
|
3196 | 6877 |
]. |
6878 |
scaleString isNil ifTrue:[^ self]. |
|
2260 | 6879 |
|
6880 |
"/ box := EnterBox new. |
|
6881 |
"/ box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):'). |
|
6882 |
"/ box okText:(resources string:'OK'). |
|
6883 |
"/ box abortText:(resources string:'Cancel'). |
|
6884 |
"/ box initialText:1 printString. |
|
6885 |
"/ box showAtPointer. |
|
6886 |
"/ box accepted ifTrue:[ |
|
6887 |
"/ scaleString := box contents. |
|
6888 |
"/ ]. |
|
6889 |
||
6890 |
scale := Object readFromString:scaleString onError:nil. |
|
6891 |
||
6892 |
scale notNil ifTrue:[ |
|
1479 | 6893 |
scale isNumber ifFalse:[ |
6894 |
self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'. |
|
6895 |
^ self. |
|
6896 |
]. |
|
6897 |
newSize := oldSize * scale. |
|
3196 | 6898 |
antiAliased value ifTrue:[ |
6899 |
imageEditView magnifyAntiAliasedImageTo:newSize. |
|
6900 |
] ifFalse:[ |
|
6901 |
imageEditView magnifyImageTo:newSize. |
|
6902 |
]. |
|
1353 | 6903 |
]. |
6904 |
||
400 | 6905 |
self updateInfoLabel |
6906 |
! |
|
6907 |
||
767 | 6908 |
doMagnifyUp |
1987 | 6909 |
"magnifies the current image one step up" |
400 | 6910 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6911 |
|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
|
6912 |
|
1987 | 6913 |
magHolder := self magnificationHolder. |
3344 | 6914 |
(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
|
6915 |
magHolder value: mag + 1 |
400 | 6916 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6917 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6918 |
"Modified: / 26.7.1998 / 20:23:52 / cg" |
400 | 6919 |
! |
6920 |
||
767 | 6921 |
doNegativeImage |
6922 |
"negates current image by negating the color map" |
|
400 | 6923 |
|
1598 | 6924 |
self image depth ~~ 1 ifTrue:[ |
6925 |
Dialog warn:'Only useful for depth 1 images'. |
|
6926 |
^ self |
|
6927 |
]. |
|
911 | 6928 |
imageEditView negativeImage. |
400 | 6929 |
self listOfColors removeAll. |
901 | 6930 |
self findColorMapMode. |
2585 | 6931 |
"/ imageEditView removelastUndo |
400 | 6932 |
! |
6933 |
||
767 | 6934 |
doResizeImage |
1353 | 6935 |
"resizes the current image" |
6936 |
||
6937 |
|box newSize image| |
|
6938 |
||
6939 |
image := imageEditView image. |
|
6940 |
||
6941 |
box := EnterBox new. |
|
6942 |
box title:(resources string:'Images new size:'). |
|
6943 |
box okText:(resources string:'OK'). |
|
6944 |
box abortText:(resources string:'Cancel'). |
|
6945 |
box initialText:image extent printString. |
|
6946 |
box showAtPointer. |
|
6947 |
(box accepted |
|
1960 | 6948 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6949 |
ifTrue:[ |
6950 |
imageEditView resizeImageTo:newSize. |
|
6951 |
]. |
|
400 | 6952 |
! |
6953 |
||
767 | 6954 |
doRotateImage |
6955 |
"rotates current image" |
|
400 | 6956 |
|
2884 | 6957 |
|rotationString box rotation| |
6958 |
||
6959 |
rotationString := Dialog |
|
6960 |
request:(resources string:'Rotate by (degrees, clockwise):') |
|
6961 |
list:#( '-90' '90' '180' '45' '-45' '135' '-135' ) |
|
6962 |
initialAnswer:90. |
|
6963 |
rotationString isEmptyOrNil ifTrue:[^ self]. "/ cancelled |
|
6964 |
rotation := Number readFrom:rotationString onError:[nil]. |
|
6965 |
rotation isNil ifTrue:[^ self]. |
|
6966 |
||
6967 |
"/ box := EnterBox new. |
|
6968 |
"/ box title:(resources string:'Rotate by (degrees, clockwise):'). |
|
6969 |
"/ box okText:(resources string:'OK'). |
|
6970 |
"/ box abortText:(resources string:'Cancel'). |
|
6971 |
"/ box initialText: '0'. |
|
6972 |
"/ box showAtPointer. |
|
6973 |
"/ (box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil]) |
|
6974 |
"/ ifFalse:[ ^ self ]. |
|
6975 |
||
6976 |
imageEditView rotateImageBy:rotation. |
|
6977 |
self updateInfoLabel. |
|
6978 |
||
6979 |
"Modified: / 18-03-2012 / 14:41:14 / cg" |
|
400 | 6980 |
! |
6981 |
||
1557 | 6982 |
doShiftManual |
6983 |
"let user specify amount and shift" |
|
6984 |
||
1713 | 6985 |
|bindings amount img firstChange shiftAction acceptChannel wrapHolder| |
1557 | 6986 |
|
6987 |
acceptChannel := TriggerValue new. |
|
1960 | 6988 |
wrapHolder := (lastShiftUsedWrap ? true) asValue. |
1557 | 6989 |
|
6990 |
firstChange := true. |
|
6991 |
||
6992 |
shiftAction := |
|
6993 |
[:shiftH :shiftV | |
|
6994 |
acceptChannel value:true. |
|
6995 |
||
6996 |
img := imageEditView image. |
|
6997 |
firstChange ifTrue:[ |
|
6998 |
imageEditView makeUndo. |
|
6999 |
firstChange := false. |
|
7000 |
]. |
|
1713 | 7001 |
imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). |
1557 | 7002 |
self updateInfoLabel |
7003 |
]. |
|
7004 |
||
7005 |
bindings := IdentityDictionary new. |
|
7006 |
bindings at:#shiftAmount put:(amount := 1 asValue). |
|
1713 | 7007 |
bindings at:#wrap put:wrapHolder. |
1557 | 7008 |
bindings at:#acceptChannel put:acceptChannel. |
7009 |
||
7010 |
bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ]. |
|
7011 |
bindings at:#shiftRightNow put:[ shiftAction value:amount value value:0 ]. |
|
7012 |
bindings at:#shiftUpNow put:[ shiftAction value:0 value:(-1*amount value) ]. |
|
7013 |
bindings at:#shiftDownNow put:[ shiftAction value:0 value:amount value ]. |
|
7014 |
||
7015 |
(self openDialogInterface:#shiftDialogSpec withBindings:bindings) |
|
7016 |
ifFalse:[ |
|
7017 |
firstChange ~~ true ifTrue:[ |
|
7018 |
imageEditView undo |
|
7019 |
] |
|
7020 |
]. |
|
1960 | 7021 |
lastShiftUsedWrap := wrapHolder value. |
1557 | 7022 |
|
7023 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
7024 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
7025 |
! |
|
7026 |
||
1480 | 7027 |
doUnCropManual |
7028 |
"let user specify borders and add them" |
|
7029 |
||
7030 |
|bindings left top right bottom img| |
|
7031 |
||
7032 |
bindings := IdentityDictionary new. |
|
1704 | 7033 |
bindings at:#left put:(left := 1 asValue). |
7034 |
bindings at:#right put:(right := 1 asValue). |
|
7035 |
bindings at:#top put:(top := 1 asValue). |
|
7036 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
7037 |
(self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
1480 | 7038 |
ifTrue:[ |
7039 |
left := left value. |
|
7040 |
right := right value. |
|
7041 |
top := top value. |
|
7042 |
bottom := bottom value. |
|
7043 |
img := imageEditView image. |
|
7044 |
||
7045 |
imageEditView |
|
7046 |
makeBorderedImageX:left y:top |
|
7047 |
width:(img width + left + right) |
|
7048 |
height:(img height + top + bottom). |
|
7049 |
self updateInfoLabel |
|
7050 |
]. |
|
7051 |
||
7052 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
7053 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
7054 |
! |
|
7055 |
||
767 | 7056 |
doUndo |
7057 |
"reverses last edit action" |
|
400 | 7058 |
|
1436 | 7059 |
imageEditView undo. |
3253 | 7060 |
self updateImagePreView |
400 | 7061 |
! ! |
7062 |
||
2812 | 7063 |
!ImageEditor methodsFor:'user actions-image sequences'! |
7064 |
||
7065 |
editEachImageFromSequence |
|
7066 |
|seq| |
|
7067 |
||
7068 |
self checkModified ifFalse:[ ^ self ]. |
|
7069 |
||
7070 |
imageEditView releaseUndos. |
|
7071 |
||
7072 |
seq := self image imageSequence. |
|
7073 |
seq size > 10 ifTrue:[ |
|
7074 |
(Dialog confirm:(resources string:'Ok to open %1 image editor windows?' with:seq size)) |
|
7075 |
ifFalse:[^ self]. |
|
7076 |
]. |
|
7077 |
||
7078 |
seq do:[:eachFrame | |
|
7079 |
ImageEditor openOnImage:eachFrame image |
|
7080 |
]. |
|
7081 |
||
7082 |
"Modified: / 21-10-2010 / 15:01:25 / cg" |
|
7083 |
! |
|
7084 |
||
7085 |
gotoImageInSequence:index |
|
7086 |
"display the next image in the image sequence" |
|
7087 |
||
7088 |
|img seq frame listOfColors| |
|
7089 |
||
7090 |
imageEditView releaseUndos. |
|
7091 |
||
7092 |
seq := self image imageSequence. |
|
7093 |
||
7094 |
imageSeqNr := index. |
|
7095 |
frame := seq at:imageSeqNr. |
|
7096 |
imageEditView image:(frame image). |
|
7097 |
||
7098 |
(img := self image) notNil ifTrue:[ |
|
7099 |
listOfColors := self listOfColors. |
|
7100 |
img colorMap notNil ifTrue:[ |
|
7101 |
listOfColors contents:(img usedColors asSet asOrderedCollection). |
|
7102 |
] ifFalse:[ |
|
7103 |
listOfColors removeAll. |
|
7104 |
]. |
|
7105 |
self findColorMapMode. |
|
7106 |
self updateLabelsAndHistory. |
|
7107 |
img := img onDevice:device. |
|
7108 |
imageEditView image:img. |
|
7109 |
] ifFalse:[ |
|
7110 |
self updateForNoImage |
|
7111 |
]. |
|
7112 |
||
7113 |
"Created: / 21-10-2010 / 14:22:11 / cg" |
|
7114 |
! |
|
7115 |
||
7116 |
nextImageInSequence |
|
7117 |
"display the next image in the image sequence" |
|
7118 |
||
7119 |
|seq index| |
|
7120 |
||
7121 |
seq := self image imageSequence. |
|
7122 |
(index := imageSeqNr) isNil ifTrue:[ |
|
7123 |
index := 1. |
|
7124 |
]. |
|
7125 |
index := index + 1. |
|
7126 |
index > seq size ifTrue:[ |
|
7127 |
self information:'Back to first image in sequence'. |
|
7128 |
index := 1. |
|
7129 |
]. |
|
7130 |
self gotoImageInSequence:index. |
|
7131 |
||
7132 |
"Modified: / 21-10-2010 / 14:24:11 / cg" |
|
7133 |
! |
|
7134 |
||
7135 |
previousImageInSequence |
|
7136 |
"display the previous image in the image sequence" |
|
7137 |
||
7138 |
|seq index| |
|
7139 |
||
7140 |
seq := self image imageSequence. |
|
7141 |
(index := imageSeqNr) isNil ifTrue:[ |
|
7142 |
index := 1. |
|
7143 |
]. |
|
7144 |
index := index - 1. |
|
7145 |
index < 1 ifTrue:[ |
|
7146 |
self information:'Wrap to last image in sequence'. |
|
7147 |
index := seq size. |
|
7148 |
]. |
|
7149 |
self gotoImageInSequence:index. |
|
7150 |
||
7151 |
"Created: / 21-10-2010 / 14:25:03 / cg" |
|
7152 |
! ! |
|
7153 |
||
1715 | 7154 |
!ImageEditor methodsFor:'user actions-loading'! |
400 | 7155 |
|
767 | 7156 |
doLoadFromClass |
7157 |
"opens a dialog for loading an image from class and a (resource-) selector" |
|
400 | 7158 |
|
1122 | 7159 |
|img| |
7160 |
||
1975 | 7161 |
self checkModified ifFalse:[ ^ self ]. |
7162 |
||
1054 | 7163 |
(imageEditView loadFromClass) notNil ifTrue:[ |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
7164 |
imageSeqNr := nil. |
1122 | 7165 |
(img := self image) notNil ifTrue: [ |
1900 | 7166 |
self updateColorsFromImage:img. |
574 | 7167 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
7168 |
self updateLabelsAndHistory. |
1054 | 7169 |
] ifFalse: [ |
7170 |
self updateForNoImage |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
7171 |
]. |
449 | 7172 |
] |
400 | 7173 |
! |
7174 |
||
767 | 7175 |
doLoadFromFile |
7176 |
"opens a dialog for loading an image from a file" |
|
400 | 7177 |
|
2820 | 7178 |
|img file filters title| |
1353 | 7179 |
|
1975 | 7180 |
self checkModified ifFalse:[ ^ self ]. |
7181 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
7182 |
imageSeqNr := nil. |
1353 | 7183 |
img := self image. |
7184 |
img notNil ifTrue: [ |
|
7185 |
file := img fileName |
|
7186 |
]. |
|
7187 |
||
2820 | 7188 |
title := (resources string:'Load Image From'). |
7189 |
||
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
7190 |
(UserPreferences current useNativeFileDialog |
3100 | 7191 |
and:[Screen current isWindowsPlatform]) ifTrue:[ |
2820 | 7192 |
self withWaitCursorDo:[ |
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
7193 |
file := Screen current |
2820 | 7194 |
nativeFileDialogFor:(self window topView id) |
7195 |
save:false |
|
7196 |
title:title |
|
7197 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
7198 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 7199 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 7200 |
filter: |
7201 |
{ |
|
7202 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp;*.jpg' } . |
|
7203 |
{ (resources string:'All Files') . '*.*' } |
|
7204 |
} |
|
2821 | 7205 |
extension:nil |
2827 | 7206 |
"blocking:false". |
2820 | 7207 |
]. |
7208 |
] ifFalse:[ |
|
7209 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
7210 |
file notNil ifTrue:[ |
|
7211 |
file := FileSelectionBrowser |
|
7212 |
request:title |
|
7213 |
fileName:file |
|
7214 |
withFileFilters:filters. |
|
7215 |
] ifFalse:[ |
|
7216 |
file := FileSelectionBrowser |
|
7217 |
request:title |
|
7218 |
inDirectory:LastDirectory |
|
7219 |
withFileFilters:filters. |
|
7220 |
]. |
|
1353 | 7221 |
]. |
2820 | 7222 |
|
1353 | 7223 |
file notNil ifTrue:[ |
7224 |
LastDirectory := file asFilename directoryName. |
|
7225 |
self loadFromFile:file |
|
7226 |
] |
|
2820 | 7227 |
|
2827 | 7228 |
"Modified: / 14-12-2010 / 13:52:11 / cg" |
400 | 7229 |
! |
7230 |
||
2796 | 7231 |
doLoadFromURL |
7232 |
"opens a dialog for loading an image from a URL" |
|
7233 |
||
2866 | 7234 |
|tempFile url response| |
2796 | 7235 |
|
7236 |
self checkModified ifFalse:[ ^ self ]. |
|
7237 |
||
7238 |
url := Dialog |
|
2866 | 7239 |
request:(resources string:'Load Image from URL') |
2796 | 7240 |
initialAnswer:LastURL. |
7241 |
||
7242 |
url notEmptyOrNil ifTrue:[ |
|
3050 | 7243 |
HTTPInterface isNil ifTrue:[ Smalltalk loadPackage:'stx:goodies/communication']. |
7244 |
||
2796 | 7245 |
LastURL := url. |
3027 | 7246 |
tempFile := FileStream newTemporary close fileName. |
2866 | 7247 |
self withWaitCursorDo:[ |
7248 |
response := HTTPInterface get:url destinationFile:tempFile. |
|
7249 |
]. |
|
7250 |
response isErrorResponse ifTrue:[ |
|
7251 |
Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText). |
|
7252 |
] ifFalse:[ |
|
7253 |
self loadFromFile:tempFile. |
|
7254 |
]. |
|
2796 | 7255 |
tempFile delete |
7256 |
] |
|
7257 |
||
7258 |
"Created: / 20-09-2010 / 11:30:59 / cg" |
|
7259 |
! |
|
7260 |
||
767 | 7261 |
doNewImage |
7262 |
"opens a dialog with choices of size and color map for creating a new image" |
|
400 | 7263 |
|
1975 | 7264 |
|dialogAspects width height cMapString cMapMode cMap imageClass image szString defaultSize ext| |
7265 |
||
7266 |
self checkModified ifFalse:[ ^ self ]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7267 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7268 |
defaultSize := (self class listOfDefaultSizes includes:'32x32') |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7269 |
ifTrue:['32x32'] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7270 |
ifFalse:[self class listOfDefaultSizes first]. |
767 | 7271 |
|
1975 | 7272 |
dialogAspects := IdentityDictionary new |
767 | 7273 |
at:#listOfSizes put: self class listOfDefaultSizes asValue; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7274 |
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
|
7275 |
at:#selectionOfSize put: (LastSizeString ? defaultSize) asValue; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7276 |
at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue; |
400 | 7277 |
yourself. |
7278 |
||
1975 | 7279 |
(self openDialogInterface:#dialogSpecForNewImage withBindings:dialogAspects) |
1383 | 7280 |
ifTrue:[ |
1975 | 7281 |
szString := (dialogAspects at:#selectionOfSize) value. |
1960 | 7282 |
ext := self pointFromString:szString. |
1962 | 7283 |
ext isNil ifTrue:[ |
7284 |
width := height := 32 |
|
7285 |
] ifFalse:[ |
|
7286 |
width := ext x. |
|
7287 |
height := ext y. |
|
7288 |
]. |
|
1960 | 7289 |
"/ width := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]). |
7290 |
"/ height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]). |
|
400 | 7291 |
|
1975 | 7292 |
cMapString := (dialogAspects at:#selectionOfColorMap) value. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7293 |
cMapMode := self class namesOfColorMaps keyAtEqualValue:cMapString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7294 |
cMap := self class listOfColorMaps at:cMapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7295 |
imageClass := Image implementorForDepth:(cMap size highBit-1). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7296 |
image := imageClass width: width height: height. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7297 |
image bits:(ByteArray new:(image bytesPerRow*height)). |
400 | 7298 |
|
1637 | 7299 |
LastSizeString := szString. |
7300 |
LastColormapMode := cMapString. |
|
7301 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7302 |
(cMapMode startsWith: 'mask') ifTrue:[ |
3125
9d5624af77ab
Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents:
3122
diff
changeset
|
7303 |
image mask: (ImageMask width: width height: height depth: 1 fromArray: (ByteArray new: width*height)). |
400 | 7304 |
]. |
7305 |
image colorMap: cMap. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7306 |
(imageEditView image: image) notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7307 |
self updateListOfColorsAndColormapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7308 |
self updateLabelsAndHistory. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7309 |
]. |
400 | 7310 |
image fillRectangleX:0 y:0 width:width height:height with:Color white. |
767 | 7311 |
] |
929 | 7312 |
! |
7313 |
||
2058 | 7314 |
doNewImageEditor |
7315 |
"opens a new image editor" |
|
7316 |
||
7317 |
ImageEditor open |
|
7318 |
||
7319 |
"Created: / 17-08-2006 / 09:03:14 / cg" |
|
7320 |
! |
|
7321 |
||
1682 | 7322 |
doNewImageFromClipboard |
7323 |
|image| |
|
7324 |
||
1975 | 7325 |
self checkModified ifFalse:[ ^ self ]. |
7326 |
||
1682 | 7327 |
image := imageEditView clipBoard. |
3164 | 7328 |
image isImageOrForm ifFalse:[ |
7329 |
image := Image readFrom:(image asString) onError:nil. |
|
7330 |
image isNil ifTrue:[ |
|
7331 |
Dialog warn:'Clipboard does not contain an image I can use/understand'. |
|
7332 |
^ self. |
|
7333 |
]. |
|
7334 |
]. |
|
1975 | 7335 |
imageEditView image:image. |
7336 |
||
7337 |
image notNil ifTrue:[ |
|
1900 | 7338 |
self updateColorsFromImage:image. |
1682 | 7339 |
self findColorMapMode. |
7340 |
self updateLabelsAndHistory. |
|
7341 |
] |
|
7342 |
! |
|
7343 |
||
3200 | 7344 |
doNewMaskFromClipboard |
7345 |
|mask image newImage| |
|
7346 |
||
7347 |
self checkModified ifFalse:[ ^ self ]. |
|
7348 |
||
7349 |
mask := imageEditView clipBoard. |
|
7350 |
mask isImageOrForm ifFalse:[ |
|
7351 |
mask := Image readFrom:(mask asString) onError:nil. |
|
7352 |
mask isNil ifTrue:[ |
|
7353 |
Dialog warn:'Clipboard does not contain an image I can use/understand'. |
|
7354 |
^ self. |
|
7355 |
]. |
|
7356 |
]. |
|
7357 |
(image:= imageEditView image) isNil ifTrue:[ |
|
7358 |
image := mask. |
|
7359 |
]. |
|
7360 |
mask extent ~= image extent ifTrue:[ |
|
7361 |
mask := imageEditView resizedImage:mask to:image extent. |
|
7362 |
]. |
|
7363 |
newImage := image copy. |
|
7364 |
newImage mask:mask. |
|
7365 |
imageEditView newImageWithUndo:newImage. |
|
7366 |
self updateAfterImageChange. |
|
7367 |
"/ self updateColorsFromImage:image. |
|
7368 |
"/ self findColorMapMode. |
|
7369 |
"/ self updateLabelsAndHistory. |
|
7370 |
! |
|
7371 |
||
929 | 7372 |
grabScreenImage |
7373 |
"let user choose an area and grab that are for editing" |
|
7374 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7375 |
self grabScreenImageUsing:[ |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7376 |
|r| |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7377 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7378 |
[Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7379 |
r := Rectangle fromUser. |
2708 | 7380 |
(r width == 0 or:[r height == 0]) ifTrue:[ |
7381 |
nil |
|
7382 |
] ifFalse:[ |
|
7383 |
lastGrabbedScreenArea := r. |
|
7384 |
Image fromScreen:r |
|
7385 |
] |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7386 |
]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7387 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7388 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7389 |
grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7390 |
"grab again from the previous area for editing" |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7391 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7392 |
self grabScreenImageUsing:[ |
2708 | 7393 |
Image fromScreen:lastGrabbedScreenArea |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7394 |
]. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7395 |
! |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7396 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7397 |
grabScreenImageUsing:aBlock |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7398 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7399 |
|
1975 | 7400 |
self checkModified ifFalse:[ ^ self ]. |
7401 |
||
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7402 |
Processor |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7403 |
addTimedBlock:[ |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7404 |
|image d8image img| |
929 | 7405 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
7406 |
imageSeqNr := nil. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7407 |
image := aBlock value. |
2708 | 7408 |
image notNil ifTrue:[ |
1121 | 7409 |
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
|
7410 |
false ifTrue:[ |
1687
f4543a556b89
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1682
diff
changeset
|
7411 |
Error handle:[:ex | |sig| |
2996 | 7412 |
(sig := ex creator) == HaltInterrupt ifTrue:[ex reject]. |
1122 | 7413 |
sig == Signal noHandlerSignal ifTrue:[ex reject]. |
1121 | 7414 |
|
7415 |
self warn:'Could not convert to depth8 image (too many colors)'. |
|
7416 |
d8image := nil. |
|
7417 |
] do:[ |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
7418 |
d8image := Depth8Image fromImage:image photometric:#palette. |
1121 | 7419 |
]. |
7420 |
d8image notNil ifTrue:[ |
|
7421 |
image := d8image |
|
7422 |
] |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
7423 |
]. |
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7424 |
]. |
1121 | 7425 |
(imageEditView image:image) notNil ifTrue:[ |
7426 |
self listOfColors contents:(image colorMap). |
|
7427 |
self findColorMapMode. |
|
7428 |
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
|
7429 |
] |
1121 | 7430 |
] |
7431 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7432 |
afterSeconds:1 |
929 | 7433 |
|
7434 |
"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
|
7435 |
"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
|
7436 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
7437 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7438 |
grabWindowImage |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7439 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7440 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7441 |
self grabScreenImageUsing:[ |
3188 | 7442 |
|v topView| |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7443 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7444 |
(v := Screen current viewFromUser) notNil ifTrue:[ |
3188 | 7445 |
topView := v topView. |
7446 |
topView raise; makeFullyVisible. |
|
2704 | 7447 |
Delay waitForSeconds:0.5. "/ give view a chance to redraw itself. |
3188 | 7448 |
Image fromView:topView |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7449 |
]. |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7450 |
]. |
400 | 7451 |
! ! |
7452 |
||
1715 | 7453 |
!ImageEditor methodsFor:'user actions-saving'! |
400 | 7454 |
|
767 | 7455 |
doPrint |
7456 |
"prints current image on the current printer" |
|
400 | 7457 |
|
1734 | 7458 |
self withWaitCursorDo:[ |
7459 |
imageEditView print |
|
7460 |
] |
|
400 | 7461 |
! |
7462 |
||
1613 | 7463 |
doSaveButtonImageToFileAs |
3375 | 7464 |
"opens a dialog for saving current image to a file. |
7465 |
Saved as a button image (i.e. with a frame around)" |
|
1613 | 7466 |
|
7467 |
imageEditView saveButtonImageToFileAs. |
|
7468 |
self updateLabelsAndHistory. |
|
7469 |
! |
|
7470 |
||
767 | 7471 |
doSaveImageFile |
7472 |
"saves current image to current file" |
|
400 | 7473 |
|
1481 | 7474 |
imageEditView save. |
3375 | 7475 |
self clearModifiedAndRememberSavedImage. |
400 | 7476 |
! |
7477 |
||
767 | 7478 |
doSaveImageFileAs |
1922 | 7479 |
"opens a dialog for saving an image to a file" |
7480 |
||
7481 |
|img file filters| |
|
7482 |
||
7483 |
img := self image. |
|
7484 |
img notNil ifTrue: [ |
|
7485 |
file := img fileName |
|
7486 |
]. |
|
7487 |
||
2595 | 7488 |
filters := FileSelectionBrowser saveImageFileNameFilters. |
1922 | 7489 |
|
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
7490 |
(UserPreferences current useNativeFileDialog |
3100 | 7491 |
and:[Screen current isWindowsPlatform]) ifTrue:[ |
2820 | 7492 |
self withWaitCursorDo:[ |
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
7493 |
file := Screen current |
2820 | 7494 |
nativeFileDialogFor:(self window topView id) |
7495 |
save:true |
|
7496 |
title:(resources string:'Save Image To') |
|
7497 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
7498 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 7499 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 7500 |
filter: |
7501 |
{ |
|
7502 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp' } . |
|
7503 |
{ (resources string:'All Files') . '*.*' } |
|
7504 |
} |
|
2821 | 7505 |
extension:nil |
2827 | 7506 |
"blocking:false". |
2807 | 7507 |
]. |
2820 | 7508 |
] ifFalse:[ |
7509 |
(FileSelectionBrowser isNil or:[DirectoryView isNil]) ifTrue:[ |
|
7510 |
file notNil ifTrue:[ |
|
7511 |
file := Dialog requestFileName:'Save Image To' |
|
7512 |
default:file |
|
7513 |
pattern:(filters first). |
|
7514 |
] ifFalse:[ |
|
7515 |
file := Dialog |
|
7516 |
requestFileName:'Save Image To' |
|
7517 |
default:'image.png' |
|
7518 |
pattern:(filters first) |
|
7519 |
fromDirectory:LastDirectory. |
|
7520 |
]. |
|
2807 | 7521 |
] ifFalse:[ |
2820 | 7522 |
file notNil ifTrue:[ |
7523 |
file := FileSelectionBrowser |
|
7524 |
request:'Save Image To' |
|
7525 |
fileName:file |
|
7526 |
withFileFilters:filters. |
|
7527 |
] ifFalse:[ |
|
7528 |
file := FileSelectionBrowser |
|
7529 |
request:'Save Image To' |
|
7530 |
inDirectory:LastDirectory |
|
7531 |
withFileFilters:filters. |
|
7532 |
]. |
|
2807 | 7533 |
]. |
1922 | 7534 |
]. |
7535 |
file notNil ifTrue:[ |
|
7536 |
imageEditView saveImageFileAs:file. |
|
7537 |
LastDirectory := file asFilename directoryName. |
|
7538 |
self updateLabelsAndHistory. |
|
3375 | 7539 |
self clearModifiedAndRememberSavedImage. |
1922 | 7540 |
] |
2807 | 7541 |
|
2827 | 7542 |
"Modified: / 14-12-2010 / 13:51:47 / cg" |
400 | 7543 |
! |
7544 |
||
767 | 7545 |
doSaveImageMaskFileAs |
7546 |
"opens a dialog for saving mask of current image to a file" |
|
400 | 7547 |
|
1481 | 7548 |
imageEditView saveImageMaskFileAs. |
400 | 7549 |
! |
7550 |
||
767 | 7551 |
doSaveMethod |
1975 | 7552 |
"saves the image in current class and selector" |
7553 |
||
7554 |
imageEditView saveMethod ifTrue:[ |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7555 |
self updateLabelsAndHistory. |
3375 | 7556 |
self clearModifiedAndRememberSavedImage. |
400 | 7557 |
] |
7558 |
! |
|
7559 |
||
767 | 7560 |
doSaveMethodAs |
7561 |
"opens a dialog for saving current image on a class and a selector" |
|
400 | 7562 |
|
1975 | 7563 |
imageEditView saveMethodAs ifTrue:[ |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7564 |
self updateLabelsAndHistory. |
3375 | 7565 |
self clearModifiedAndRememberSavedImage. |
400 | 7566 |
] |
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7567 |
! |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7568 |
|
3022 | 7569 |
doShowPixelArrayLiteralString |
7570 |
"opens a dialog showing a literal array-like storeString |
|
7571 |
(sometimes useful to embed an image into source code)" |
|
7572 |
||
7573 |
|img| |
|
7574 |
||
7575 |
img := imageEditView image. |
|
7576 |
TextBox openOn:img bits storeString |
|
7577 |
! |
|
7578 |
||
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7579 |
doShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7580 |
"opens a dialog showing the storeString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7581 |
(sometimes useful to embed an image into source code)" |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7582 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7583 |
|img| |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7584 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7585 |
img := imageEditView image. |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7586 |
TextBox openOn:img storeString |
1975 | 7587 |
! |
7588 |
||
7589 |
save |
|
7590 |
"saves current image on current class and selector" |
|
7591 |
||
7592 |
self doSaveMethod |
|
400 | 7593 |
! ! |
7594 |
||
1715 | 7595 |
!ImageEditor methodsFor:'user actions-settings'! |
1353 | 7596 |
|
7597 |
doChangeGridMagnification |
|
7598 |
"change grid magnification" |
|
7599 |
||
7600 |
|box oldGridLimit newGridLimit| |
|
7601 |
||
7602 |
oldGridLimit := imageEditView class gridMagnificationLimit asPoint. |
|
7603 |
||
7604 |
box := EnterBox new. |
|
7605 |
box title:(resources string:'Grid Magnification Limit:'). |
|
7606 |
box okText:(resources string:'OK'). |
|
7607 |
box abortText:(resources string:'Cancel'). |
|
7608 |
box initialText:(oldGridLimit x printString). |
|
7609 |
box showAtPointer. |
|
7610 |
||
7611 |
(box accepted |
|
7612 |
and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil] |
|
7613 |
) ifTrue:[ |
|
7614 |
newGridLimit := (99 min: (2 max:newGridLimit)) asPoint. |
|
7615 |
imageEditView class gridMagnificationLimit:newGridLimit. |
|
7616 |
imageEditView invalidate |
|
7617 |
] |
|
7618 |
||
2192 | 7619 |
! |
7620 |
||
7621 |
penWidth:n |
|
7622 |
imageEditView penWidth:n |
|
7623 |
||
7624 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
2375 | 7625 |
! |
7626 |
||
2881 | 7627 |
penWidthHolderChanged |
7628 |
imageEditView penWidth:(self penWidthHolder value) |
|
7629 |
||
7630 |
"Created: / 15-02-2012 / 22:32:00 / cg" |
|
7631 |
! |
|
7632 |
||
2375 | 7633 |
spraySpot:n |
7634 |
imageEditView spraySpot:n |
|
7635 |
||
7636 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
2881 | 7637 |
! |
7638 |
||
7639 |
spraySpotHolderChanged |
|
7640 |
imageEditView spraySpot:(self spraySpotHolder value) |
|
7641 |
||
7642 |
"Created: / 15-02-2012 / 22:37:08 / cg" |
|
1353 | 7643 |
! ! |
7644 |
||
400 | 7645 |
!ImageEditor class methodsFor:'documentation'! |
7646 |
||
7647 |
version |
|
7648 |
^ '$Header$' |
|
2590 | 7649 |
! |
7650 |
||
7651 |
version_CVS |
|
7652 |
^ '$Header$' |
|
400 | 7653 |
! ! |
2945 | 7654 |