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