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