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