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