author | Claus Gittinger <cg@exept.de> |
Sat, 13 Aug 2016 12:40:32 +0200 | |
changeset 3319 | 97fd83492529 |
parent 3317 | 88b892a4012d |
child 3331 | 7b33bd507e1c |
permissions | -rw-r--r-- |
3317 | 1 |
"{ Encoding: utf8 }" |
2 |
||
400 | 3 |
" |
767 | 4 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 5 |
All Rights Reserved |
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
405 | 9 |
inclusion of the above copyright notice. This software may not |
400 | 10 |
be provided or otherwise made available to, or used by, any |
405 | 11 |
other person. No title to or ownership of the software is |
400 | 12 |
hereby transferred. |
13 |
" |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
14 |
"{ Package: 'stx:libtool2' }" |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
15 |
|
3180 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
1975 | 18 |
ResourceSpecEditor subclass:#ImageEditor |
975 | 19 |
instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode |
1960 | 20 |
selectedColorIndex postOpenAction imageSeqNr drawingColormap |
2767 | 21 |
lastShiftUsedWrap lastGrabbedScreenArea |
22 |
allowedToChangeImageDimensionAndDepth' |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
23 |
classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode |
2796 | 24 |
DefaultRelativeSizes LastURL' |
929 | 25 |
poolDictionaries:'' |
26 |
category:'Interface-UIPainter' |
|
400 | 27 |
! |
28 |
||
29 |
!ImageEditor class methodsFor:'documentation'! |
|
30 |
||
31 |
copyright |
|
32 |
" |
|
767 | 33 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 34 |
All Rights Reserved |
35 |
||
36 |
This software is furnished under a license and may be used |
|
37 |
only in accordance with the terms of that license and with the |
|
405 | 38 |
inclusion of the above copyright notice. This software may not |
400 | 39 |
be provided or otherwise made available to, or used by, any |
405 | 40 |
other person. No title to or ownership of the software is |
400 | 41 |
hereby transferred. |
42 |
" |
|
43 |
! |
|
44 |
||
45 |
documentation |
|
46 |
" |
|
737 | 47 |
Image Editor allows you to create, design, modify or just inspect images. |
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 |
||
1975 | 64 |
openLoadingImageWith:aBlock |
65 |
"opens an Image Editor on anImage" |
|
66 |
||
67 |
|editor| |
|
68 |
||
69 |
editor := self new. |
|
70 |
editor allButOpen. |
|
71 |
aBlock value:editor. |
|
2764 | 72 |
editor openWindow. |
73 |
^ editor |
|
1975 | 74 |
! |
75 |
||
400 | 76 |
openModalOnClass: aClass andSelector: aSelector |
1975 | 77 |
"opens a modal Image Editor on aClass and aSelector. |
78 |
Returns the real name of the edited resource method (in case, user changed it)." |
|
79 |
||
80 |
|imageEditor imageEditView className resourceClass resourceSelector| |
|
767 | 81 |
|
400 | 82 |
imageEditor := self new. |
767 | 83 |
|
900 | 84 |
aClass isClass ifTrue: [className := aClass name]. |
85 |
aClass isString ifTrue: [className := aClass]. |
|
903 | 86 |
aClass isNil ifTrue: [className := '']. |
400 | 87 |
|
2764 | 88 |
imageEditor postOpenAction: [ |
89 |
imageEditView := imageEditor imageEditView. |
|
90 |
imageEditor loadFromOrPrepareForClass: aClass andSelector: aSelector |
|
91 |
]. |
|
400 | 92 |
imageEditor openModal. |
93 |
||
1975 | 94 |
resourceClass := imageEditView resourceClass. |
95 |
resourceSelector := imageEditView resourceSelector. |
|
96 |
||
97 |
(resourceClass isNil or:[resourceSelector isNil]) ifTrue:[^ nil]. |
|
98 |
^ Array with:resourceClass with:resourceSelector |
|
1966 | 99 |
|
100 |
" |
|
101 |
self openModalOnClass: self andSelector: #leftMouseKeyIcon |
|
102 |
" |
|
400 | 103 |
! |
104 |
||
2764 | 105 |
openModalOnImage:anImage |
106 |
"opens a modal Image Editor on an image. |
|
107 |
Returns the modified image or nil if unsaved/unchanged" |
|
108 |
||
109 |
|imageEditor imageEditView newImage| |
|
110 |
||
111 |
imageEditor := self new. |
|
2767 | 112 |
imageEditor allowedToChangeImageDimensionAndDepth:false. |
2764 | 113 |
imageEditor postOpenAction: [ |
114 |
imageEditView := imageEditor imageEditView. |
|
115 |
imageEditor loadFromImage: anImage |
|
116 |
]. |
|
117 |
imageEditor openModal. |
|
118 |
||
2766 | 119 |
newImage := imageEditor savedImage. |
2764 | 120 |
^ newImage |
121 |
! |
|
122 |
||
1966 | 123 |
openOnClass:aClass andSelector:aSelector |
124 |
"opens an Image Editor on aClass and aSelector" |
|
400 | 125 |
|
2764 | 126 |
self openLoadingImageWith:[:editor | |
127 |
editor loadFromClass:aClass theNonMetaclass andSelector:aSelector. |
|
128 |
] |
|
1057 | 129 |
|
1966 | 130 |
" |
131 |
self openOnClass:self andSelector:#leftMouseKeyIcon |
|
132 |
self openOnClass:self andSelector:nil |
|
133 |
" |
|
134 |
||
1057 | 135 |
"Modified: / 16.3.1999 / 21:33:49 / cg" |
400 | 136 |
! |
137 |
||
1966 | 138 |
openOnFile:aFileName |
139 |
"opens an Image Editor on aFileName" |
|
400 | 140 |
|
2764 | 141 |
self openLoadingImageWith:[:editor | |
142 |
editor loadFromFile:aFileName. |
|
143 |
] |
|
1057 | 144 |
|
1966 | 145 |
" |
1975 | 146 |
self openOnFile: '../../goodies/bitmaps/gifImages/back.gif' |
1966 | 147 |
" |
148 |
||
1057 | 149 |
"Modified: / 16.3.1999 / 21:33:25 / cg" |
400 | 150 |
! |
151 |
||
1966 | 152 |
openOnImage:anImage |
153 |
"opens an Image Editor on anImage" |
|
400 | 154 |
|
2764 | 155 |
self openLoadingImageWith:[:editor | |
156 |
editor loadFromImage: anImage. |
|
157 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
158 |
|
1966 | 159 |
" |
160 |
self openOnImage: Icon startIcon |
|
161 |
" |
|
162 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
163 |
"Modified: / 11.3.1999 / 16:18:33 / cg" |
400 | 164 |
! ! |
165 |
||
166 |
!ImageEditor class methodsFor:'accessing'! |
|
167 |
||
168 |
listOfColorMaps |
|
767 | 169 |
"returns the list of default color maps for a new image" |
400 | 170 |
|
171 |
|colorMap| |
|
898 | 172 |
|
400 | 173 |
(colorMap := OrderedCollection new) |
174 |
add: Color black; |
|
175 |
add: Color white; |
|
176 |
add: Color red; |
|
177 |
add: Color green; |
|
178 |
add: Color blue; |
|
179 |
add: Color cyan; |
|
180 |
add: Color yellow; |
|
181 |
add: Color magenta; |
|
898 | 182 |
add: (Color redByte: 127 greenByte: 0 blueByte: 0); |
183 |
add: (Color redByte: 0 greenByte: 127 blueByte: 0); |
|
184 |
add: (Color redByte: 0 greenByte: 0 blueByte: 127); |
|
185 |
add: (Color redByte: 0 greenByte: 127 blueByte: 127); |
|
186 |
add: (Color redByte: 127 greenByte: 127 blueByte: 0); |
|
187 |
add: (Color redByte: 127 greenByte: 0 blueByte: 127); |
|
188 |
add: (Color redByte: 127 greenByte: 127 blueByte: 127); |
|
189 |
add: (Color redByte: 170 greenByte: 170 blueByte: 170). |
|
190 |
||
400 | 191 |
0 to: 5 do: |
192 |
[:r| |
|
193 |
0 to: 5 do: |
|
194 |
[:g| |
|
195 |
0 to: 5 do: |
|
196 |
[:b| |
|
898 | 197 |
colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling) |
400 | 198 |
] |
199 |
] |
|
200 |
]. |
|
201 |
||
202 |
1 to: 25 do: |
|
203 |
[:g| |
|
898 | 204 |
colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling) |
400 | 205 |
]. |
206 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
207 |
^ Dictionary new |
2571 | 208 |
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
|
209 |
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
|
210 |
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
|
211 |
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
|
212 |
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
|
213 |
at: #depth8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
214 |
at: #masked8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
215 |
at: #depth4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
216 |
at: #masked4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
217 |
at: #depth2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
218 |
at: #masked2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
219 |
at: #depth1 put: (colorMap copyFrom: 1 to: 2); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
220 |
at: #masked1 put: (colorMap copyFrom: 1 to: 2); |
400 | 221 |
yourself |
222 |
! |
|
223 |
||
224 |
listOfDefaultSizes |
|
767 | 225 |
"returns the list of default sizes for a new image" |
400 | 226 |
|
1960 | 227 |
^ #('8x8' '16x16' '22x22' '32x32' '48x48' '64x64') |
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
228 |
|
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
229 |
"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
|
230 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
231 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
232 |
namesOfColorMaps |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
233 |
^ Dictionary new |
2571 | 234 |
at: #depth32 put: '32-plane (rgba)'; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
235 |
at: #depth24 put: '24-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
236 |
at: #masked24 put: '24-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
237 |
at: #depth16 put: '16-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
238 |
at: #masked16 put: '16-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
239 |
at: #depth8 put: ' 8-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
240 |
at: #masked8 put: ' 8-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
241 |
at: #depth4 put: ' 4-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
242 |
at: #masked4 put: ' 4-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
243 |
at: #depth2 put: ' 2-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
244 |
at: #masked2 put: ' 2-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
245 |
at: #depth1 put: ' 1-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
246 |
at: #masked1 put: ' 1-plane + mask' ; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
247 |
yourself |
400 | 248 |
! ! |
249 |
||
460 | 250 |
!ImageEditor class methodsFor:'help specs'! |
251 |
||
1545 | 252 |
flyByHelpSpec |
253 |
<resource: #help> |
|
254 |
||
2871 | 255 |
^super flyByHelpSpec addPairsFrom:(self localHelpTexts) |
256 |
||
257 |
"Modified: / 19-01-2012 / 13:29:48 / cg" |
|
1545 | 258 |
! |
259 |
||
460 | 260 |
helpSpec |
737 | 261 |
"This resource specification was automatically generated |
262 |
by the UIHelpTool of ST/X." |
|
263 |
||
264 |
"Do not manually edit this!! If it is corrupted, |
|
265 |
the UIHelpTool may not be able to read the specification." |
|
460 | 266 |
|
267 |
" |
|
737 | 268 |
UIHelpTool openOnClass:ImageEditor |
460 | 269 |
" |
270 |
||
737 | 271 |
<resource: #help> |
272 |
||
2871 | 273 |
^ super helpSpec addPairsFrom:(self localHelpTexts) |
274 |
||
275 |
"Modified: / 19-01-2012 / 13:29:42 / cg" |
|
276 |
! |
|
277 |
||
278 |
localHelpTexts |
|
279 |
"This resource specification was automatically generated |
|
280 |
by the UIHelpTool of ST/X." |
|
281 |
||
282 |
"Do not manually edit this!! If it is corrupted, |
|
283 |
the UIHelpTool may not be able to read the specification." |
|
284 |
||
285 |
" |
|
286 |
UIHelpTool openOnClass:ImageEditor |
|
287 |
" |
|
288 |
||
289 |
<resource: #help> |
|
290 |
||
291 |
^ #( |
|
292 |
||
293 |
#xdrawModeBox |
|
294 |
'Rectangle' |
|
295 |
||
296 |
#xdrawModeCopy |
|
297 |
'Copy' |
|
298 |
||
299 |
#xdrawModeFill |
|
300 |
'Flood-fill' |
|
301 |
||
302 |
#xdrawModeFilledBox |
|
303 |
'Filled rectangle' |
|
304 |
||
305 |
#xdrawModePaste |
|
306 |
'Paste' |
|
307 |
||
308 |
#xdrawModePasteUnder |
|
309 |
'Paste under' |
|
310 |
||
311 |
#xdrawModePasteWithMask |
|
312 |
'Paste with Mask' |
|
313 |
||
314 |
#xdrawModePoint |
|
315 |
'Point' |
|
316 |
||
317 |
#xfileGrabImage |
|
318 |
'Pick from screen' |
|
319 |
||
320 |
#xfileLoadFromClass |
|
321 |
'Load from method...' |
|
322 |
||
323 |
#xfileLoadFromFile |
|
324 |
'Load from file...' |
|
325 |
||
326 |
#xfileNewImage |
|
327 |
'New image' |
|
328 |
||
329 |
#filePrint |
|
330 |
'Print' |
|
331 |
||
332 |
#xfileSaveAs |
|
333 |
'Save to file...' |
|
334 |
||
335 |
#xfileSaveMaskAs |
|
336 |
'Save mask to file...' |
|
337 |
||
338 |
#xfileSaveMethod |
|
339 |
'Save as method' |
|
340 |
||
341 |
#xfileSaveMethodAs |
|
342 |
'Save as Method...' |
|
343 |
||
344 |
#nextImageInSequence |
|
345 |
'Go to the next image in the animated gif image sequence.' |
|
346 |
||
347 |
#previousImageInSequence |
|
348 |
'Go to the previous image in the animated gif image sequence.' |
|
460 | 349 |
|
350 |
#colorMap |
|
2765 | 351 |
'ColorMap functions' |
929 | 352 |
|
353 |
#colorMap1 |
|
2765 | 354 |
'Convert to depth-1 image' |
929 | 355 |
|
986 | 356 |
#colorMap1M |
2765 | 357 |
'Convert to depth-1 image plus mask' |
986 | 358 |
|
929 | 359 |
#colorMap2 |
2765 | 360 |
'Convert to depth-2 image' |
361 |
||
362 |
#colorMap24 |
|
363 |
'Convert to depth-24 image (rgb)' |
|
929 | 364 |
|
986 | 365 |
#colorMap2M |
2765 | 366 |
'Convert to depth-2 image plus mask' |
367 |
||
368 |
#colorMap32 |
|
369 |
'Convert to depth-32 image (rgba)' |
|
986 | 370 |
|
929 | 371 |
#colorMap4 |
2765 | 372 |
'Convert to depth-4 image' |
929 | 373 |
|
986 | 374 |
#colorMap4M |
2765 | 375 |
'Convert to depth-4 image plus mask' |
986 | 376 |
|
929 | 377 |
#colorMap8 |
2765 | 378 |
'Convert to depth-8 image' |
929 | 379 |
|
380 |
#colorMap8M |
|
2765 | 381 |
'Convert to depth-8 image plus mask' |
2571 | 382 |
|
986 | 383 |
#colorMapTable |
2765 | 384 |
'Shows a list of used colors of the image' |
986 | 385 |
|
929 | 386 |
#compressColormap |
2765 | 387 |
'Remove unneeded entries from the colorMap' |
460 | 388 |
|
1045 | 389 |
#cropAll |
2765 | 390 |
'Find and remove all borders' |
986 | 391 |
|
1045 | 392 |
#cropBottom |
2765 | 393 |
'Find and remove bottom border' |
986 | 394 |
|
1045 | 395 |
#cropLeft |
2765 | 396 |
'Find and remove left border' |
986 | 397 |
|
1045 | 398 |
#cropManual |
986 | 399 |
'Specify border(s) to remove.' |
400 |
||
1045 | 401 |
#cropRight |
2765 | 402 |
'Find and remove right border' |
986 | 403 |
|
1045 | 404 |
#cropTop |
2765 | 405 |
'Find and remove top border' |
487 | 406 |
|
460 | 407 |
#drawModeBox |
2765 | 408 |
'Rectangle Drawing Mode' |
460 | 409 |
|
2375 | 410 |
#drawModeCircle |
2765 | 411 |
'Circle Drawing Mode' |
2375 | 412 |
|
460 | 413 |
#drawModeCopy |
2765 | 414 |
'Area Copy Mode' |
460 | 415 |
|
416 |
#drawModeFill |
|
2765 | 417 |
'Flood Fill Mode' |
460 | 418 |
|
419 |
#drawModeFilledBox |
|
2765 | 420 |
'Filled Rectangle Drawing Mode' |
460 | 421 |
|
422 |
#drawModePaste |
|
2765 | 423 |
'Paste Mode' |
914 | 424 |
|
425 |
#drawModePasteUnder |
|
2765 | 426 |
'Paste-Under Mode' |
1637 | 427 |
|
428 |
#drawModePasteWithMask |
|
2765 | 429 |
'Paste-with-Mask Mode' |
460 | 430 |
|
431 |
#drawModePoint |
|
2765 | 432 |
'Point Drawing Mode' |
2375 | 433 |
|
1639 | 434 |
#drawModeSpecial |
2871 | 435 |
'Special operations (select rectangle, then choose operation)' |
1639 | 436 |
|
2765 | 437 |
#drawModeSpray |
438 |
'Spray Drawing Mode' |
|
439 |
||
460 | 440 |
#editFlipHorizontal |
2765 | 441 |
'Flip the image horizontally' |
460 | 442 |
|
443 |
#editFlipVertical |
|
2765 | 444 |
'Flip the image vertically' |
460 | 445 |
|
446 |
#editMagnifyImage |
|
2765 | 447 |
'Magnify the image' |
460 | 448 |
|
449 |
#editNegate |
|
2765 | 450 |
'Invert the images colors' |
460 | 451 |
|
452 |
#editResize |
|
2765 | 453 |
'Resize the image (preserving the old image)' |
460 | 454 |
|
455 |
#editRotate |
|
2765 | 456 |
'Rotate the image' |
460 | 457 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
458 |
#fileGrabImageFromScreen |
2765 | 459 |
'Pick an image from the screen (specify area)' |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
460 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
461 |
#fileGrabImageFromWindow |
2765 | 462 |
'Pick an image from a window on the screen (click on window)' |
929 | 463 |
|
460 | 464 |
#fileLoadFromClass |
2765 | 465 |
'Select and load an image from a resource method' |
460 | 466 |
|
467 |
#fileLoadFromFile |
|
2765 | 468 |
'Select and load an image from a file' |
460 | 469 |
|
2796 | 470 |
#fileLoadFromURL |
471 |
'Load an image from the net, given its URL' |
|
472 |
||
460 | 473 |
#fileNewImage |
914 | 474 |
'Create a new image' |
460 | 475 |
|
3200 | 476 |
#fileNewImageFromClipboard |
477 |
'Create a new image and initialize it from the clipboard' |
|
478 |
||
479 |
#fileNewMaskFromClipboard |
|
480 |
'Paste the image in the clipboard as a mask. Must be a depth-1 image' |
|
481 |
||
460 | 482 |
#filePrint |
2765 | 483 |
'Print the image on a postscript printer' |
484 |
||
485 |
#fileSave |
|
486 |
'Save the image' |
|
460 | 487 |
|
488 |
#fileSaveAs |
|
2765 | 489 |
'Save the image to a file' |
490 |
||
491 |
#fileSaveButtonImageAs |
|
492 |
'Save an image of a button with the image to a file (for html use)' |
|
460 | 493 |
|
494 |
#fileSaveMaskAs |
|
2765 | 495 |
'Save the mask of the image to a file' |
1613 | 496 |
|
460 | 497 |
#fileSaveMethod |
2765 | 498 |
'Save the image as resource method in the current class and selector' |
460 | 499 |
|
500 |
#fileSaveMethodAs |
|
2765 | 501 |
'Save the image as resource method in a class' |
460 | 502 |
|
487 | 503 |
#magnificationNumber |
2765 | 504 |
'Shows the current magnification' |
487 | 505 |
|
506 |
#magnifyImageDown |
|
2765 | 507 |
'Decrease magnification' |
487 | 508 |
|
509 |
#magnifyImageUp |
|
2765 | 510 |
'Increase magnification' |
487 | 511 |
|
512 |
#mouseKeyColorMode |
|
2765 | 513 |
'Toggle between left and right mouse button color' |
487 | 514 |
|
515 |
#previewView |
|
2765 | 516 |
'Shows a preview of the image' |
487 | 517 |
|
905 | 518 |
#settingsGridMagnification |
2765 | 519 |
'Change the grid magnification of the edit view' |
905 | 520 |
|
460 | 521 |
) |
2871 | 522 |
|
523 |
"Created: / 19-01-2012 / 13:29:31 / cg" |
|
460 | 524 |
! ! |
525 |
||
737 | 526 |
!ImageEditor class methodsFor:'image specs'! |
527 |
||
2272 | 528 |
circleIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
529 |
<resource: #image> |
2272 | 530 |
"This resource specification was automatically generated |
531 |
by the ImageEditor of ST/X." |
|
532 |
"Do not manually edit this!! If it is corrupted, |
|
533 |
the ImageEditor may not be able to read the specification." |
|
534 |
" |
|
535 |
self circleIcon inspect |
|
536 |
ImageEditor openOnClass:self andSelector:#circleIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
537 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
538 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
539 |
^ Icon constantNamed:'ImageEditor class circleIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
540 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
541 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
542 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
543 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
544 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
545 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
546 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
547 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
548 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
549 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
550 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
551 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
552 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
553 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
554 |
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
|
555 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
556 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
557 |
] |
2272 | 558 |
! |
559 |
||
1637 | 560 |
copyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
561 |
<resource: #image> |
1637 | 562 |
"This resource specification was automatically generated |
563 |
by the ImageEditor of ST/X." |
|
564 |
"Do not manually edit this!! If it is corrupted, |
|
565 |
the ImageEditor may not be able to read the specification." |
|
566 |
" |
|
567 |
self copyIcon inspect |
|
568 |
ImageEditor openOnClass:self andSelector:#copyIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
569 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
570 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
571 |
^ Icon constantNamed:'ImageEditor class copyIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
572 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
573 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
574 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
575 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
576 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
577 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
578 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
579 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
580 |
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
|
581 |
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
|
582 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
583 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
584 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
585 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
586 |
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
|
587 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
588 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
589 |
] |
1637 | 590 |
! |
591 |
||
2155 | 592 |
defaultIcon |
593 |
<resource: #programImage> |
|
594 |
||
595 |
^ ToolbarIconLibrary startImageEditorIcon |
|
596 |
! |
|
597 |
||
2871 | 598 |
fillGradientRectIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
599 |
<resource: #image> |
2871 | 600 |
"This resource specification was automatically generated |
601 |
by the ImageEditor of ST/X." |
|
602 |
"Do not manually edit this!! If it is corrupted, |
|
603 |
the ImageEditor may not be able to read the specification." |
|
604 |
" |
|
605 |
self fillGradientRectIcon inspect |
|
606 |
ImageEditor openOnClass:self andSelector:#fillGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
607 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
608 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
609 |
^ Icon constantNamed:'ImageEditor class fillGradientRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
610 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
611 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
612 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
613 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
614 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
615 |
bitsPerSample:(#[ 4 ]); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
616 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
617 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
618 |
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
|
619 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
620 |
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
|
621 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
622 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
623 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
624 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
625 |
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
|
626 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
627 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
628 |
] |
2871 | 629 |
! |
630 |
||
631 |
fillHorizontalGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
632 |
<resource: #image> |
2871 | 633 |
"This resource specification was automatically generated |
634 |
by the ImageEditor of ST/X." |
|
635 |
"Do not manually edit this!! If it is corrupted, |
|
636 |
the ImageEditor may not be able to read the specification." |
|
637 |
" |
|
638 |
self fillHorizontalGradientRectIcon inspect |
|
639 |
ImageEditor openOnClass:self andSelector:#fillHorizontalGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
640 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
641 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
642 |
^ Icon constantNamed:'ImageEditor class fillHorizontalGradientRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
643 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
644 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
645 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
646 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
647 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
648 |
bitsPerSample:(#[ 4 ]); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
649 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
650 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
651 |
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
|
652 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
653 |
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
|
654 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
655 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
656 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
657 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
658 |
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
|
659 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
660 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
661 |
] |
2871 | 662 |
! |
663 |
||
1637 | 664 |
fillIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
665 |
<resource: #image> |
1637 | 666 |
"This resource specification was automatically generated |
667 |
by the ImageEditor of ST/X." |
|
668 |
"Do not manually edit this!! If it is corrupted, |
|
669 |
the ImageEditor may not be able to read the specification." |
|
670 |
" |
|
671 |
self fillIcon inspect |
|
672 |
ImageEditor openOnClass:self andSelector:#fillIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
673 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
674 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
675 |
^ Icon constantNamed:'ImageEditor class fillIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
676 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
677 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
678 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
679 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
680 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
681 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
682 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
683 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
684 |
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
|
685 |
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
|
686 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
687 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
688 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
689 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
690 |
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
|
691 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
692 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
693 |
] |
1637 | 694 |
! |
695 |
||
696 |
fillRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
697 |
<resource: #image> |
1637 | 698 |
"This resource specification was automatically generated |
699 |
by the ImageEditor of ST/X." |
|
700 |
"Do not manually edit this!! If it is corrupted, |
|
701 |
the ImageEditor may not be able to read the specification." |
|
702 |
" |
|
703 |
self fillRectIcon inspect |
|
704 |
ImageEditor openOnClass:self andSelector:#fillRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
705 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
706 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
707 |
^ Icon constantNamed:'ImageEditor class fillRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
708 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
709 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
710 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
711 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
712 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
713 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
714 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
715 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
716 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
717 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
718 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
719 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
720 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
721 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
722 |
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
|
723 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
724 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
725 |
] |
1637 | 726 |
! |
727 |
||
2871 | 728 |
fillVerticalGradientRectIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
729 |
<resource: #image> |
2871 | 730 |
"This resource specification was automatically generated |
731 |
by the ImageEditor of ST/X." |
|
732 |
"Do not manually edit this!! If it is corrupted, |
|
733 |
the ImageEditor may not be able to read the specification." |
|
734 |
" |
|
735 |
self fillGradientRectIcon inspect |
|
736 |
ImageEditor openOnClass:self andSelector:#fillGradientRectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
737 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
738 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
739 |
^ Icon constantNamed:'ImageEditor class fillGradientRectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
740 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
741 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
742 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
743 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
744 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
745 |
bitsPerSample:(#[ 4 ]); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
746 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
747 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
748 |
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
|
749 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
750 |
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
|
751 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
752 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
753 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
754 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
755 |
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
|
756 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
757 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
758 |
] |
2871 | 759 |
|
760 |
"Created: / 19-01-2012 / 13:44:51 / cg" |
|
761 |
! |
|
762 |
||
2837 | 763 |
flipHorizontalIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
764 |
<resource: #image> |
2837 | 765 |
"This resource specification was automatically generated |
766 |
by the ImageEditor of ST/X." |
|
767 |
"Do not manually edit this!! If it is corrupted, |
|
768 |
the ImageEditor may not be able to read the specification." |
|
769 |
" |
|
770 |
self flipHorizontalIcon inspect |
|
771 |
ImageEditor openOnClass:self andSelector:#flipHorizontalIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
772 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
773 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
774 |
^ Icon constantNamed:'ImageEditor class flipHorizontalIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
775 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
776 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
777 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
778 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
779 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
780 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
781 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
782 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
783 |
fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
784 |
colorMapFromArray:#[ 0 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
785 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
786 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
787 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
788 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
789 |
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
|
790 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
791 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
792 |
] |
2837 | 793 |
! |
794 |
||
795 |
flipVerticalIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
796 |
<resource: #image> |
2837 | 797 |
"This resource specification was automatically generated |
798 |
by the ImageEditor of ST/X." |
|
799 |
"Do not manually edit this!! If it is corrupted, |
|
800 |
the ImageEditor may not be able to read the specification." |
|
801 |
" |
|
802 |
self flipVerticalIcon inspect |
|
803 |
ImageEditor openOnClass:self andSelector:#flipVerticalIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
804 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
805 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
806 |
^ Icon constantNamed:'ImageEditor class flipVerticalIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
807 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
808 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
809 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
810 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
811 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
812 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
813 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
814 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
815 |
fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
816 |
colorMapFromArray:#[ 0 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
817 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
818 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
819 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
820 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
821 |
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
|
822 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
823 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
824 |
] |
2837 | 825 |
! |
826 |
||
737 | 827 |
leftMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
828 |
<resource: #image> |
737 | 829 |
"This resource specification was automatically generated |
830 |
by the ImageEditor of ST/X." |
|
831 |
"Do not manually edit this!! If it is corrupted, |
|
832 |
the ImageEditor may not be able to read the specification." |
|
833 |
" |
|
1405 | 834 |
self leftMouseKeyIcon inspect |
737 | 835 |
ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
836 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
837 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
838 |
^ Icon constantNamed:'ImageEditor class leftMouseKeyIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
839 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
840 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
841 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
842 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
843 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
844 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
845 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
846 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
847 |
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
|
848 |
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
|
849 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
850 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
851 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
852 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
853 |
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
|
854 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
855 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
856 |
] |
1433 | 857 |
! |
737 | 858 |
|
1637 | 859 |
pasteIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
860 |
<resource: #image> |
1637 | 861 |
"This resource specification was automatically generated |
862 |
by the ImageEditor of ST/X." |
|
863 |
"Do not manually edit this!! If it is corrupted, |
|
864 |
the ImageEditor may not be able to read the specification." |
|
865 |
" |
|
866 |
self pasteIcon inspect |
|
867 |
ImageEditor openOnClass:self andSelector:#pasteIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
868 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
869 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
870 |
^ Icon constantNamed:'ImageEditor class pasteIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
871 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
872 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
873 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
874 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
875 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
876 |
bitsPerSample:(#( 4 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
877 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
878 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
879 |
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
|
880 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
881 |
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
|
882 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
883 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
884 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
885 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
886 |
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
|
887 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
888 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
889 |
] |
1637 | 890 |
! |
891 |
||
892 |
pasteUnderIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
893 |
<resource: #image> |
1637 | 894 |
"This resource specification was automatically generated |
895 |
by the ImageEditor of ST/X." |
|
896 |
"Do not manually edit this!! If it is corrupted, |
|
897 |
the ImageEditor may not be able to read the specification." |
|
898 |
" |
|
899 |
self pasteUnderIcon inspect |
|
900 |
ImageEditor openOnClass:self andSelector:#pasteUnderIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
901 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
902 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
903 |
^ Icon constantNamed:'ImageEditor class pasteUnderIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
904 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
905 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
906 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
907 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
908 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
909 |
bitsPerSample:(#( 4 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
910 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
911 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
912 |
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
|
913 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
914 |
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
|
915 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
916 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
917 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
918 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
919 |
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
|
920 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
921 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
922 |
] |
1637 | 923 |
! |
924 |
||
925 |
pasteWithMaskIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
926 |
<resource: #image> |
1637 | 927 |
"This resource specification was automatically generated |
928 |
by the ImageEditor of ST/X." |
|
929 |
"Do not manually edit this!! If it is corrupted, |
|
930 |
the ImageEditor may not be able to read the specification." |
|
931 |
" |
|
932 |
self pasteWithMaskIcon inspect |
|
933 |
ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
934 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
935 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
936 |
^ Icon constantNamed:'ImageEditor class pasteWithMaskIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
937 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
938 |
(Depth4Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
939 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
940 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
941 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
942 |
bitsPerSample:(#( 4 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
943 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
944 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
945 |
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
|
946 |
@@@@@@@@@@@b'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
947 |
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
|
948 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
949 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
950 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
951 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
952 |
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
|
953 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
954 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
955 |
] |
1637 | 956 |
! |
957 |
||
958 |
pointIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
959 |
<resource: #image> |
1637 | 960 |
"This resource specification was automatically generated |
961 |
by the ImageEditor of ST/X." |
|
962 |
"Do not manually edit this!! If it is corrupted, |
|
963 |
the ImageEditor may not be able to read the specification." |
|
964 |
" |
|
965 |
self pointIcon inspect |
|
966 |
ImageEditor openOnClass:self andSelector:#pointIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
967 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
968 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
969 |
^ Icon constantNamed:'ImageEditor class pointIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
970 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
971 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
972 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
973 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
974 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
975 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
976 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
977 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
978 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
979 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
980 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
981 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
982 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
983 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
984 |
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
|
985 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
986 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
987 |
] |
1637 | 988 |
! |
989 |
||
990 |
rectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
991 |
<resource: #image> |
1637 | 992 |
"This resource specification was automatically generated |
993 |
by the ImageEditor of ST/X." |
|
994 |
"Do not manually edit this!! If it is corrupted, |
|
995 |
the ImageEditor may not be able to read the specification." |
|
996 |
" |
|
997 |
self rectIcon inspect |
|
998 |
ImageEditor openOnClass:self andSelector:#rectIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
999 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1000 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1001 |
^ Icon constantNamed:'ImageEditor class rectIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1002 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1003 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1004 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1005 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1006 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1007 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1008 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1009 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1010 |
fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a'); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1011 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1012 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1013 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1014 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1015 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1016 |
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
|
1017 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1018 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1019 |
] |
1637 | 1020 |
! |
1021 |
||
737 | 1022 |
rightMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1023 |
<resource: #image> |
737 | 1024 |
"This resource specification was automatically generated |
1025 |
by the ImageEditor of ST/X." |
|
1026 |
"Do not manually edit this!! If it is corrupted, |
|
1027 |
the ImageEditor may not be able to read the specification." |
|
1028 |
" |
|
1405 | 1029 |
self rightMouseKeyIcon inspect |
737 | 1030 |
ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1031 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1032 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1033 |
^ Icon constantNamed:'ImageEditor class rightMouseKeyIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1034 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1035 |
(Depth2Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1036 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1037 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1038 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1039 |
bitsPerSample:(#( 2 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1040 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1041 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1042 |
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
|
1043 |
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
|
1044 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1045 |
width:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1046 |
height:16; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1047 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1048 |
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
|
1049 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1050 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1051 |
] |
1637 | 1052 |
! |
1053 |
||
3191 | 1054 |
smoothIcon |
1055 |
"This resource specification was automatically generated |
|
1056 |
by the ImageEditor of ST/X." |
|
1057 |
||
1058 |
"Do not manually edit this!! If it is corrupted, |
|
1059 |
the ImageEditor may not be able to read the specification." |
|
1060 |
||
1061 |
" |
|
1062 |
self smoothIcon inspect |
|
1063 |
ImageEditor openOnClass:self andSelector:#smoothIcon |
|
1064 |
Icon flushCachedIcons |
|
1065 |
" |
|
1066 |
||
1067 |
<resource: #image> |
|
1068 |
||
1069 |
^Icon |
|
1070 |
constantNamed:'ImageEditor smoothIcon' |
|
1071 |
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@@@@@@@@ |
|
1072 |
@@@@@@@@@@@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] |
|
1073 |
! |
|
1074 |
||
2881 | 1075 |
specialCircleIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1076 |
<resource: #image> |
2881 | 1077 |
"This resource specification was automatically generated |
1078 |
by the ImageEditor of ST/X." |
|
1079 |
"Do not manually edit this!! If it is corrupted, |
|
1080 |
the ImageEditor may not be able to read the specification." |
|
1081 |
" |
|
1082 |
self specialCircleIcon inspect |
|
1083 |
ImageEditor openOnClass:self andSelector:#specialCircleIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1084 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1085 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1086 |
^ Icon constantNamed:'ImageEditor class specialCircleIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1087 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1088 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1089 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1090 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1091 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1092 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1093 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1094 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1095 |
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
|
1096 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1097 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1098 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1099 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1100 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1101 |
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
|
1102 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1103 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1104 |
] |
2881 | 1105 |
! |
1106 |
||
1637 | 1107 |
specialIcon |
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1108 |
<resource: #image> |
1637 | 1109 |
"This resource specification was automatically generated |
1110 |
by the ImageEditor of ST/X." |
|
1111 |
"Do not manually edit this!! If it is corrupted, |
|
1112 |
the ImageEditor may not be able to read the specification." |
|
1113 |
" |
|
1114 |
self specialIcon inspect |
|
1115 |
ImageEditor openOnClass:self andSelector:#specialIcon |
|
3121
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1116 |
Icon flushCachedIcons" |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1117 |
|
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1118 |
^ Icon constantNamed:'ImageEditor class specialIcon' |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1119 |
ifAbsentPut:[ |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1120 |
(Depth1Image new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1121 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1122 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1123 |
photometric:(#palette); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1124 |
bitsPerSample:(#( 1 )); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1125 |
samplesPerPixel:(1); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1126 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1127 |
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
|
1128 |
colorMapFromArray:#[ 0 0 0 255 0 0 ]; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1129 |
mask:((ImageMask new) |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1130 |
width:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1131 |
height:14; |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1132 |
bits:(ByteArray |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1133 |
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
|
1134 |
yourself); |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1135 |
yourself |
b88abf599041
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3103
diff
changeset
|
1136 |
] |
2375 | 1137 |
! |
1138 |
||
1139 |
sprayIcon |
|
1140 |
"This resource specification was automatically generated |
|
1141 |
by the ImageEditor of ST/X." |
|
3191 | 1142 |
|
2375 | 1143 |
"Do not manually edit this!! If it is corrupted, |
1144 |
the ImageEditor may not be able to read the specification." |
|
3191 | 1145 |
|
2375 | 1146 |
" |
1147 |
self sprayIcon inspect |
|
1148 |
ImageEditor openOnClass:self andSelector:#sprayIcon |
|
3191 | 1149 |
Icon flushCachedIcons |
1150 |
" |
|
1151 |
||
1152 |
<resource: #image> |
|
1153 |
||
1154 |
^Icon |
|
1155 |
constantNamed:'ImageEditor sprayIcon' |
|
1156 |
ifAbsentPut:[(Depth4Image new) width:14; height:14; bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@DA@P@@@@@PDA@@@@@@@PDA@@@@@@@PD@@@@"H@@PD@@@H"@@@@@@@ADP@@@@@@@QD@@@@@@@DQ@@@@@@@ADP@@ |
|
1157 |
@@@@@@@@@@@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 | 1158 |
! ! |
737 | 1159 |
|
400 | 1160 |
!ImageEditor class methodsFor:'interface specs'! |
1161 |
||
1650 | 1162 |
changeHLSDialogSpec |
1163 |
"This resource specification was automatically generated |
|
1164 |
by the UIPainter of ST/X." |
|
1165 |
||
1166 |
"Do not manually edit this!! If it is corrupted, |
|
1167 |
the UIPainter may not be able to read the specification." |
|
1168 |
||
1169 |
" |
|
1170 |
UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec |
|
1171 |
ImageEditor new openInterface:#changeHLSDialogSpec |
|
1172 |
" |
|
1173 |
||
1174 |
<resource: #canvas> |
|
1175 |
||
1176 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1177 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1178 |
name: changeHLSDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1179 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1180 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1181 |
label: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1182 |
name: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1183 |
min: (Point 10 10) |
2438 | 1184 |
bounds: (Rectangle 0 0 312 258) |
1650 | 1185 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1186 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1187 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1188 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1189 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1190 |
label: 'Hue-Shift:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1191 |
name: 'HueLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1192 |
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
|
1193 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1194 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1195 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1196 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1197 |
name: 'HueShiftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1198 |
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
|
1199 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1200 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1201 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1202 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1203 |
maxValue: 360 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1204 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1205 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1206 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1207 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1208 |
name: 'HueWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1209 |
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
|
1210 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1211 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1212 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1213 |
endlessRotation: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1214 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1215 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1216 |
label: 'Light Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1217 |
name: 'LightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1218 |
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
|
1219 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1220 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1221 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1222 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1223 |
name: 'LightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1224 |
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
|
1225 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1226 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1227 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1228 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1229 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1230 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1231 |
acceptOnPointerLeave: false |
1650 | 1232 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1233 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1234 |
name: 'LightWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1235 |
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
|
1236 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1237 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1238 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1239 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1240 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1241 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1242 |
label: 'Saturation Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1243 |
name: 'SaturationLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1244 |
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
|
1245 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1246 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1247 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1248 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1249 |
name: 'SaturationEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1250 |
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
|
1251 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1252 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1253 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1254 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1255 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1256 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1257 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1258 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1259 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1260 |
name: 'SaturationWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1261 |
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
|
1262 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1263 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1264 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1265 |
step: 1 |
1650 | 1266 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1267 |
(LabelSpec |
2438 | 1268 |
label: 'Color Shift' |
1269 |
name: 'Label2' |
|
1270 |
layout: (LayoutFrame 5 0 110 0 -15 0.5 132 0) |
|
1271 |
translateLabel: true |
|
1272 |
) |
|
1273 |
(LabelSpec |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1274 |
name: 'HueColorLabel' |
2438 | 1275 |
layout: (LayoutFrame 18 0.0 133 0 -41 0.5 217 0) |
1276 |
level: -1 |
|
1975 | 1277 |
backgroundChannel: hlsColor |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1278 |
translateLabel: true |
1650 | 1279 |
) |
2438 | 1280 |
(LabelSpec |
1281 |
label: 'Preview' |
|
1282 |
name: 'Label3' |
|
1283 |
layout: (LayoutFrame 5 0.5 110 0 -5 1 132 0) |
|
1284 |
translateLabel: true |
|
1285 |
) |
|
1286 |
(LabelSpec |
|
1287 |
name: 'PreviewLabel' |
|
1288 |
layout: (LayoutFrame 36 0.5 133 0 -23 1.0 217 0) |
|
1289 |
level: -1 |
|
1290 |
translateLabel: true |
|
1291 |
labelChannel: previewImageHolder |
|
1292 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1293 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1294 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1295 |
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
|
1296 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1297 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1298 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1299 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1300 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1301 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1302 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1303 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1304 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1305 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1306 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1307 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1308 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1309 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1310 |
extent: (Point 151 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1311 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1312 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1313 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1314 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1315 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1316 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1317 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1318 |
extent: (Point 152 22) |
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 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1321 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1322 |
) |
1650 | 1323 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1324 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1325 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1326 |
) |
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 |
! |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1329 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1330 |
cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1331 |
"This resource specification was automatically generated |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1332 |
by the UIPainter of ST/X." |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1333 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1334 |
"Do not manually edit this!! If it is corrupted, |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1335 |
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
|
1336 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1337 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1338 |
UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1339 |
ImageEditor new openInterface:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1340 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1341 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1342 |
<resource: #canvas> |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1343 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1344 |
^ |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1345 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1346 |
name: cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1347 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1348 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1349 |
label: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1350 |
name: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1351 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1352 |
bounds: (Rectangle 14 46 259 229) |
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 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1355 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1356 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1357 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1358 |
label: 'Left:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1359 |
name: 'GropLeftLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1360 |
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
|
1361 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1362 |
adjust: right |
1650 | 1363 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1364 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1365 |
name: 'GropLeftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1366 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1367 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1368 |
model: left |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1369 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1370 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1371 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1372 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1373 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1374 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1375 |
name: 'GropLeftNowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1376 |
layout: (LayoutFrame 148 0 21 0 221 0 43 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1377 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1378 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1379 |
model: gropLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1380 |
autoRepeat: true |
1650 | 1381 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1382 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1383 |
label: 'Right:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1384 |
name: 'GropRightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1385 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1386 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1387 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1388 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1389 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1390 |
name: 'GropRightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1391 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1392 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1393 |
model: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1394 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1395 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1396 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1397 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1398 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1399 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1400 |
name: 'GropRightButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1401 |
layout: (LayoutFrame 148 0 51 0 221 0 73 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1402 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1403 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1404 |
model: gropRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1405 |
autoRepeat: true |
1650 | 1406 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1407 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1408 |
label: 'Top:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1409 |
name: 'GropTopLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1410 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1411 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1412 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1413 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1414 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1415 |
name: 'GropTopEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1416 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1417 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1418 |
model: top |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1419 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1420 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1421 |
acceptOnPointerLeave: false |
1650 | 1422 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1423 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1424 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1425 |
name: 'GropTopButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1426 |
layout: (LayoutFrame 148 0 81 0 221 0 103 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1427 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1428 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1429 |
model: gropTopNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1430 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1431 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1432 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1433 |
label: 'Bottom:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1434 |
name: 'GropBottomLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1435 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1436 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1437 |
adjust: right |
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 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1440 |
name: 'GropBottomEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1441 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1442 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1443 |
model: bottom |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1444 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1445 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1446 |
acceptOnPointerLeave: false |
1650 | 1447 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1448 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1449 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1450 |
name: 'GropBottomButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1451 |
layout: (LayoutFrame 148 0 111 0 221 0 133 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1452 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1453 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1454 |
model: gropBottomNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1455 |
autoRepeat: true |
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 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1458 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1459 |
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
|
1460 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1461 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1462 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1463 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1464 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1465 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1466 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1467 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1468 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1469 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1470 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1471 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1472 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1473 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1474 |
extent: (Point 77 22) |
1650 | 1475 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1476 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1477 |
label: 'Apply' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1478 |
name: 'Button3' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1479 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1480 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1481 |
model: applyAction |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1482 |
extent: (Point 78 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1483 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1484 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1485 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1486 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1487 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1488 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1489 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1490 |
extent: (Point 78 22) |
1650 | 1491 |
) |
1492 |
) |
|
1493 |
||
1494 |
) |
|
1495 |
) |
|
1496 |
) |
|
1497 |
||
1498 |
) |
|
1499 |
) |
|
1500 |
! |
|
1501 |
||
767 | 1502 |
dialogSpecForNewImage |
737 | 1503 |
"This resource specification was automatically generated |
1504 |
by the UIPainter of ST/X." |
|
519 | 1505 |
|
737 | 1506 |
"Do not manually edit this!! If it is corrupted, |
1507 |
the UIPainter may not be able to read the specification." |
|
519 | 1508 |
|
1509 |
" |
|
767 | 1510 |
UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage |
1511 |
ImageEditor new openInterface:#dialogSpecForNewImage |
|
519 | 1512 |
" |
1513 |
||
1514 |
<resource: #canvas> |
|
1515 |
||
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1516 |
^ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1517 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1518 |
name: dialogSpecForNewImage |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1519 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1520 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1521 |
label: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1522 |
name: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1523 |
min: (Point 10 10) |
1806 | 1524 |
bounds: (Rectangle 0 0 301 119) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1525 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1526 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1527 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1528 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1529 |
(ViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1530 |
name: 'View' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1531 |
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
|
1532 |
level: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1533 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1534 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1535 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1536 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1537 |
label: 'Size' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1538 |
name: 'framedBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1539 |
layout: (LayoutFrame 1 0.0 7 0.0 0 0.4 76 0) |
1806 | 1540 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1541 |
labelPosition: topLeft |
1806 | 1542 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1543 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1544 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1545 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1546 |
(ComboBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1547 |
name: 'defaultSizesComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1548 |
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
|
1549 |
model: selectionOfSize |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1550 |
type: string |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1551 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1552 |
comboList: listOfDefaultSizes |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1553 |
isFilenameBox: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1554 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1555 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1556 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1557 |
) |
1490 | 1558 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1559 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1560 |
label: 'Color Map' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1561 |
name: 'framedBox2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1562 |
layout: (LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0) |
1806 | 1563 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1564 |
labelPosition: topLeft |
1806 | 1565 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1566 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1567 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1568 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1569 |
(ComboListSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1570 |
name: 'colorMapComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1571 |
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
|
1572 |
model: selectionOfColorMap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1573 |
comboList: listOfColorMaps |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1574 |
useIndex: false |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1575 |
hidePullDownMenuButton: false |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1576 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1577 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1578 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1579 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1580 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1581 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1582 |
|
986 | 1583 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1584 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1585 |
(UISubSpecification |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1586 |
name: 'windowSpecForCommitWithoutChannels' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1587 |
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
|
1588 |
minorKey: windowSpecForCommitWithoutChannels |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1589 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1590 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1591 |
|
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1592 |
) |
986 | 1593 |
) |
1594 |
! |
|
1595 |
||
1557 | 1596 |
shiftDialogSpec |
1597 |
"This resource specification was automatically generated |
|
1598 |
by the UIPainter of ST/X." |
|
1599 |
||
1600 |
"Do not manually edit this!! If it is corrupted, |
|
1601 |
the UIPainter may not be able to read the specification." |
|
1602 |
||
1603 |
" |
|
1604 |
UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec |
|
1605 |
ImageEditor new openInterface:#shiftDialogSpec |
|
1606 |
" |
|
1607 |
||
1608 |
<resource: #canvas> |
|
1609 |
||
1610 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1611 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1612 |
name: shiftDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1613 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1614 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1615 |
label: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1616 |
name: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1617 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1618 |
bounds: (Rectangle 14 46 259 229) |
1557 | 1619 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1620 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1621 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1622 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1623 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1624 |
label: 'Amount:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1625 |
name: 'AmountLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1626 |
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
|
1627 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1628 |
adjust: right |
1557 | 1629 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1630 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1631 |
name: 'AmountEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1632 |
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
|
1633 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1634 |
model: shiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1635 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1636 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1637 |
acceptOnPointerLeave: false |
1557 | 1638 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1639 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1640 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1641 |
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
|
1642 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1643 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1644 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1645 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1646 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1647 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1648 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1649 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1650 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1651 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1652 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1653 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1654 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1655 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1656 |
extent: (Point 118 22) |
1557 | 1657 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1658 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1659 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1660 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1661 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1662 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1663 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1664 |
extent: (Point 118 22) |
1557 | 1665 |
) |
1666 |
) |
|
1667 |
||
1668 |
) |
|
1669 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1670 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1671 |
name: 'upArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1672 |
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
|
1673 |
model: shiftUpNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1674 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1675 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1676 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1677 |
direction: up |
1557 | 1678 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1679 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1680 |
name: 'leftArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1681 |
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
|
1682 |
model: shiftLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1683 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1684 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1685 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1686 |
direction: left |
1557 | 1687 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1688 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1689 |
name: 'rightArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1690 |
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
|
1691 |
model: shiftRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1692 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1693 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1694 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1695 |
direction: right |
1557 | 1696 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1697 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1698 |
name: 'downArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1699 |
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
|
1700 |
model: shiftDownNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1701 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1702 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1703 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1704 |
direction: down |
1557 | 1705 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1706 |
(CheckBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1707 |
label: 'Wrap' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1708 |
name: 'CheckBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1709 |
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
|
1710 |
model: wrap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1711 |
translateLabel: true |
1713 | 1712 |
) |
1557 | 1713 |
) |
1714 |
||
1715 |
) |
|
1716 |
) |
|
1717 |
! |
|
1718 |
||
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1719 |
uncropDialogSpec |
1480 | 1720 |
"This resource specification was automatically generated |
1721 |
by the UIPainter of ST/X." |
|
1796 | 1722 |
|
1480 | 1723 |
"Do not manually edit this!! If it is corrupted, |
1724 |
the UIPainter may not be able to read the specification." |
|
1796 | 1725 |
|
1480 | 1726 |
" |
1796 | 1727 |
UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec |
1728 |
ImageEditor new openInterface:#uncropDialogSpec |
|
1480 | 1729 |
" |
1796 | 1730 |
|
1731 |
<resource: #canvas> |
|
1732 |
||
1733 |
^ |
|
1734 |
#(FullSpec |
|
1735 |
name: uncropDialogSpec |
|
1736 |
window: |
|
1737 |
(WindowSpec |
|
1738 |
label: 'Add Border(s)' |
|
1739 |
name: 'Add Border(s)' |
|
1740 |
min: (Point 10 10) |
|
1741 |
max: (Point 800 478) |
|
1742 |
bounds: (Rectangle 0 0 261 228) |
|
1743 |
) |
|
1744 |
component: |
|
1745 |
(SpecCollection |
|
1746 |
collection: ( |
|
1747 |
(LabelSpec |
|
1748 |
label: 'Left:' |
|
1749 |
name: 'Label1' |
|
1750 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
|
1751 |
translateLabel: true |
|
1752 |
adjust: right |
|
1753 |
) |
|
1754 |
(InputFieldSpec |
|
1755 |
name: 'EntryField1' |
|
1756 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
|
1757 |
model: left |
|
1758 |
type: number |
|
1759 |
acceptOnPointerLeave: false |
|
1760 |
) |
|
1761 |
(LabelSpec |
|
1762 |
label: 'Right:' |
|
1763 |
name: 'Label2' |
|
1764 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
|
1765 |
translateLabel: true |
|
1766 |
adjust: right |
|
1767 |
) |
|
1768 |
(InputFieldSpec |
|
1769 |
name: 'EntryField2' |
|
1770 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
|
1771 |
model: right |
|
1772 |
type: number |
|
1773 |
acceptOnPointerLeave: false |
|
1774 |
) |
|
1775 |
(LabelSpec |
|
1776 |
label: 'Top:' |
|
1777 |
name: 'Label3' |
|
1778 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
|
1779 |
translateLabel: true |
|
1780 |
adjust: right |
|
1781 |
) |
|
1782 |
(InputFieldSpec |
|
1783 |
name: 'EntryField3' |
|
1784 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
|
1785 |
model: top |
|
1786 |
type: number |
|
1787 |
acceptOnPointerLeave: false |
|
1788 |
) |
|
1789 |
(LabelSpec |
|
1790 |
label: 'Bottom:' |
|
1791 |
name: 'Label4' |
|
1792 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
|
1793 |
translateLabel: true |
|
1794 |
adjust: right |
|
1795 |
) |
|
1796 |
(InputFieldSpec |
|
1797 |
name: 'EntryField4' |
|
1798 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
|
1799 |
model: bottom |
|
1800 |
type: number |
|
1801 |
acceptOnPointerLeave: false |
|
1802 |
) |
|
1803 |
(HorizontalPanelViewSpec |
|
1804 |
name: 'HorizontalPanel1' |
|
1805 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
|
1806 |
horizontalLayout: fitSpace |
|
1807 |
verticalLayout: center |
|
1808 |
horizontalSpace: 3 |
|
1809 |
verticalSpace: 3 |
|
1810 |
reverseOrderIfOKAtLeft: true |
|
1811 |
component: |
|
1812 |
(SpecCollection |
|
1813 |
collection: ( |
|
1814 |
(ActionButtonSpec |
|
1815 |
label: 'Cancel' |
|
1816 |
name: 'Button1' |
|
1817 |
translateLabel: true |
|
1818 |
model: cancel |
|
1819 |
extent: (Point 118 22) |
|
1820 |
) |
|
1821 |
(ActionButtonSpec |
|
1822 |
label: 'OK' |
|
1823 |
name: 'Button2' |
|
1824 |
translateLabel: true |
|
1825 |
model: accept |
|
1826 |
extent: (Point 118 22) |
|
1827 |
) |
|
1828 |
) |
|
1829 |
||
1830 |
) |
|
1831 |
) |
|
1832 |
) |
|
1833 |
||
1834 |
) |
|
1835 |
) |
|
1480 | 1836 |
! |
1837 |
||
767 | 1838 |
windowSpec |
1839 |
"This resource specification was automatically generated |
|
1840 |
by the UIPainter of ST/X." |
|
1841 |
||
1842 |
"Do not manually edit this!! If it is corrupted, |
|
1843 |
the UIPainter may not be able to read the specification." |
|
1844 |
||
1845 |
" |
|
1846 |
UIPainter new openOnClass:ImageEditor andSelector:#windowSpec |
|
1847 |
ImageEditor new openInterface:#windowSpec |
|
1848 |
ImageEditor open |
|
1849 |
" |
|
1850 |
||
1851 |
<resource: #canvas> |
|
1852 |
||
1558 | 1853 |
^ |
3195 | 1854 |
#(FullSpec |
1855 |
name: windowSpec |
|
1856 |
window: |
|
1857 |
(WindowSpec |
|
1858 |
label: 'Image Editor' |
|
1859 |
name: 'Image Editor' |
|
1860 |
min: (Point 400 320) |
|
1861 |
bounds: (Rectangle 0 0 450 350) |
|
1862 |
menu: menu |
|
1863 |
icon: defaultIcon |
|
1864 |
) |
|
1865 |
component: |
|
1866 |
(SpecCollection |
|
1867 |
collection: ( |
|
1868 |
(MenuPanelSpec |
|
1869 |
name: 'menuToolbarView' |
|
1870 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1871 |
style: (FontDescription helvetica medium roman 10) |
|
1872 |
menu: menuToolbar |
|
1873 |
showSeparatingLines: true |
|
1874 |
) |
|
1875 |
(VariableHorizontalPanelSpec |
|
1876 |
name: 'mainPanel' |
|
1877 |
layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
1878 |
snapMode: both |
|
1879 |
barLevel: 0 |
|
1880 |
component: |
|
1881 |
(SpecCollection |
|
1882 |
collection: ( |
|
1883 |
(ViewSpec |
|
1884 |
name: 'leftView' |
|
1885 |
level: 1 |
|
1886 |
component: |
|
1887 |
(SpecCollection |
|
1888 |
collection: ( |
|
1889 |
(VariableVerticalPanelSpec |
|
1890 |
name: 'verticalPanel' |
|
1891 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1892 |
level: 0 |
|
1893 |
snapMode: both |
|
1894 |
component: |
|
1895 |
(SpecCollection |
|
1896 |
collection: ( |
|
1897 |
(ViewSpec |
|
1898 |
name: 'View1' |
|
1899 |
component: |
|
1900 |
(SpecCollection |
|
1901 |
collection: ( |
|
1902 |
(MenuPanelSpec |
|
1903 |
name: 'MouseButtonColorToolBar' |
|
1904 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
1905 |
level: 0 |
|
1906 |
menu: menuMouseButtonColors |
|
1558 | 1907 |
) |
3195 | 1908 |
(DataSetSpec |
1909 |
name: 'colorDataSetView' |
|
1910 |
layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
1911 |
activeHelpKey: colorMapTable |
|
1912 |
style: (FontDescription helvetica medium roman 10) |
|
1913 |
model: selectedColors |
|
1914 |
menu: colorMapMenu |
|
1915 |
hasHorizontalScrollBar: true |
|
1916 |
hasVerticalScrollBar: true |
|
1917 |
miniScrollerHorizontal: true |
|
1918 |
miniScrollerVertical: true |
|
1919 |
dataList: listOfColors |
|
1920 |
has3Dseparators: true |
|
1921 |
doubleClickSelector: doubleClickOnColor: |
|
1922 |
columnHolder: colorTableColumns |
|
1923 |
multipleSelectOk: true |
|
1924 |
verticalSpacing: 1 |
|
1925 |
columnAdaptor: colorColumnAdaptor |
|
1926 |
) |
|
1927 |
) |
|
1928 |
||
1929 |
) |
|
1558 | 1930 |
) |
3195 | 1931 |
(ArbitraryComponentSpec |
1932 |
name: 'imagePreView' |
|
1933 |
activeHelpKey: previewView |
|
1934 |
menu: previewMenu |
|
1935 |
hasHorizontalScrollBar: true |
|
1936 |
hasVerticalScrollBar: true |
|
1937 |
miniScrollerHorizontal: false |
|
1938 |
miniScrollerVertical: false |
|
1939 |
hasBorder: false |
|
1940 |
component: ImageView |
|
1941 |
) |
|
1942 |
) |
|
1943 |
||
1944 |
) |
|
1945 |
handles: (Any 0.5 1.0) |
|
1558 | 1946 |
) |
3195 | 1947 |
) |
1948 |
||
1949 |
) |
|
1950 |
) |
|
1951 |
(ViewSpec |
|
1952 |
name: 'rightView' |
|
1953 |
component: |
|
1954 |
(SpecCollection |
|
1955 |
collection: ( |
|
1956 |
(MenuPanelSpec |
|
1957 |
name: 'ToolBar1' |
|
1958 |
layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0) |
|
1959 |
level: 1 |
|
1960 |
menu: toolsMenuToolbar |
|
1961 |
verticalLayout: true |
|
1962 |
centerItems: true |
|
1963 |
textDefault: true |
|
1964 |
) |
|
1965 |
(ViewSpec |
|
1966 |
name: 'editingView' |
|
1967 |
layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0) |
|
1968 |
level: 1 |
|
1969 |
component: |
|
1970 |
(SpecCollection |
|
1971 |
collection: ( |
|
1972 |
(ArbitraryComponentSpec |
|
1973 |
name: 'imageEditView' |
|
1974 |
layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0) |
|
1975 |
hasHorizontalScrollBar: true |
|
1976 |
hasVerticalScrollBar: true |
|
1977 |
hasBorder: false |
|
1978 |
component: ImageEditView |
|
1979 |
) |
|
1980 |
(LabelSpec |
|
1981 |
name: 'coordLabel' |
|
1982 |
layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0) |
|
1983 |
level: -1 |
|
1984 |
translateLabel: true |
|
1985 |
labelChannel: imageInfoHolder |
|
1986 |
resizeForLabel: false |
|
1987 |
adjust: left |
|
1637 | 1988 |
) |
3195 | 1989 |
(ArrowButtonSpec |
1990 |
name: 'magnifyDownButton' |
|
1991 |
layout: (LayoutFrame -80 1 -22 1 -58 1 0 1) |
|
1992 |
activeHelpKey: magnifyImageDown |
|
1993 |
translateLabel: true |
|
1994 |
model: doMagnifyDown |
|
1995 |
enableChannel: imageIsLoadedHolder |
|
1996 |
isTriggerOnDown: true |
|
1997 |
direction: left |
|
1998 |
) |
|
1999 |
(ArrowButtonSpec |
|
2000 |
name: 'magnifyUpButton' |
|
2001 |
layout: (LayoutFrame -24 1 -22 1 -2 1 0 1) |
|
2002 |
activeHelpKey: magnifyImageUp |
|
2003 |
translateLabel: true |
|
2004 |
model: doMagnifyUp |
|
2005 |
enableChannel: imageIsLoadedHolder |
|
2006 |
isTriggerOnDown: true |
|
2007 |
direction: right |
|
2008 |
) |
|
2009 |
(InputFieldSpec |
|
2010 |
name: 'magnificationInputField' |
|
2011 |
layout: (LayoutFrame -57 1 -22 1 -26 1 0 1) |
|
2012 |
activeHelpKey: magnificationNumber |
|
2013 |
enableChannel: imageIsLoadedHolder |
|
2014 |
model: magnificationHolder |
|
2015 |
type: numberInRange |
|
2016 |
acceptOnReturn: true |
|
2017 |
acceptOnTab: true |
|
2018 |
numChars: 2 |
|
2019 |
minValue: 1 |
|
2020 |
maxValue: 99 |
|
2021 |
acceptOnPointerLeave: true |
|
2022 |
) |
|
2023 |
) |
|
2024 |
||
2025 |
) |
|
1558 | 2026 |
) |
3195 | 2027 |
) |
2028 |
||
2029 |
) |
|
1558 | 2030 |
) |
3195 | 2031 |
) |
2032 |
||
2033 |
) |
|
2034 |
handles: (Any 0.28888900000000006 1.0) |
|
1558 | 2035 |
) |
3195 | 2036 |
(UISubSpecification |
2037 |
name: 'infoBarSubSpec' |
|
2038 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
2039 |
majorKey: ToolApplicationModel |
|
2040 |
minorKey: windowSpecForInfoBar |
|
2041 |
) |
|
2042 |
) |
|
2043 |
||
2044 |
) |
|
2045 |
) |
|
519 | 2046 |
! ! |
2047 |
||
2048 |
!ImageEditor class methodsFor:'menu specs'! |
|
2049 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2050 |
colorMapMenu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2051 |
"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
|
2052 |
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
|
2053 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2054 |
"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
|
2055 |
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
|
2056 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2057 |
" |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2058 |
MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2059 |
(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
|
2060 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2061 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2062 |
<resource: #menu> |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2063 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2064 |
^ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2065 |
#(Menu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2066 |
( |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2067 |
(MenuItem |
2792 | 2068 |
enabled: hasColormapHolder |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2069 |
label: 'Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2070 |
itemValue: addColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2071 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2072 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2073 |
(MenuItem |
2792 | 2074 |
enabled: hasColormapHolder |
2539 | 2075 |
label: 'Pick and Add Color...' |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2076 |
itemValue: pickAndAddColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2077 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2078 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2079 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2080 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2081 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2082 |
(MenuItem |
3195 | 2083 |
enabled: hasColormapAndSingleColorSelected |
1852 | 2084 |
label: 'Cut Color' |
2085 |
itemValue: cutColorFromColormap |
|
2086 |
translateLabel: true |
|
2087 |
isVisible: false |
|
2088 |
) |
|
2089 |
(MenuItem |
|
3195 | 2090 |
enabled: hasSingleColorSelectedHolder |
1852 | 2091 |
label: 'Copy Color' |
2092 |
itemValue: copyColorFromColormap |
|
2093 |
translateLabel: true |
|
2841 | 2094 |
shortcutKey: Copy |
1852 | 2095 |
) |
2096 |
(MenuItem |
|
3195 | 2097 |
enabled: hasColormapAndSingleColorSelected |
2539 | 2098 |
label: 'Pick and Paste Color...' |
1933 | 2099 |
itemValue: pickAndPasteColor |
1852 | 2100 |
translateLabel: true |
2101 |
) |
|
2102 |
(MenuItem |
|
2103 |
label: 'Paste Color' |
|
2104 |
itemValue: pasteColorIntoColormap |
|
2105 |
translateLabel: true |
|
2841 | 2106 |
shortcutKey: Paste |
1852 | 2107 |
) |
2108 |
(MenuItem |
|
2109 |
label: '-' |
|
2110 |
) |
|
2111 |
(MenuItem |
|
3195 | 2112 |
enabled: hasColormapAndSingleColorSelected |
2539 | 2113 |
label: 'Edit Color...' |
1931 | 2114 |
itemValue: editSelectedColor |
2115 |
translateLabel: true |
|
2116 |
) |
|
2117 |
(MenuItem |
|
2651 | 2118 |
enabled: hasColormapAndColorSelected |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2119 |
label: 'Brighter' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2120 |
itemValue: makeSelectedColorBrighter |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2121 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2122 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2123 |
(MenuItem |
2651 | 2124 |
enabled: hasColormapAndColorSelected |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2125 |
label: 'Darker' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2126 |
itemValue: makeSelectedColorDarker |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2127 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2128 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2129 |
(MenuItem |
2651 | 2130 |
enabled: hasColormapAndColorSelected |
1884 | 2131 |
label: 'Make Gray' |
2132 |
itemValue: makeSelectedColorGray |
|
2133 |
translateLabel: true |
|
2134 |
) |
|
2135 |
(MenuItem |
|
3195 | 2136 |
enabled: hasColormapAndColorSelected |
2137 |
label: 'Color Shift' |
|
2138 |
itemValue: makeSelectedColorShifted |
|
2139 |
translateLabel: true |
|
2140 |
) |
|
2141 |
(MenuItem |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2142 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2143 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2144 |
(MenuItem |
3195 | 2145 |
enabled: hasSingleColorSelectedHolder |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2146 |
label: 'Inspect Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2147 |
itemValue: inspectColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2148 |
translateLabel: true |
2651 | 2149 |
) |
2150 |
(MenuItem |
|
2792 | 2151 |
enabled: hasColormapHolder |
2651 | 2152 |
label: 'Inspect Colormap' |
2153 |
itemValue: inspectColormap |
|
2154 |
translateLabel: true |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2155 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2156 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2157 |
nil |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2158 |
nil |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2159 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2160 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
2161 |
|
400 | 2162 |
menu |
737 | 2163 |
"This resource specification was automatically generated |
2164 |
by the MenuEditor of ST/X." |
|
400 | 2165 |
|
737 | 2166 |
"Do not manually edit this!! If it is corrupted, |
2167 |
the MenuEditor may not be able to read the specification." |
|
400 | 2168 |
|
2169 |
" |
|
2170 |
MenuEditor new openOnClass:ImageEditor andSelector:#menu |
|
2171 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp |
|
2172 |
" |
|
2173 |
||
2174 |
<resource: #menu> |
|
2175 |
||
1124 | 2176 |
^ |
1882 | 2177 |
#(Menu |
2178 |
( |
|
2179 |
(MenuItem |
|
2180 |
label: '&File' |
|
2181 |
translateLabel: true |
|
2196 | 2182 |
submenuChannel: menuFile |
2585 | 2183 |
"/ keepLinkedMenu: true |
1124 | 2184 |
) |
1882 | 2185 |
(MenuItem |
2186 |
label: 'Edit' |
|
2187 |
translateLabel: true |
|
2196 | 2188 |
submenuChannel: menuEdit |
2585 | 2189 |
"/ keepLinkedMenu: true |
1124 | 2190 |
) |
1882 | 2191 |
(MenuItem |
2192 |
label: 'Mode' |
|
2193 |
translateLabel: true |
|
2194 |
submenuChannel: modeMenu |
|
1637 | 2195 |
) |
1882 | 2196 |
(MenuItem |
1924 | 2197 |
label: 'Colors' |
1882 | 2198 |
translateLabel: true |
2585 | 2199 |
submenuChannel: menuColors |
1124 | 2200 |
) |
1882 | 2201 |
(MenuItem |
2202 |
label: 'Settings' |
|
2203 |
translateLabel: true |
|
2585 | 2204 |
submenuChannel: menuSettings |
1124 | 2205 |
) |
1882 | 2206 |
(MenuItem |
2207 |
label: 'History' |
|
2208 |
translateLabel: true |
|
1975 | 2209 |
isVisible: isStandAlone |
1882 | 2210 |
submenuChannel: menuHistory |
1124 | 2211 |
) |
1882 | 2212 |
(MenuItem |
2136
bb10485fa455
support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents:
2125
diff
changeset
|
2213 |
label: 'MENU_Help' |
1882 | 2214 |
translateLabel: true |
2125 | 2215 |
startGroup: conditionalRight |
1882 | 2216 |
submenuChannel: menuHelp |
1124 | 2217 |
) |
2218 |
) |
|
2219 |
nil |
|
2220 |
nil |
|
400 | 2221 |
) |
2222 |
! |
|
2223 |
||
2585 | 2224 |
menuColors |
2225 |
"This resource specification was automatically generated |
|
2226 |
by the MenuEditor of ST/X." |
|
2227 |
||
2228 |
"Do not manually edit this!! If it is corrupted, |
|
2229 |
the MenuEditor may not be able to read the specification." |
|
2230 |
||
2231 |
" |
|
2232 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuColors |
|
2233 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuColors)) startUp |
|
2234 |
" |
|
2235 |
||
2236 |
<resource: #menu> |
|
2237 |
||
2238 |
^ |
|
2239 |
#(Menu |
|
2240 |
( |
|
2241 |
(MenuItem |
|
2767 | 2242 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2585 | 2243 |
label: 'Depth' |
2244 |
translateLabel: true |
|
2245 |
submenu: |
|
2246 |
(Menu |
|
2247 |
( |
|
2248 |
(MenuItem |
|
2249 |
activeHelpKey: colorMap1 |
|
2250 |
label: '1-Plane' |
|
2251 |
itemValue: colorMapMode: |
|
2252 |
translateLabel: true |
|
2253 |
argument: depth1 |
|
2254 |
choice: colorMapMode |
|
2255 |
choiceValue: depth1 |
|
2256 |
) |
|
2257 |
(MenuItem |
|
2258 |
activeHelpKey: colorMap1M |
|
2259 |
label: '1-Plane + Mask' |
|
2260 |
itemValue: colorMapMode: |
|
2261 |
translateLabel: true |
|
2262 |
argument: masked1 |
|
2263 |
choice: colorMapMode |
|
2264 |
choiceValue: masked1 |
|
2265 |
) |
|
2266 |
(MenuItem |
|
2267 |
label: '-' |
|
2268 |
) |
|
2269 |
(MenuItem |
|
2270 |
activeHelpKey: colorMap2 |
|
2271 |
label: '2-Plane' |
|
2272 |
itemValue: colorMapMode: |
|
2273 |
translateLabel: true |
|
2274 |
argument: depth2 |
|
2275 |
choice: colorMapMode |
|
2276 |
choiceValue: depth2 |
|
2277 |
) |
|
2278 |
(MenuItem |
|
2279 |
activeHelpKey: colorMap2M |
|
2280 |
label: '2-Plane + Mask' |
|
2281 |
itemValue: colorMapMode: |
|
2282 |
translateLabel: true |
|
2283 |
argument: masked2 |
|
2284 |
choice: colorMapMode |
|
2285 |
choiceValue: masked2 |
|
2286 |
) |
|
2287 |
(MenuItem |
|
2288 |
label: '-' |
|
2289 |
) |
|
2290 |
(MenuItem |
|
2291 |
activeHelpKey: colorMap4 |
|
2292 |
label: '4-Plane' |
|
2293 |
itemValue: colorMapMode: |
|
2294 |
translateLabel: true |
|
2295 |
argument: depth4 |
|
2296 |
choice: colorMapMode |
|
2297 |
choiceValue: depth4 |
|
2298 |
) |
|
2299 |
(MenuItem |
|
2300 |
activeHelpKey: colorMap4M |
|
2301 |
label: '4-Plane + Mask' |
|
2302 |
itemValue: colorMapMode: |
|
2303 |
translateLabel: true |
|
2304 |
argument: masked4 |
|
2305 |
choice: colorMapMode |
|
2306 |
choiceValue: masked4 |
|
2307 |
) |
|
2308 |
(MenuItem |
|
2309 |
label: '-' |
|
2310 |
) |
|
2311 |
(MenuItem |
|
2312 |
activeHelpKey: colorMap8 |
|
2313 |
label: '8-Plane' |
|
2314 |
itemValue: colorMapMode: |
|
2315 |
translateLabel: true |
|
2316 |
argument: depth8 |
|
2317 |
choice: colorMapMode |
|
2318 |
choiceValue: depth8 |
|
2319 |
) |
|
2320 |
(MenuItem |
|
2321 |
activeHelpKey: colorMap8M |
|
2322 |
label: '8-Plane + Mask' |
|
2323 |
itemValue: colorMapMode: |
|
2324 |
translateLabel: true |
|
2325 |
argument: masked8 |
|
2326 |
choice: colorMapMode |
|
2327 |
choiceValue: masked8 |
|
2328 |
) |
|
2329 |
(MenuItem |
|
2330 |
label: '-' |
|
2331 |
) |
|
2332 |
(MenuItem |
|
2333 |
activeHelpKey: colorMap16 |
|
2334 |
label: '16-Plane' |
|
2335 |
itemValue: colorMapMode: |
|
2336 |
translateLabel: true |
|
2337 |
argument: depth16 |
|
2338 |
choice: colorMapMode |
|
2339 |
choiceValue: depth16 |
|
2340 |
) |
|
2341 |
(MenuItem |
|
2342 |
activeHelpKey: colorMap16M |
|
2343 |
label: '16-Plane + Mask' |
|
2344 |
itemValue: colorMapMode: |
|
2345 |
translateLabel: true |
|
2346 |
argument: masked16 |
|
2347 |
choice: colorMapMode |
|
2348 |
choiceValue: masked16 |
|
2349 |
) |
|
2350 |
(MenuItem |
|
2351 |
label: '-' |
|
2352 |
) |
|
2353 |
(MenuItem |
|
2354 |
activeHelpKey: colorMap24 |
|
2355 |
label: '24-Plane' |
|
2356 |
itemValue: colorMapMode: |
|
2357 |
translateLabel: true |
|
2358 |
argument: depth24 |
|
2359 |
choice: colorMapMode |
|
2360 |
choiceValue: depth24 |
|
2361 |
) |
|
2362 |
(MenuItem |
|
2363 |
activeHelpKey: colorMap24M |
|
2364 |
label: '24-Plane + Mask' |
|
2365 |
itemValue: colorMapMode: |
|
2366 |
translateLabel: true |
|
2367 |
argument: masked24 |
|
2368 |
choice: colorMapMode |
|
2369 |
choiceValue: masked24 |
|
2370 |
) |
|
2371 |
(MenuItem |
|
2372 |
label: '-' |
|
2373 |
) |
|
2374 |
(MenuItem |
|
2375 |
activeHelpKey: colorMap32 |
|
2376 |
label: '32-Plane (rgba)' |
|
2377 |
itemValue: colorMapMode: |
|
2378 |
translateLabel: true |
|
2379 |
argument: depth32 |
|
2380 |
choice: colorMapMode |
|
2381 |
choiceValue: depth32 |
|
2382 |
) |
|
2383 |
) |
|
2384 |
nil |
|
2385 |
nil |
|
2386 |
) |
|
2387 |
) |
|
2388 |
(MenuItem |
|
2792 | 2389 |
enabled: imageIsLoadedHolder |
2585 | 2390 |
label: 'ColorMap' |
2391 |
translateLabel: true |
|
2392 |
submenu: |
|
2393 |
(Menu |
|
2394 |
( |
|
2395 |
(MenuItem |
|
2396 |
activeHelpKey: compressColormap |
|
2792 | 2397 |
enabled: hasColormapHolder |
2585 | 2398 |
label: 'Compress Colormap' |
2826 | 2399 |
itemValue: #'menu_compressColorMap' |
2585 | 2400 |
translateLabel: true |
2401 |
) |
|
2402 |
(MenuItem |
|
2792 | 2403 |
enabled: hasColormapHolder |
2585 | 2404 |
label: 'Sort Colormap' |
2826 | 2405 |
itemValue: #'menu_sortColorMap' |
2585 | 2406 |
translateLabel: true |
2407 |
) |
|
2408 |
(MenuItem |
|
2409 |
label: 'Reduce Number of Colors by Rounding...' |
|
2410 |
itemValue: reduceNumberOfColors2 |
|
2411 |
translateLabel: true |
|
2412 |
) |
|
2413 |
(MenuItem |
|
2414 |
label: 'Reduce Number of Colors by Masking Bits...' |
|
2415 |
itemValue: reduceNumberOfColors |
|
2416 |
translateLabel: true |
|
2417 |
) |
|
2418 |
(MenuItem |
|
2419 |
label: 'Dither to Depth...' |
|
2420 |
itemValue: ditherToDepth |
|
2421 |
translateLabel: true |
|
2422 |
) |
|
2423 |
(MenuItem |
|
2424 |
label: '-' |
|
2425 |
) |
|
2426 |
(MenuItem |
|
2792 | 2427 |
enabled: imageIsLoadedHolder |
2585 | 2428 |
label: 'Brighten' |
2429 |
itemValue: doBrightenImage |
|
2430 |
translateLabel: true |
|
2431 |
) |
|
2432 |
(MenuItem |
|
2792 | 2433 |
enabled: imageIsLoadedHolder |
2585 | 2434 |
label: 'Darken' |
2435 |
itemValue: doDarkenImage |
|
2436 |
translateLabel: true |
|
2437 |
) |
|
2652 | 2438 |
(MenuItem |
2792 | 2439 |
enabled: imageIsLoadedHolder |
2652 | 2440 |
label: 'Invert' |
2441 |
itemValue: doNegativeImage |
|
2442 |
translateLabel: true |
|
2443 |
) |
|
2585 | 2444 |
) |
2445 |
nil |
|
2446 |
nil |
|
2447 |
) |
|
2448 |
) |
|
2449 |
(MenuItem |
|
2792 | 2450 |
enabled: imageIsLoadedHolder |
2585 | 2451 |
label: 'Process' |
2452 |
translateLabel: true |
|
2453 |
submenu: |
|
2454 |
(Menu |
|
2455 |
( |
|
2456 |
(MenuItem |
|
2457 |
label: 'Make GrayScale' |
|
2458 |
itemValue: makeGrayScaleImage |
|
2459 |
translateLabel: true |
|
2460 |
) |
|
2461 |
(MenuItem |
|
2826 | 2462 |
enabled: allowedToChangeImageDimensionAndDepth |
2585 | 2463 |
label: 'Make dithered 8Bit Palette' |
2464 |
itemValue: makeDitheredPaletteImage |
|
2465 |
translateLabel: true |
|
2466 |
isVisible: false |
|
2467 |
) |
|
2468 |
(MenuItem |
|
2826 | 2469 |
label: 'Make Inverse' |
2470 |
itemValue: makeInverse |
|
2471 |
translateLabel: true |
|
2472 |
) |
|
2473 |
(MenuItem |
|
2474 |
label: '-' |
|
2475 |
) |
|
2476 |
(MenuItem |
|
2477 |
label: 'Make Slightly Brighter' |
|
2478 |
itemValue: makeSlightlyBrighter |
|
2479 |
translateLabel: true |
|
2480 |
) |
|
2481 |
(MenuItem |
|
2482 |
label: 'Make Slightly Darker' |
|
2483 |
itemValue: makeSlightlyDarker |
|
2484 |
translateLabel: true |
|
2485 |
) |
|
2486 |
(MenuItem |
|
2487 |
label: '-' |
|
2488 |
) |
|
2489 |
(MenuItem |
|
2585 | 2490 |
label: 'Make Brighter' |
2491 |
itemValue: makeBrighter |
|
2492 |
translateLabel: true |
|
2493 |
) |
|
2494 |
(MenuItem |
|
2495 |
label: 'Make Darker' |
|
2496 |
itemValue: makeDarker |
|
2497 |
translateLabel: true |
|
2498 |
) |
|
2499 |
(MenuItem |
|
2500 |
label: '-' |
|
2501 |
) |
|
2502 |
(MenuItem |
|
2503 |
label: 'Change HLS...' |
|
2504 |
itemValue: changeHLS |
|
2505 |
translateLabel: true |
|
2506 |
) |
|
2507 |
(MenuItem |
|
2508 |
label: 'Colorize...' |
|
2509 |
itemValue: colorize |
|
2510 |
translateLabel: true |
|
2511 |
) |
|
2512 |
) |
|
2513 |
nil |
|
2514 |
nil |
|
2515 |
) |
|
2516 |
) |
|
2517 |
(MenuItem |
|
2792 | 2518 |
enabled: imageIsLoadedHolder |
2585 | 2519 |
label: 'Mask' |
2520 |
translateLabel: true |
|
2521 |
submenu: |
|
2522 |
(Menu |
|
2523 |
( |
|
2524 |
(MenuItem |
|
2525 |
activeHelpKey: copyMask |
|
2526 |
enabled: hasMask |
|
2527 |
label: 'Copy Mask' |
|
2826 | 2528 |
itemValue: #'menu_copyMask' |
2585 | 2529 |
translateLabel: true |
2530 |
) |
|
2531 |
(MenuItem |
|
2532 |
activeHelpKey: pasteMask |
|
2533 |
enabled: hasMask |
|
2534 |
label: 'Paste Mask' |
|
2826 | 2535 |
itemValue: #'menu_pasteMask' |
2585 | 2536 |
translateLabel: true |
2537 |
) |
|
2538 |
(MenuItem |
|
2539 |
enabled: hasMask |
|
2540 |
label: 'Clear Masked Pixels' |
|
2826 | 2541 |
itemValue: #'menu_clearMaskedPixels' |
2652 | 2542 |
translateLabel: true |
2543 |
) |
|
2544 |
(MenuItem |
|
2545 |
enabled: hasMask |
|
2653 | 2546 |
label: 'Clear Colormap Entry for Masked Pixels' |
2826 | 2547 |
itemValue: #'menu_clearColormapEntry0AndMaskedPixels' |
2585 | 2548 |
translateLabel: true |
2549 |
) |
|
2550 |
) |
|
2551 |
nil |
|
2552 |
nil |
|
2553 |
) |
|
2554 |
) |
|
2555 |
) |
|
2556 |
nil |
|
2557 |
nil |
|
2558 |
) |
|
2559 |
! |
|
2560 |
||
2196 | 2561 |
menuEdit |
2562 |
"This resource specification was automatically generated |
|
2563 |
by the MenuEditor of ST/X." |
|
2564 |
||
2565 |
"Do not manually edit this!! If it is corrupted, |
|
2566 |
the MenuEditor may not be able to read the specification." |
|
2567 |
||
2568 |
" |
|
2569 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuEdit |
|
2570 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuEdit)) startUp |
|
2571 |
" |
|
2572 |
||
2573 |
<resource: #menu> |
|
2574 |
||
2575 |
^ |
|
2576 |
#(Menu |
|
2577 |
( |
|
2578 |
(MenuItem |
|
2579 |
activeHelpKey: editUndo |
|
2580 |
enabled: canUndoHolder |
|
2581 |
label: 'Undo' |
|
2582 |
itemValue: doUndo |
|
2583 |
translateLabel: true |
|
2584 |
) |
|
2585 |
(MenuItem |
|
2586 |
label: '-' |
|
2587 |
) |
|
2588 |
(MenuItem |
|
2812 | 2589 |
enabled: imageIsLoadedHolder |
2590 |
label: 'Copy to Clipboard' |
|
2591 |
itemValue: doCopyImageToClipboard |
|
2592 |
translateLabel: true |
|
2593 |
) |
|
2594 |
(MenuItem |
|
2595 |
label: '-' |
|
2596 |
) |
|
2597 |
(MenuItem |
|
2598 |
activeHelpKey: editResize |
|
2767 | 2599 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2600 |
label: 'Resize...' |
2601 |
itemValue: doResizeImage |
|
2602 |
translateLabel: true |
|
2603 |
) |
|
2604 |
(MenuItem |
|
2812 | 2605 |
activeHelpKey: editMagnifyImage |
2767 | 2606 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2607 |
label: 'Magnify...' |
2608 |
itemValue: doMagnifyImage |
|
2609 |
translateLabel: true |
|
2610 |
) |
|
2611 |
(MenuItem |
|
2812 | 2612 |
activeHelpKey: editMagnifyImage |
2767 | 2613 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2614 |
label: 'Magnify By...' |
2615 |
itemValue: doMagnifyImageBy |
|
2616 |
translateLabel: true |
|
2617 |
) |
|
2618 |
(MenuItem |
|
2812 | 2619 |
activeHelpKey: editRotate |
2767 | 2620 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2621 |
label: 'Rotate...' |
2622 |
itemValue: doRotateImage |
|
2623 |
translateLabel: true |
|
2624 |
) |
|
2625 |
(MenuItem |
|
2812 | 2626 |
activeHelpKey: edit3DProjection |
2767 | 2627 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2628 |
label: '3D Projection...' |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2629 |
itemValue: do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2630 |
translateLabel: true |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2631 |
) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
2632 |
(MenuItem |
2792 | 2633 |
enabled: imageIsLoadedHolder |
2196 | 2634 |
label: 'Flip' |
2635 |
translateLabel: true |
|
2636 |
submenu: |
|
2637 |
(Menu |
|
2638 |
( |
|
2639 |
(MenuItem |
|
2640 |
activeHelpKey: editFlipVertical |
|
2812 | 2641 |
enabled: imageIsLoadedHolder |
2196 | 2642 |
label: 'Flip - Vertical' |
2643 |
itemValue: doFlipVertical |
|
2644 |
translateLabel: true |
|
2837 | 2645 |
labelImage: (ResourceRetriever ImageEditor flipVerticalIcon 'Flip - Vertical') |
2196 | 2646 |
) |
2647 |
(MenuItem |
|
2648 |
activeHelpKey: editFlipHorizontal |
|
2812 | 2649 |
enabled: imageIsLoadedHolder |
2196 | 2650 |
label: 'Flip - Horizontal' |
2651 |
itemValue: doFlipHorizontal |
|
2652 |
translateLabel: true |
|
2837 | 2653 |
labelImage: (ResourceRetriever ImageEditor flipHorizontalIcon 'Flip - Horizontal') |
2196 | 2654 |
) |
2655 |
) |
|
2656 |
nil |
|
2657 |
nil |
|
2658 |
) |
|
2659 |
) |
|
2660 |
(MenuItem |
|
2661 |
label: '-' |
|
2662 |
) |
|
2663 |
(MenuItem |
|
2767 | 2664 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2665 |
label: 'Crop' |
2666 |
translateLabel: true |
|
2667 |
submenu: |
|
2668 |
(Menu |
|
2669 |
( |
|
2670 |
(MenuItem |
|
2671 |
activeHelpKey: cropManual |
|
2672 |
label: 'Manual...' |
|
2673 |
itemValue: doCropManual |
|
2674 |
translateLabel: true |
|
2675 |
) |
|
2676 |
(MenuItem |
|
2677 |
label: '-' |
|
2678 |
) |
|
2679 |
(MenuItem |
|
2680 |
activeHelpKey: cropAll |
|
2681 |
label: 'All' |
|
2682 |
itemValue: doCropAll |
|
2683 |
translateLabel: true |
|
2684 |
) |
|
2685 |
(MenuItem |
|
2686 |
label: '-' |
|
2687 |
) |
|
2688 |
(MenuItem |
|
2689 |
activeHelpKey: cropLeft |
|
2690 |
label: 'Left' |
|
2691 |
itemValue: doCropLeft |
|
2692 |
translateLabel: true |
|
2693 |
) |
|
2694 |
(MenuItem |
|
2695 |
activeHelpKey: cropRight |
|
2696 |
label: 'Right' |
|
2697 |
itemValue: doCropRight |
|
2698 |
translateLabel: true |
|
2699 |
) |
|
2700 |
(MenuItem |
|
2701 |
activeHelpKey: cropTop |
|
2702 |
label: 'Top' |
|
2703 |
itemValue: doCropTop |
|
2704 |
translateLabel: true |
|
2705 |
) |
|
2706 |
(MenuItem |
|
2707 |
activeHelpKey: cropBottom |
|
2708 |
label: 'Bottom' |
|
2709 |
itemValue: doCropBottom |
|
2710 |
translateLabel: true |
|
2711 |
) |
|
2712 |
) |
|
2713 |
nil |
|
2714 |
nil |
|
2715 |
) |
|
2716 |
) |
|
2717 |
(MenuItem |
|
2812 | 2718 |
activeHelpKey: uncropManual |
2767 | 2719 |
enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2196 | 2720 |
label: 'Uncrop (Add Border)...' |
2721 |
itemValue: doUnCropManual |
|
2722 |
translateLabel: true |
|
2723 |
) |
|
2724 |
(MenuItem |
|
2812 | 2725 |
activeHelpKey: shiftManual |
2792 | 2726 |
enabled: imageIsLoadedHolder |
2196 | 2727 |
label: 'Shift...' |
2728 |
itemValue: doShiftManual |
|
2729 |
translateLabel: true |
|
2730 |
) |
|
2731 |
(MenuItem |
|
2732 |
label: '-' |
|
2733 |
) |
|
2734 |
(MenuItem |
|
2585 | 2735 |
activeHelpKey: fileEditMask |
2792 | 2736 |
enabled: imageIsLoadedHolder |
2585 | 2737 |
label: 'Edit Mask' |
2738 |
itemValue: doEditMask |
|
2739 |
translateLabel: true |
|
2740 |
) |
|
2741 |
(MenuItem |
|
2792 | 2742 |
enabled: imageIsLoadedHolder |
2196 | 2743 |
label: 'Text...' |
2744 |
itemValue: doInsertTextFromUser |
|
2745 |
translateLabel: true |
|
2746 |
) |
|
2812 | 2747 |
(MenuItem |
2748 |
label: '-' |
|
2749 |
) |
|
2750 |
(MenuItem |
|
2814 | 2751 |
label: 'Animation Sequence' |
2812 | 2752 |
translateLabel: true |
2753 |
submenu: |
|
2754 |
(Menu |
|
2755 |
( |
|
2756 |
(MenuItem |
|
2757 |
enabled: imageHasNextImageHolder |
|
2758 |
label: 'Next in Sequence' |
|
2759 |
itemValue: nextImageInSequence |
|
2760 |
translateLabel: true |
|
2761 |
) |
|
2762 |
(MenuItem |
|
2763 |
enabled: imageHasPreviousImageHolder |
|
2813 | 2764 |
label: 'Previous in Sequence' |
2812 | 2765 |
itemValue: previousImageInSequence |
2766 |
translateLabel: true |
|
2767 |
) |
|
2768 |
(MenuItem |
|
2769 |
label: '-' |
|
2770 |
) |
|
2771 |
(MenuItem |
|
2772 |
enabled: imageHasImageSequenceHolder |
|
2773 |
label: 'Edit each from Sequence' |
|
2774 |
itemValue: editEachImageFromSequence |
|
2775 |
translateLabel: true |
|
2776 |
) |
|
2777 |
) |
|
2778 |
nil |
|
2779 |
nil |
|
2780 |
) |
|
2781 |
) |
|
2196 | 2782 |
) |
2783 |
nil |
|
2784 |
nil |
|
2785 |
) |
|
2786 |
! |
|
2787 |
||
2788 |
menuFile |
|
2789 |
"This resource specification was automatically generated |
|
2790 |
by the MenuEditor of ST/X." |
|
2791 |
||
2792 |
"Do not manually edit this!! If it is corrupted, |
|
2793 |
the MenuEditor may not be able to read the specification." |
|
2794 |
||
3022 | 2795 |
|
2196 | 2796 |
" |
2797 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuFile |
|
2798 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuFile)) startUp |
|
2799 |
" |
|
2800 |
||
2801 |
<resource: #menu> |
|
2802 |
||
2803 |
^ |
|
2804 |
#(Menu |
|
2805 |
( |
|
2806 |
(MenuItem |
|
2807 |
activeHelpKey: fileNewImageEditor |
|
2808 |
label: 'New ImageEditor' |
|
2809 |
itemValue: doNewImageEditor |
|
2810 |
) |
|
2811 |
(MenuItem |
|
2876 | 2812 |
label: '-' |
2813 |
) |
|
2814 |
(MenuItem |
|
2196 | 2815 |
activeHelpKey: fileNewImage |
2816 |
label: 'New...' |
|
2817 |
itemValue: doNewImage |
|
2818 |
) |
|
2819 |
(MenuItem |
|
3200 | 2820 |
activeHelpKey: fileNewImageFromClipboard |
2196 | 2821 |
label: 'New from ClipBoard' |
2822 |
itemValue: doNewImageFromClipboard |
|
2823 |
) |
|
2824 |
(MenuItem |
|
3200 | 2825 |
activeHelpKey: fileNewMaskFromClipboard |
2826 |
label: 'Mask from ClipBoard' |
|
2827 |
itemValue: doNewMaskFromClipboard |
|
2828 |
) |
|
2829 |
(MenuItem |
|
2196 | 2830 |
label: '-' |
2831 |
) |
|
2832 |
(MenuItem |
|
2833 |
activeHelpKey: fileLoadFromClass |
|
2834 |
label: 'Load...' |
|
2835 |
itemValue: doLoadFromClass |
|
2836 |
) |
|
2837 |
(MenuItem |
|
2838 |
activeHelpKey: fileLoadFromFile |
|
2839 |
label: 'Load from File...' |
|
2840 |
itemValue: doLoadFromFile |
|
2841 |
) |
|
2842 |
(MenuItem |
|
2796 | 2843 |
activeHelpKey: fileLoadFromURL |
2844 |
label: 'Load from URL...' |
|
2845 |
itemValue: doLoadFromURL |
|
2846 |
) |
|
2847 |
(MenuItem |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2848 |
label: 'Grab' |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2849 |
submenu: |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2850 |
(Menu |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2851 |
( |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2852 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2853 |
activeHelpKey: fileGrabImageFromScreen |
2717 | 2854 |
label: 'Grab from Screen Area...' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2855 |
itemValue: grabScreenImage |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2856 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2857 |
(MenuItem |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2858 |
activeHelpKey: fileGrabImageFromScreen |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2859 |
enabled: hasLastGrabScreenArea |
2711 | 2860 |
label: 'Grab again from same Screen Area' |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2861 |
itemValue: grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2862 |
) |
2771 | 2863 |
(MenuItem |
2864 |
label: '-' |
|
2865 |
) |
|
2866 |
(MenuItem |
|
2867 |
activeHelpKey: fileGrabImageFromWindow |
|
2868 |
label: 'Grab from Window...' |
|
2869 |
itemValue: grabWindowImage |
|
2870 |
) |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2871 |
) |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2872 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2873 |
nil |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
2874 |
) |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
2875 |
) |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
2876 |
(MenuItem |
2196 | 2877 |
label: '-' |
2878 |
) |
|
2879 |
(MenuItem |
|
2880 |
activeHelpKey: fileSaveMethod |
|
2881 |
enabled: imageIsLoadedAndClassDefined |
|
2882 |
label: 'Save' |
|
2883 |
itemValue: doSaveMethod |
|
2884 |
) |
|
2885 |
(MenuItem |
|
2886 |
activeHelpKey: fileSaveMethodAs |
|
2792 | 2887 |
enabled: imageIsLoadedHolder |
2196 | 2888 |
label: 'Save As...' |
2889 |
itemValue: doSaveMethodAs |
|
2890 |
) |
|
2891 |
(MenuItem |
|
2892 |
activeHelpKey: fileSaveAs |
|
2792 | 2893 |
enabled: imageIsLoadedHolder |
2196 | 2894 |
label: 'Save to File...' |
2895 |
itemValue: doSaveImageFileAs |
|
2896 |
) |
|
2897 |
(MenuItem |
|
2898 |
activeHelpKey: fileSaveMaskAs |
|
2792 | 2899 |
enabled: imageIsLoadedHolder |
2196 | 2900 |
label: 'Save Mask to File...' |
2901 |
itemValue: doSaveImageMaskFileAs |
|
2902 |
) |
|
2903 |
(MenuItem |
|
2904 |
activeHelpKey: fileSaveButtonImageAs |
|
2792 | 2905 |
enabled: imageIsLoadedHolder |
2196 | 2906 |
label: 'Save as Button to File...' |
2907 |
itemValue: doSaveButtonImageToFileAs |
|
2908 |
) |
|
2909 |
(MenuItem |
|
2910 |
label: '-' |
|
2911 |
) |
|
2912 |
(MenuItem |
|
2913 |
activeHelpKey: filePrint |
|
2792 | 2914 |
enabled: imageIsLoadedHolder |
2196 | 2915 |
label: 'Print' |
2916 |
itemValue: doPrint |
|
2917 |
) |
|
2918 |
(MenuItem |
|
2919 |
label: '-' |
|
2920 |
isVisible: isStandAlone |
|
2921 |
) |
|
2922 |
(MenuItem |
|
2923 |
activeHelpKey: fileBrowseClass |
|
2792 | 2924 |
enabled: hasClassDefinedHolder |
2196 | 2925 |
label: 'Browse Class' |
2926 |
itemValue: doBrowseClass |
|
2927 |
isVisible: isStandAlone |
|
2928 |
) |
|
2929 |
(MenuItem |
|
2792 | 2930 |
enabled: imageIsLoadedHolder |
2196 | 2931 |
label: 'Inspect Image' |
2932 |
itemValue: doInspectImage |
|
2933 |
isVisible: isStandAlone |
|
2934 |
) |
|
2935 |
(MenuItem |
|
2585 | 2936 |
activeHelpKey: fileShowStoreString |
2792 | 2937 |
enabled: imageIsLoadedHolder |
2585 | 2938 |
label: 'Show storeString' |
2939 |
itemValue: doShowStoreString |
|
3022 | 2940 |
) |
2941 |
(MenuItem |
|
2942 |
activeHelpKey: fileShowStoreString |
|
2943 |
enabled: imageIsLoadedHolder |
|
2944 |
label: 'Show Pixel Array Literal String' |
|
2945 |
itemValue: doShowPixelArrayLiteralString |
|
2585 | 2946 |
) |
2947 |
(MenuItem |
|
2196 | 2948 |
label: '-' |
2949 |
isVisible: isStandAlone |
|
2950 |
) |
|
2951 |
(MenuItem |
|
2952 |
activeHelpKey: fileExit |
|
2953 |
label: 'Exit' |
|
2954 |
itemValue: closeRequest |
|
2955 |
isVisible: isStandAlone |
|
2956 |
) |
|
2957 |
) |
|
2958 |
nil |
|
2959 |
nil |
|
2960 |
) |
|
2961 |
! |
|
2962 |
||
679 | 2963 |
menuMouseButtonColors |
737 | 2964 |
"This resource specification was automatically generated |
2965 |
by the MenuEditor of ST/X." |
|
679 | 2966 |
|
737 | 2967 |
"Do not manually edit this!! If it is corrupted, |
2968 |
the MenuEditor may not be able to read the specification." |
|
679 | 2969 |
|
2970 |
" |
|
2971 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
2972 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
2973 |
" |
|
2974 |
||
2975 |
<resource: #menu> |
|
2976 |
||
2977 |
^ |
|
2978 |
||
2979 |
#(#Menu |
|
2980 |
||
2981 |
#( |
|
2982 |
#(#MenuItem |
|
2983 |
#label: 'Left Mouse Button' |
|
2984 |
#nameKey: #leftMouseKeyButton |
|
2985 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 2986 |
#enabled: #imageIsLoadedHolder |
679 | 2987 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 2988 |
#choice: #mouseKeyColorMode |
2989 |
#choiceValue: 1 |
|
679 | 2990 |
) |
2991 |
#(#MenuItem |
|
2992 |
#label: 'Right Mouse Button' |
|
2993 |
#nameKey: #rightMouseKeyButton |
|
2994 |
#activeHelpKey: #mouseKeyColorMode |
|
2792 | 2995 |
#enabled: #imageIsLoadedHolder |
679 | 2996 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 2997 |
#choice: #mouseKeyColorMode |
2998 |
#choiceValue: 2 |
|
679 | 2999 |
) |
3000 |
) nil |
|
3001 |
nil |
|
3002 |
) |
|
2792 | 3003 |
|
3004 |
"Modified: / 04-07-2010 / 10:17:37 / cg" |
|
679 | 3005 |
! |
3006 |
||
2585 | 3007 |
menuSettings |
3008 |
"This resource specification was automatically generated |
|
3009 |
by the MenuEditor of ST/X." |
|
3010 |
||
3011 |
"Do not manually edit this!! If it is corrupted, |
|
3012 |
the MenuEditor may not be able to read the specification." |
|
3013 |
||
2881 | 3014 |
|
2585 | 3015 |
" |
3016 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuSettings |
|
3017 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuSettings)) startUp |
|
3018 |
" |
|
3019 |
||
3020 |
<resource: #menu> |
|
3021 |
||
3022 |
^ |
|
3023 |
#(Menu |
|
3024 |
( |
|
3025 |
(MenuItem |
|
3026 |
activeHelpKey: settingsGridMagnification |
|
3027 |
label: 'Grid Magnification Limit...' |
|
3028 |
itemValue: doChangeGridMagnification |
|
3029 |
translateLabel: true |
|
3030 |
) |
|
3031 |
(MenuItem |
|
3032 |
label: 'Pen' |
|
3033 |
translateLabel: true |
|
3034 |
submenu: |
|
3035 |
(Menu |
|
3036 |
( |
|
3037 |
(MenuItem |
|
3038 |
label: '1' |
|
3039 |
translateLabel: true |
|
2881 | 3040 |
choice: penWidthHolder |
3041 |
choiceValue: 1 |
|
2585 | 3042 |
) |
3043 |
(MenuItem |
|
3044 |
label: '5' |
|
3045 |
translateLabel: true |
|
2881 | 3046 |
choice: penWidthHolder |
3047 |
choiceValue: 5 |
|
2585 | 3048 |
) |
3049 |
(MenuItem |
|
3050 |
label: '10' |
|
3051 |
translateLabel: true |
|
2881 | 3052 |
choice: penWidthHolder |
3053 |
choiceValue: 10 |
|
2585 | 3054 |
) |
3055 |
) |
|
3056 |
nil |
|
3057 |
nil |
|
3058 |
) |
|
3059 |
) |
|
3060 |
(MenuItem |
|
3061 |
label: 'Spray' |
|
3062 |
translateLabel: true |
|
3063 |
submenu: |
|
3064 |
(Menu |
|
3065 |
( |
|
3066 |
(MenuItem |
|
3067 |
label: '4' |
|
3068 |
translateLabel: true |
|
2881 | 3069 |
choice: spraySpotHolder |
3070 |
choiceValue: 4 |
|
2585 | 3071 |
) |
3072 |
(MenuItem |
|
3073 |
label: '8' |
|
3074 |
translateLabel: true |
|
2881 | 3075 |
choice: spraySpotHolder |
3076 |
choiceValue: 8 |
|
2585 | 3077 |
) |
3078 |
(MenuItem |
|
3079 |
label: '16' |
|
3080 |
translateLabel: true |
|
2881 | 3081 |
choice: spraySpotHolder |
3082 |
choiceValue: 16 |
|
2585 | 3083 |
) |
3084 |
(MenuItem |
|
3085 |
label: '32' |
|
3086 |
translateLabel: true |
|
2881 | 3087 |
choice: spraySpotHolder |
3088 |
choiceValue: 32 |
|
2585 | 3089 |
) |
3090 |
) |
|
3091 |
nil |
|
3092 |
nil |
|
3093 |
) |
|
3094 |
) |
|
3095 |
) |
|
3096 |
nil |
|
3097 |
nil |
|
3098 |
) |
|
3099 |
! |
|
3100 |
||
400 | 3101 |
menuToolbar |
737 | 3102 |
"This resource specification was automatically generated |
3103 |
by the MenuEditor of ST/X." |
|
400 | 3104 |
|
737 | 3105 |
"Do not manually edit this!! If it is corrupted, |
3106 |
the MenuEditor may not be able to read the specification." |
|
400 | 3107 |
|
2876 | 3108 |
|
400 | 3109 |
" |
3110 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
3111 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
3112 |
" |
|
3113 |
||
3114 |
<resource: #menu> |
|
3115 |
||
1196 | 3116 |
^ |
1820 | 3117 |
#(Menu |
3118 |
( |
|
3119 |
(MenuItem |
|
3120 |
activeHelpKey: fileNewImage |
|
3121 |
label: 'newImage' |
|
3122 |
itemValue: doNewImage |
|
3123 |
translateLabel: true |
|
3124 |
isButton: true |
|
1883 | 3125 |
labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon) |
1196 | 3126 |
) |
1820 | 3127 |
(MenuItem |
2876 | 3128 |
activeHelpKey: fileGrabImageFromScreen |
3129 |
label: 'grabScreenImage' |
|
3130 |
itemValue: grabScreenImage |
|
3131 |
translateLabel: true |
|
3132 |
isButton: true |
|
2877 | 3133 |
labelImage: (ResourceRetriever ToolbarIconLibrary snapshot24x24Icon) |
2876 | 3134 |
) |
3135 |
(MenuItem |
|
1949 | 3136 |
label: '-' |
3137 |
) |
|
3138 |
(MenuItem |
|
1970 | 3139 |
activeHelpKey: fileLoadFromClass |
3140 |
label: 'loadFromClass' |
|
3141 |
itemValue: doLoadFromClass |
|
3142 |
translateLabel: true |
|
3143 |
isButton: true |
|
1975 | 3144 |
isVisible: isStandAlone |
1970 | 3145 |
submenuChannel: menuHistory |
3146 |
labelImage: (ResourceRetriever XPToolbarIconLibrary loadImageFromMethodIcon) |
|
3147 |
keepLinkedMenu: true |
|
3148 |
) |
|
3149 |
(MenuItem |
|
2567 | 3150 |
activeHelpKey: fileSaveMethodAs |
2792 | 3151 |
enabled: imageIsLoadedHolder |
2567 | 3152 |
label: 'fileSaveMethodAs' |
1970 | 3153 |
itemValue: doSaveMethodAs |
3154 |
translateLabel: true |
|
3155 |
isButton: true |
|
1975 | 3156 |
isVisible: isStandAlone |
1970 | 3157 |
labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageAsMethodAsIcon) |
3158 |
) |
|
3159 |
(MenuItem |
|
3160 |
activeHelpKey: fileSaveMethod |
|
2792 | 3161 |
enabled: imageIsLoadedHolder |
1970 | 3162 |
label: 'saveAsMethod' |
3163 |
itemValue: doSaveMethod |
|
3164 |
translateLabel: true |
|
3165 |
isButton: true |
|
1975 | 3166 |
isVisible: isNotStandAlone |
2590 | 3167 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodIcon) |
1970 | 3168 |
) |
3169 |
(MenuItem |
|
3170 |
label: '-' |
|
3171 |
) |
|
3172 |
(MenuItem |
|
1820 | 3173 |
activeHelpKey: fileLoadFromFile |
3174 |
label: 'loadFromFile' |
|
3175 |
itemValue: doLoadFromFile |
|
3176 |
translateLabel: true |
|
3177 |
isButton: true |
|
1884 | 3178 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon) |
1820 | 3179 |
) |
3180 |
(MenuItem |
|
3181 |
activeHelpKey: fileSaveAs |
|
2792 | 3182 |
enabled: imageIsLoadedHolder |
1820 | 3183 |
label: 'saveAsFile' |
3184 |
itemValue: doSaveImageFileAs |
|
3185 |
translateLabel: true |
|
3186 |
isButton: true |
|
1885 | 3187 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon) |
1820 | 3188 |
) |
3189 |
(MenuItem |
|
1949 | 3190 |
label: '-' |
1196 | 3191 |
) |
1820 | 3192 |
(MenuItem |
3193 |
activeHelpKey: editUndo |
|
1987 | 3194 |
enabled: canUndoHolder |
1820 | 3195 |
label: 'Undo' |
3196 |
itemValue: doUndo |
|
3197 |
translateLabel: true |
|
3198 |
isButton: true |
|
1883 | 3199 |
labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
1196 | 3200 |
) |
2812 | 3201 |
(MenuItem |
3202 |
label: '-' |
|
3203 |
isVisible: imageHasImageSequenceHolder |
|
3204 |
) |
|
3205 |
(MenuItem |
|
3206 |
activeHelpKey: previousImageInSequence |
|
3207 |
enabled: imageHasPreviousImageHolder |
|
3208 |
label: 'Previous Image' |
|
3209 |
itemValue: previousImageInSequence |
|
3210 |
translateLabel: true |
|
3211 |
isVisible: imageHasImageSequenceHolder |
|
3212 |
labelImage: (ResourceRetriever ToolbarIconLibrary leftArrow24x24Icon) |
|
3213 |
) |
|
3214 |
(MenuItem |
|
3215 |
activeHelpKey: nextImageInSequence |
|
3216 |
enabled: imageHasNextImageHolder |
|
3217 |
label: 'Next Image' |
|
3218 |
itemValue: nextImageInSequence |
|
3219 |
translateLabel: true |
|
3220 |
isVisible: imageHasImageSequenceHolder |
|
3221 |
labelImage: (ResourceRetriever ToolbarIconLibrary rightArrow24x24Icon) |
|
3222 |
) |
|
1637 | 3223 |
) |
3224 |
nil |
|
3225 |
nil |
|
3226 |
) |
|
3227 |
! |
|
3228 |
||
3229 |
modeMenu |
|
3230 |
"This resource specification was automatically generated |
|
3231 |
by the MenuEditor of ST/X." |
|
3232 |
||
3233 |
"Do not manually edit this!! If it is corrupted, |
|
3234 |
the MenuEditor may not be able to read the specification." |
|
3235 |
||
3236 |
" |
|
3237 |
MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu |
|
3238 |
(Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp |
|
3239 |
" |
|
3240 |
||
3241 |
<resource: #menu> |
|
3242 |
||
3243 |
^ |
|
2592 | 3244 |
#(Menu |
3245 |
( |
|
3246 |
(MenuItem |
|
3247 |
activeHelpKey: drawModePoint |
|
2792 | 3248 |
enabled: imageIsLoadedHolder |
2592 | 3249 |
label: 'Point' |
3250 |
translateLabel: true |
|
3251 |
labelImage: (ResourceRetriever ImageEditor pointIcon 'Point') |
|
3252 |
choice: editMode |
|
3253 |
choiceValue: point |
|
3254 |
) |
|
3255 |
(MenuItem |
|
3256 |
activeHelpKey: drawModePoint |
|
2792 | 3257 |
enabled: imageIsLoadedHolder |
2592 | 3258 |
label: 'Spray' |
3259 |
translateLabel: true |
|
3260 |
labelImage: (ResourceRetriever ImageEditor sprayIcon 'Spray') |
|
3261 |
choice: editMode |
|
3262 |
choiceValue: spray |
|
1196 | 3263 |
) |
2592 | 3264 |
(MenuItem |
3191 | 3265 |
activeHelpKey: drawModeSmooth |
3266 |
enabled: imageIsLoadedHolder |
|
3267 |
label: 'Smooth' |
|
3268 |
translateLabel: true |
|
3269 |
labelImage: (ResourceRetriever ImageEditor smoothIcon 'Smooth') |
|
3270 |
choice: editMode |
|
3271 |
choiceValue: smooth |
|
3272 |
) |
|
3273 |
(MenuItem |
|
2592 | 3274 |
activeHelpKey: drawModeBox |
2792 | 3275 |
enabled: imageIsLoadedHolder |
2592 | 3276 |
label: 'Rect' |
3277 |
translateLabel: true |
|
3278 |
labelImage: (ResourceRetriever ImageEditor rectIcon 'Rect') |
|
3279 |
choice: editMode |
|
3280 |
choiceValue: box |
|
1196 | 3281 |
) |
2592 | 3282 |
(MenuItem |
3283 |
activeHelpKey: drawModeFilledBox |
|
2792 | 3284 |
enabled: imageIsLoadedHolder |
2592 | 3285 |
label: 'Filled Rectangle' |
3286 |
translateLabel: true |
|
3287 |
labelImage: (ResourceRetriever ImageEditor fillRectIcon 'Filled Rectangle') |
|
3288 |
choice: editMode |
|
3289 |
choiceValue: filledBox |
|
1196 | 3290 |
) |
2592 | 3291 |
(MenuItem |
3292 |
activeHelpKey: drawModeBox |
|
2792 | 3293 |
enabled: imageIsLoadedHolder |
2592 | 3294 |
label: 'Circle' |
3295 |
translateLabel: true |
|
3296 |
labelImage: (ResourceRetriever ImageEditor circleIcon 'Circle') |
|
3297 |
choice: editMode |
|
3298 |
choiceValue: circle |
|
1196 | 3299 |
) |
2592 | 3300 |
(MenuItem |
3301 |
activeHelpKey: drawModeFill |
|
2792 | 3302 |
enabled: imageIsLoadedHolder |
2592 | 3303 |
label: 'Fill' |
3304 |
translateLabel: true |
|
3305 |
labelImage: (ResourceRetriever ImageEditor fillIcon 'Fill') |
|
3306 |
choice: editMode |
|
3307 |
choiceValue: fill |
|
1196 | 3308 |
) |
2592 | 3309 |
(MenuItem |
3310 |
activeHelpKey: drawModeCopy |
|
2792 | 3311 |
enabled: imageIsLoadedHolder |
2592 | 3312 |
label: 'Copy' |
3313 |
translateLabel: true |
|
3314 |
labelImage: (ResourceRetriever ImageEditor copyIcon 'Copy') |
|
3315 |
choice: editMode |
|
3316 |
choiceValue: copy |
|
3317 |
) |
|
3318 |
(MenuItem |
|
3319 |
activeHelpKey: drawModePaste |
|
2792 | 3320 |
enabled: imageIsLoadedHolder |
2592 | 3321 |
label: 'Paste' |
3322 |
translateLabel: true |
|
3323 |
labelImage: (ResourceRetriever ImageEditor pasteIcon 'Paste') |
|
3324 |
choice: editMode |
|
3325 |
choiceValue: paste |
|
1196 | 3326 |
) |
2592 | 3327 |
(MenuItem |
3328 |
activeHelpKey: drawModePasteUnder |
|
2792 | 3329 |
enabled: imageIsLoadedHolder |
2592 | 3330 |
label: 'Paste Under' |
3331 |
translateLabel: true |
|
3332 |
labelImage: (ResourceRetriever ImageEditor pasteUnderIcon 'Paste Under') |
|
3333 |
choice: editMode |
|
3334 |
choiceValue: pasteUnder |
|
1196 | 3335 |
) |
2592 | 3336 |
(MenuItem |
3337 |
activeHelpKey: drawModePasteWithMask |
|
2792 | 3338 |
enabled: imageIsLoadedHolder |
2592 | 3339 |
label: 'Paste with Mask' |
3340 |
translateLabel: true |
|
3341 |
labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon 'Paste with Mask') |
|
3342 |
choice: editMode |
|
3343 |
choiceValue: pasteWithMask |
|
1579 | 3344 |
) |
2592 | 3345 |
(MenuItem |
3346 |
activeHelpKey: drawModeSpecial |
|
2792 | 3347 |
enabled: imageIsLoadedHolder |
2592 | 3348 |
label: 'Special' |
3349 |
translateLabel: true |
|
3350 |
labelImage: (ResourceRetriever ImageEditor specialIcon 'Special') |
|
3351 |
choice: editMode |
|
3352 |
choiceValue: specialOperation |
|
1411 | 3353 |
) |
1196 | 3354 |
) |
3355 |
nil |
|
3356 |
nil |
|
400 | 3357 |
) |
2792 | 3358 |
|
3359 |
"Modified: / 04-07-2010 / 10:18:08 / cg" |
|
1558 | 3360 |
! |
3361 |
||
3362 |
previewMenu |
|
3363 |
"This resource specification was automatically generated |
|
3364 |
by the MenuEditor of ST/X." |
|
3365 |
||
3366 |
"Do not manually edit this!! If it is corrupted, |
|
3367 |
the MenuEditor may not be able to read the specification." |
|
3368 |
||
3369 |
" |
|
3370 |
MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu |
|
3371 |
(Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp |
|
3372 |
" |
|
3373 |
||
3374 |
<resource: #menu> |
|
3375 |
||
3376 |
^ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3377 |
#(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3378 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3379 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3380 |
label: 'TileMode' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3381 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3382 |
indication: tileModeHolder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3383 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3384 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3385 |
label: '-' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3386 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3387 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3388 |
label: 'Background Color' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3389 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3390 |
submenu: |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3391 |
(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3392 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3393 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3394 |
label: 'Gray' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3395 |
translateLabel: true |
2792 | 3396 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3397 |
choiceValue: nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3398 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3399 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3400 |
label: 'Black' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3401 |
translateLabel: true |
2792 | 3402 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3403 |
choiceValue: black |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3404 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3405 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3406 |
label: 'White' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3407 |
translateLabel: true |
2792 | 3408 |
choice: previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3409 |
choiceValue: white |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3410 |
) |
1774 | 3411 |
(MenuItem |
3412 |
label: '-' |
|
3413 |
) |
|
3414 |
(MenuItem |
|
3415 |
label: 'Red' |
|
3416 |
translateLabel: true |
|
2792 | 3417 |
choice: previewBackgroundColorHolder |
1774 | 3418 |
choiceValue: red |
3419 |
) |
|
3420 |
(MenuItem |
|
3421 |
label: 'Green' |
|
3422 |
translateLabel: true |
|
2792 | 3423 |
choice: previewBackgroundColorHolder |
1774 | 3424 |
choiceValue: green |
3425 |
) |
|
3426 |
(MenuItem |
|
3427 |
label: 'Blue' |
|
3428 |
translateLabel: true |
|
2792 | 3429 |
choice: previewBackgroundColorHolder |
1774 | 3430 |
choiceValue: blue |
3431 |
) |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3432 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3433 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3434 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3435 |
) |
1558 | 3436 |
) |
3437 |
) |
|
3438 |
nil |
|
3439 |
nil |
|
3440 |
) |
|
2792 | 3441 |
|
3442 |
"Modified: / 04-07-2010 / 10:20:09 / cg" |
|
1637 | 3443 |
! |
3444 |
||
3445 |
toolsMenuToolbar |
|
3446 |
"This resource specification was automatically generated |
|
3447 |
by the MenuEditor of ST/X." |
|
3448 |
||
3449 |
"Do not manually edit this!! If it is corrupted, |
|
3450 |
the MenuEditor may not be able to read the specification." |
|
3451 |
||
2881 | 3452 |
|
1637 | 3453 |
" |
3454 |
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar |
|
3455 |
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp |
|
3456 |
" |
|
3457 |
||
3458 |
<resource: #menu> |
|
3459 |
||
3460 |
^ |
|
2881 | 3461 |
#(Menu |
3462 |
( |
|
3463 |
(MenuItem |
|
3464 |
activeHelpKey: drawModePoint |
|
3465 |
enabled: imageIsLoadedHolder |
|
3466 |
label: 'Point' |
|
3467 |
translateLabel: true |
|
3468 |
isButton: true |
|
3469 |
labelImage: (ResourceRetriever ImageEditor pointIcon) |
|
3470 |
choice: editMode |
|
3471 |
choiceValue: point |
|
1637 | 3472 |
) |
2881 | 3473 |
(MenuItem |
3474 |
activeHelpKey: drawModeSpray |
|
3475 |
enabled: imageIsLoadedHolder |
|
3476 |
label: 'Spray' |
|
3477 |
translateLabel: true |
|
3478 |
isButton: true |
|
3479 |
labelImage: (ResourceRetriever ImageEditor sprayIcon) |
|
3480 |
choice: editMode |
|
3481 |
choiceValue: spray |
|
2375 | 3482 |
) |
2881 | 3483 |
(MenuItem |
3484 |
activeHelpKey: drawModeBox |
|
3485 |
enabled: imageIsLoadedHolder |
|
3486 |
label: 'Rect' |
|
3487 |
translateLabel: true |
|
3488 |
isButton: true |
|
3489 |
labelImage: (ResourceRetriever ImageEditor rectIcon) |
|
3490 |
choice: editMode |
|
3491 |
choiceValue: box |
|
1637 | 3492 |
) |
2881 | 3493 |
(MenuItem |
3494 |
activeHelpKey: drawModeFilledBox |
|
3495 |
enabled: imageIsLoadedHolder |
|
3496 |
label: 'FillRect' |
|
3497 |
translateLabel: true |
|
3498 |
isButton: true |
|
3499 |
labelImage: (ResourceRetriever ImageEditor fillRectIcon) |
|
3500 |
choice: editMode |
|
3501 |
choiceValue: filledBox |
|
1637 | 3502 |
) |
2881 | 3503 |
(MenuItem |
3504 |
activeHelpKey: drawModeCircle |
|
3505 |
enabled: imageIsLoadedHolder |
|
3506 |
label: 'Circle' |
|
3507 |
translateLabel: true |
|
3508 |
isButton: true |
|
3509 |
labelImage: (ResourceRetriever ImageEditor circleIcon) |
|
3510 |
choice: editMode |
|
3511 |
choiceValue: circle |
|
2375 | 3512 |
) |
2881 | 3513 |
(MenuItem |
3514 |
activeHelpKey: drawModeFill |
|
3515 |
enabled: imageIsLoadedHolder |
|
3516 |
label: 'Fill' |
|
3517 |
translateLabel: true |
|
3518 |
isButton: true |
|
3519 |
labelImage: (ResourceRetriever ImageEditor fillIcon) |
|
3520 |
choice: editMode |
|
3521 |
choiceValue: fill |
|
1637 | 3522 |
) |
2881 | 3523 |
(MenuItem |
3524 |
activeHelpKey: drawModeCopy |
|
3525 |
enabled: imageIsLoadedHolder |
|
3526 |
label: 'Copy' |
|
3527 |
translateLabel: true |
|
3528 |
isButton: true |
|
3529 |
labelImage: (ResourceRetriever ImageEditor copyIcon) |
|
3530 |
choice: editMode |
|
3531 |
choiceValue: copy |
|
1637 | 3532 |
) |
2881 | 3533 |
(MenuItem |
3534 |
activeHelpKey: drawModePasteWithMask |
|
3535 |
enabled: imageIsLoadedHolder |
|
3536 |
label: 'Paste With Mask' |
|
3537 |
translateLabel: true |
|
3538 |
isButton: true |
|
3539 |
labelImage: (ResourceRetriever ImageEditor pasteWithMaskIcon) |
|
3540 |
choice: editMode |
|
3541 |
choiceValue: pasteWithMask |
|
1637 | 3542 |
) |
2881 | 3543 |
(MenuItem |
3544 |
activeHelpKey: drawModePaste |
|
3545 |
enabled: imageIsLoadedHolder |
|
3546 |
label: 'Paste' |
|
3547 |
translateLabel: true |
|
3548 |
isButton: true |
|
3549 |
labelImage: (ResourceRetriever ImageEditor pasteIcon) |
|
3550 |
choice: editMode |
|
3551 |
choiceValue: paste |
|
1637 | 3552 |
) |
2881 | 3553 |
(MenuItem |
3554 |
activeHelpKey: drawModePasteUnder |
|
3555 |
enabled: imageIsLoadedHolder |
|
3556 |
label: 'Paste Under' |
|
3557 |
translateLabel: true |
|
3558 |
isButton: true |
|
3559 |
labelImage: (ResourceRetriever ImageEditor pasteUnderIcon) |
|
3560 |
choice: editMode |
|
3561 |
choiceValue: pasteUnder |
|
1637 | 3562 |
) |
2881 | 3563 |
(MenuItem |
3564 |
activeHelpKey: drawModeSpecial |
|
3565 |
enabled: imageIsLoadedHolder |
|
3566 |
label: 'Special' |
|
3567 |
translateLabel: true |
|
3568 |
isButton: true |
|
3569 |
labelImage: (ResourceRetriever ImageEditor specialIcon) |
|
3570 |
choice: editMode |
|
3571 |
choiceValue: specialOperation |
|
1637 | 3572 |
) |
3573 |
) |
|
3574 |
nil |
|
3575 |
nil |
|
3576 |
) |
|
400 | 3577 |
! ! |
3578 |
||
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3579 |
!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
|
3580 |
|
1900 | 3581 |
colorTableColumns |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3582 |
"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
|
3583 |
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
|
3584 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3585 |
"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
|
3586 |
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
|
3587 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3588 |
" |
1975 | 3589 |
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
|
3590 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3591 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3592 |
<resource: #tableColumns> |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3593 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3594 |
^#( |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3595 |
(DataSetColumnSpec |
2174 | 3596 |
activeHelpKey: '' |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3597 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3598 |
rendererType: rowSelector |
2712 | 3599 |
backgroundSelector: theColorItself: |
3600 |
selectedBackgroundSelector: theColorItself: |
|
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3601 |
isResizeable: false |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3602 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3603 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3604 |
label: 'R' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3605 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3606 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3607 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3608 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3609 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3610 |
model: redFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3611 |
writeSelector: redAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3612 |
selectSelector: canSelectRedInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3613 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3614 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3615 |
label: 'G' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3616 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3617 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3618 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3619 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3620 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3621 |
model: greenFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3622 |
writeSelector: greenAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3623 |
selectSelector: canSelectGreenInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3624 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3625 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3626 |
label: 'B' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3627 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3628 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3629 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3630 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3631 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3632 |
model: blueFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3633 |
writeSelector: blueAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3634 |
selectSelector: canSelectBlueInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3635 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3636 |
) |
2174 | 3637 |
|
3638 |
"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
|
3639 |
! ! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3640 |
|
400 | 3641 |
!ImageEditor methodsFor:'accessing'! |
3642 |
||
3643 |
image |
|
767 | 3644 |
"returns the current editing image" |
400 | 3645 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3646 |
^ imageEditView image |
400 | 3647 |
! |
3648 |
||
3649 |
postOpenAction: anAction |
|
767 | 3650 |
"sets an action which is evaluated after opening" |
400 | 3651 |
|
3652 |
postOpenAction := anAction |
|
1381 | 3653 |
! |
3654 |
||
3655 |
resourceClass:aClass |
|
3656 |
imageEditView resourceClass:aClass |
|
400 | 3657 |
! ! |
3658 |
||
2767 | 3659 |
!ImageEditor methodsFor:'accessing-behavior'! |
3660 |
||
3661 |
allowedToChangeImageDimensionAndDepth |
|
3662 |
"used to edit an existing image's contents only (Expecco)" |
|
3663 |
||
3664 |
^ allowedToChangeImageDimensionAndDepth ? true |
|
3665 |
! |
|
3666 |
||
3667 |
allowedToChangeImageDimensionAndDepth:aBoolean |
|
3668 |
"used to edit an existing image's contents only (Expecco)" |
|
3669 |
||
3670 |
allowedToChangeImageDimensionAndDepth := aBoolean |
|
3671 |
! ! |
|
3672 |
||
1398 | 3673 |
!ImageEditor methodsFor:'accessing-views'! |
400 | 3674 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3675 |
colorDataSetView |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3676 |
"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
|
3677 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3678 |
^(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
|
3679 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3680 |
"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
|
3681 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3682 |
|
487 | 3683 |
coordLabel |
767 | 3684 |
"returns the view the coord label" |
487 | 3685 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3686 |
^self componentAt: #coordLabel |
487 | 3687 |
! |
3688 |
||
400 | 3689 |
imageEditView |
911 | 3690 |
"returns the view of the image" |
400 | 3691 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3692 |
imageEditView isNil ifTrue:[ |
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3693 |
imageEditView := (self componentAt: #imageEditView) scrolledView. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3694 |
imageEditView addDependent:self. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3695 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3696 |
^ imageEditView |
1345 | 3697 |
|
3698 |
"Modified: / 10.2.2000 / 23:19:20 / cg" |
|
400 | 3699 |
! |
3700 |
||
3701 |
imagePreView |
|
767 | 3702 |
"returns the preview of the image" |
400 | 3703 |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3704 |
|imagePreViewSubViews| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3705 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3706 |
imagePreViewSubViews := (self componentAt: #imagePreView) subViews. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3707 |
|
2043 | 3708 |
"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
|
3709 |
imagePreViewSubViews isEmptyOrNil ifTrue:[ |
2043 | 3710 |
^ nil |
3711 |
]. |
|
3712 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
3713 |
^ imagePreViewSubViews first |
475 | 3714 |
! ! |
3715 |
||
400 | 3716 |
!ImageEditor methodsFor:'aspects'! |
3717 |
||
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3718 |
activityInfoHolder |
1987 | 3719 |
^ self infoLabelHolder |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3720 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3721 |
"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
|
3722 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3723 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3724 |
colorColumnAdaptor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3725 |
^ self |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3726 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3727 |
"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
|
3728 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3729 |
|
2792 | 3730 |
hasClassAndSelectorDefinedHolder |
1054 | 3731 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3732 |
|cls| |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3733 |
|
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3734 |
(cls := imageEditView resourceClass) notNil |
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3735 |
and:[imageEditView resourceSelector notNil] |
1054 | 3736 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3737 |
|
2792 | 3738 |
"Created: / 04-07-2010 / 10:11:10 / cg" |
3739 |
! |
|
3740 |
||
3741 |
hasClassDefinedHolder |
|
1054 | 3742 |
^ [ |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
3743 |
imageEditView resourceClass notNil |
1054 | 3744 |
] |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3745 |
|
2792 | 3746 |
"Created: / 04-07-2010 / 10:11:47 / cg" |
3747 |
! |
|
3748 |
||
3749 |
hasColorSelectedHolder |
|
3195 | 3750 |
^ [ self selectedColors value notEmptyOrNil "self selectedColorIndexOrNil notNil" ] |
2792 | 3751 |
|
3752 |
"Created: / 04-07-2010 / 10:12:22 / cg" |
|
2651 | 3753 |
! |
3754 |
||
1008 | 3755 |
hasColormap |
2792 | 3756 |
^ self image notNil and:[self image colorMap notNil] |
3757 |
||
3758 |
"Created: / 30-09-1998 / 23:53:55 / cg" |
|
3759 |
"Modified: / 04-07-2010 / 10:13:26 / cg" |
|
1008 | 3760 |
! |
3761 |
||
2651 | 3762 |
hasColormapAndColorSelected |
2792 | 3763 |
^ [ self hasColormapHolder value and:[self hasColorSelectedHolder value]] |
3764 |
||
3765 |
"Modified: / 04-07-2010 / 10:13:13 / cg" |
|
3766 |
! |
|
3767 |
||
3195 | 3768 |
hasColormapAndSingleColorSelected |
3769 |
^ [ self hasColormapHolder value and:[self hasSingleColorSelectedHolder value]] |
|
3770 |
||
3771 |
"Modified: / 04-07-2010 / 10:13:13 / cg" |
|
3772 |
! |
|
3773 |
||
2792 | 3774 |
hasColormapHolder |
3775 |
^ [self hasColormap] |
|
3776 |
||
3777 |
"Created: / 04-07-2010 / 10:13:05 / cg" |
|
3778 |
! |
|
3779 |
||
3195 | 3780 |
hasSingleColorSelectedHolder |
3781 |
^ [ self selectedColors value size == 1 "self selectedColorIndexOrNil notNil" ] |
|
3782 |
||
3783 |
"Created: / 04-07-2010 / 10:12:22 / cg" |
|
3784 |
! |
|
3785 |
||
2812 | 3786 |
imageHasImageSequence |
3080 | 3787 |
|img| |
3788 |
||
3789 |
^ (img := self image) notNil and:[img imageSequence notNil] |
|
2812 | 3790 |
|
3791 |
"Created: / 21-10-2010 / 14:35:45 / cg" |
|
3792 |
! |
|
3793 |
||
3794 |
imageHasImageSequenceHolder |
|
3795 |
|holder| |
|
3796 |
||
3797 |
(holder := builder bindingAt:#imageHasImageSequenceHolder) isNil ifTrue:[ |
|
3798 |
builder aspectAt:#imageHasImageSequenceHolder put:(holder := false asValue). |
|
3799 |
holder value:(self imageHasImageSequence). |
|
3800 |
]. |
|
3801 |
^ holder |
|
3802 |
||
3803 |
"Modified: / 21-10-2010 / 14:36:57 / cg" |
|
3804 |
! |
|
3805 |
||
3806 |
imageHasNextImage |
|
3807 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) < self image imageSequence size ] |
|
3808 |
||
3809 |
"Created: / 21-10-2010 / 14:37:10 / cg" |
|
3810 |
! |
|
3811 |
||
2792 | 3812 |
imageHasNextImageHolder |
2812 | 3813 |
|holder| |
3814 |
||
3815 |
(holder := builder bindingAt:#imageHasNextImageHolder) isNil ifTrue:[ |
|
3816 |
builder aspectAt:#imageHasNextImageHolder put:(holder := false asValue). |
|
3817 |
holder value:(self imageHasNextImage). |
|
3818 |
]. |
|
3819 |
^ holder |
|
3820 |
||
3821 |
"Modified: / 21-10-2010 / 14:37:40 / cg" |
|
3822 |
! |
|
3823 |
||
3824 |
imageHasPreviousImage |
|
3825 |
^ self imageHasImageSequence and:[ (imageSeqNr ? 1) > 1 ] |
|
3826 |
||
3827 |
"Created: / 21-10-2010 / 14:37:21 / cg" |
|
3828 |
! |
|
3829 |
||
3830 |
imageHasPreviousImageHolder |
|
3831 |
|holder| |
|
3832 |
||
3833 |
(holder := builder bindingAt:#imageHasPreviousImageHolder) isNil ifTrue:[ |
|
3834 |
builder aspectAt:#imageHasPreviousImageHolder put:(holder := false asValue). |
|
3835 |
holder value:(self imageHasPreviousImage). |
|
3836 |
]. |
|
3837 |
^ holder |
|
3838 |
||
3839 |
"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
|
3840 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
3841 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3842 |
imageInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3843 |
|holder| |
2792 | 3844 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3845 |
(holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3846 |
builder aspectAt:#imageInfoHolder put:(holder := '' asValue). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3847 |
]. |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3848 |
^ holder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3849 |
|
2792 | 3850 |
"Modified: / 04-07-2010 / 10:15:14 / cg" |
400 | 3851 |
! |
3852 |
||
2767 | 3853 |
imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
3854 |
"returns whether an image is loaded as value holder" |
|
3855 |
||
3856 |
^ [ |
|
2792 | 3857 |
self imageIsLoadedHolder value |
2767 | 3858 |
and:[ self allowedToChangeImageDimensionAndDepth ] |
3859 |
] |
|
2792 | 3860 |
|
3861 |
"Modified: / 04-07-2010 / 10:15:43 / cg" |
|
2767 | 3862 |
! |
3863 |
||
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3864 |
imageIsLoadedAndClassDefined |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3865 |
"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
|
3866 |
|
2792 | 3867 |
^ [self hasClassAndSelectorDefinedHolder value |
3868 |
and:[self imageIsLoadedHolder value]] |
|
3869 |
||
3870 |
"Created: / 31-07-1998 / 02:04:18 / cg" |
|
3871 |
"Modified: / 04-07-2010 / 10:15:48 / cg" |
|
3872 |
! |
|
3873 |
||
3874 |
imageIsLoadedHolder |
|
3875 |
"returns whether an image is loaded as value holder" |
|
3876 |
||
3877 |
|holder| |
|
3878 |
||
3879 |
(holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
3880 |
builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
3881 |
]. |
|
3882 |
^ holder |
|
3883 |
||
3884 |
"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
|
3885 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
3886 |
|
400 | 3887 |
listOfColors |
1896 | 3888 |
"returns the list of colors" |
3889 |
||
3890 |
|list| |
|
3891 |
||
3892 |
(list := builder bindingAt:#listOfColors) isNil ifTrue:[ |
|
3893 |
builder aspectAt:#listOfColors put:(list := List new). |
|
3894 |
list addDependent:self. |
|
400 | 3895 |
]. |
1896 | 3896 |
^ list |
400 | 3897 |
! |
3898 |
||
1987 | 3899 |
magnificationHolder |
3900 |
"returns current magnification of the image as an AspectAdaptor" |
|
3901 |
||
3902 |
|holder| |
|
3903 |
(holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[ |
|
3904 |
builder aspectAt:#valueOfMagnification put:( |
|
3905 |
holder := AspectAdaptor new subject:self; forAspect:#magnification) |
|
3906 |
]. |
|
3907 |
^ holder |
|
3908 |
! |
|
3909 |
||
2881 | 3910 |
penWidthHolder |
3911 |
|holder| |
|
3912 |
||
3913 |
(holder := builder bindingAt:#penWidthHolder) isNil ifTrue:[ |
|
3914 |
builder aspectAt:#penWidthHolder put:(holder := imageEditView penWidth asValue). |
|
3915 |
holder onChangeSend:#penWidthHolderChanged to:self. |
|
3916 |
]. |
|
3917 |
^ holder |
|
3918 |
||
3919 |
"Created: / 15-02-2012 / 22:30:58 / cg" |
|
3920 |
! |
|
3921 |
||
2792 | 3922 |
previewBackgroundColorHolder |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3923 |
|holder| |
2792 | 3924 |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3925 |
(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
|
3926 |
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
|
3927 |
holder addDependent:self. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3928 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3929 |
^ holder |
2792 | 3930 |
|
3931 |
"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
|
3932 |
! |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3933 |
|
3195 | 3934 |
selectedColors |
3935 |
"returns a valueHolder for the current set of selected colors." |
|
3936 |
||
3937 |
|holder| |
|
3938 |
||
3939 |
(holder := builder bindingAt:#selectedColors) isNil ifTrue:[ |
|
3940 |
builder aspectAt:#selectedColors put:(holder := nil asValue). |
|
3941 |
holder onChangeSend:#selectedColorsChanged to:self. |
|
3942 |
]. |
|
3943 |
^ holder |
|
3944 |
! |
|
3945 |
||
400 | 3946 |
selectionOfColor |
1682 | 3947 |
"returns a valueHolder for the current selection of the edit color. |
3948 |
Here, an AspectAdaptor which accesses selectedColorIndex is returned." |
|
400 | 3949 |
|
3950 |
|holder| |
|
1682 | 3951 |
|
400 | 3952 |
(holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[ |
3953 |
builder aspectAt:#selectionOfColor put:( |
|
1682 | 3954 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ). |
400 | 3955 |
]. |
3956 |
^ holder |
|
3957 |
! |
|
3958 |
||
2881 | 3959 |
spraySpotHolder |
3960 |
|holder| |
|
3961 |
||
3962 |
(holder := builder bindingAt:#spraySpotHolder) isNil ifTrue:[ |
|
3963 |
builder aspectAt:#spraySpotHolder put:(holder := imageEditView spraySpot asValue). |
|
3964 |
holder onChangeSend:#spraySpotHolderChanged to:self. |
|
3965 |
]. |
|
3966 |
^ holder |
|
3967 |
||
3968 |
"Created: / 15-02-2012 / 22:36:38 / cg" |
|
3969 |
! |
|
3970 |
||
1558 | 3971 |
tileModeHolder |
3972 |
|holder| |
|
2812 | 3973 |
|
1558 | 3974 |
(holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[ |
3975 |
builder aspectAt:#tileModeHolder put:(holder := false asValue). |
|
3976 |
holder addDependent:self. |
|
3977 |
]. |
|
3978 |
^ holder |
|
2812 | 3979 |
|
3980 |
"Modified: / 21-10-2010 / 14:35:24 / cg" |
|
1558 | 3981 |
! |
3982 |
||
400 | 3983 |
valueOfMagnification |
2308 | 3984 |
<resource: #obsolete> |
767 | 3985 |
"returns current magnification of the image as an AspectAdaptor" |
400 | 3986 |
|
1987 | 3987 |
self obsoleteMethodWarning:'stupid method name - use #magnificationHolder'. |
3988 |
^ self magnificationHolder |
|
400 | 3989 |
! ! |
3990 |
||
767 | 3991 |
!ImageEditor methodsFor:'change & update'! |
3992 |
||
3993 |
findColorMapMode |
|
899 | 3994 |
"finds the colorMapMode for a new image" |
767 | 3995 |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
3996 |
|image newListOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors| |
1054 | 3997 |
|
3998 |
image := self image. |
|
1975 | 3999 |
image isNil ifTrue:[^ self ]. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4000 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4001 |
image mask notNil ifTrue: [ |
1896 | 4002 |
colorMapModeKey := 'masked'. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4003 |
] ifFalse:[ |
1896 | 4004 |
colorMapModeKey := 'depth'. |
1054 | 4005 |
]. |
1896 | 4006 |
colorMapModeKey := colorMapModeKey , image depth printString. |
1967 | 4007 |
self colorMapMode setValue:colorMapModeKey. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4008 |
|
1928 | 4009 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4010 |
image depth > 12 ifTrue:[ |
2447 | 4011 |
newListOfColors := OrderedCollection new. |
2870 | 4012 |
(image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[ |
1927 | 4013 |
someOrAllUsedColors := image usedColorsMax:10000. |
2054 | 4014 |
someOrAllUsedColors notNil ifTrue:[ |
4015 |
someOrAllUsedColors := someOrAllUsedColors asArray. |
|
4016 |
someOrAllUsedColors sort:self sortBlockForColors. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4017 |
newListOfColors addAll:someOrAllUsedColors. |
2054 | 4018 |
"/ listOfColors add:Color black; add:Color white. |
3317 | 4019 |
]. |
4020 |
image mask notNil ifTrue:[ |
|
4021 |
newListOfColors := (Array with:(Color noColor)),newListOfColors. |
|
4022 |
]. |
|
1904 | 4023 |
] ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4024 |
newListOfColors addAll:(image colorMap). |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4025 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4026 |
] ifFalse:[ |
2447 | 4027 |
newListOfColors := OrderedCollection withAll:(self listOfColors). |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4028 |
newListOfColors isEmpty ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4029 |
self colorMapMode: colorMapMode value. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4030 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4031 |
]. |
3317 | 4032 |
"/ image mask notNil ifTrue:[ |
4033 |
"/ newListOfColors := (Array with:(Color noColor)),newListOfColors. |
|
4034 |
"/ ]. |
|
2054 | 4035 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4036 |
newListOfColors notEmptyOrNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4037 |
drawColor1 := newListOfColors at:1. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4038 |
drawColor2 := newListOfColors at:2 ifAbsent:drawColor1. |
2054 | 4039 |
|
4040 |
self hasMask ifTrue: [ |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4041 |
(newListOfColors contains: [:clr| clr = (Color colorId:0)]) |
2054 | 4042 |
ifFalse:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4043 |
newListOfColors addFirst:(Color colorId:0). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4044 |
drawColor1 := newListOfColors at:2. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4045 |
drawColor2 := newListOfColors at:3 ifAbsent:drawColor1. |
2054 | 4046 |
] |
4047 |
]. |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4048 |
"/ imageEditView drawingColors:(Array with: drawColor1 with: drawColor2). |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4049 |
"/ self selectionOfColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4050 |
"/ setValue: 0; |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4051 |
"/ value: (listOfColors indexOf: imageEditView selectedColor). |
767 | 4052 |
]. |
2447 | 4053 |
self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[ |
4054 |
self listOfColors contents:newListOfColors. |
|
4055 |
]. |
|
2870 | 4056 |
|
4057 |
"Modified: / 18-01-2012 / 13:58:38 / cg" |
|
767 | 4058 |
! |
4059 |
||
3195 | 4060 |
selectedColorsChanged |
4061 |
|colorIndices| |
|
4062 |
||
4063 |
(colorIndices := self selectedColors value) isEmptyOrNil ifTrue:[ |
|
4064 |
self selectionOfColor value:nil |
|
4065 |
] ifFalse:[ |
|
4066 |
colorIndices size == 1 ifTrue:[ |
|
4067 |
"/ as single color selected |
|
4068 |
self selectionOfColor value:colorIndices first |
|
4069 |
] ifFalse:[ |
|
4070 |
"/ multipl selected |
|
4071 |
self selectionOfColor value:nil |
|
4072 |
]. |
|
4073 |
]. |
|
4074 |
! |
|
4075 |
||
942 | 4076 |
update:something with:aParameter from:changedObject |
2042 | 4077 |
|clrIndex img imagePreView clr changedColor| |
1436 | 4078 |
|
4079 |
img := self image. |
|
2042 | 4080 |
imagePreView := self imagePreView. |
1558 | 4081 |
|
4082 |
changedObject == self tileModeHolder ifTrue:[ |
|
2042 | 4083 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4084 |
tileMode:(changedObject value) tileOffset:(img extent); |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4085 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4086 |
invalidate. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4087 |
^ self |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4088 |
]. |
2792 | 4089 |
changedObject == self previewBackgroundColorHolder ifTrue:[ |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4090 |
clr := changedObject value isNil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4091 |
ifTrue:[imageEditView viewBackground] |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4092 |
ifFalse:[Color perform:changedObject value]. |
2042 | 4093 |
imagePreView |
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4094 |
viewBackground:clr; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4095 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
4096 |
invalidate. |
1558 | 4097 |
^ self |
4098 |
]. |
|
4099 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4100 |
changedObject == self listOfColors ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4101 |
something == #at: ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4102 |
"/ colormap entry changed at aParameter |
960 | 4103 |
|
4104 |
clrIndex := aParameter. |
|
4105 |
(self hasMask) ifTrue:[ |
|
4106 |
clrIndex := clrIndex - 1. |
|
4107 |
]. |
|
1928 | 4108 |
changedColor := changedObject at:aParameter. |
4109 |
img colorMap notNil ifTrue:[ |
|
4110 |
img colorMap at:clrIndex put:changedColor. |
|
4111 |
self colorMapChanged. |
|
4112 |
] ifFalse:[ |
|
4113 |
drawingColormap notNil ifTrue:[ |
|
4114 |
drawingColormap at:clrIndex put:changedColor. |
|
4115 |
]. |
|
4116 |
]. |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4117 |
^ self |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4118 |
]. |
1896 | 4119 |
^ self |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4120 |
]. |
1124 | 4121 |
|
4122 |
changedObject == imageEditView undoImages ifTrue:[ |
|
1987 | 4123 |
self canUndoHolder value:(changedObject notEmpty). |
1124 | 4124 |
^ self. |
4125 |
]. |
|
4126 |
||
1345 | 4127 |
changedObject == imageEditView ifTrue:[ |
4128 |
something == #imageColors ifTrue:[ |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4129 |
self updateListOfColorsAndColormapMode. |
1345 | 4130 |
^ self. |
4131 |
]. |
|
4132 |
something == #image ifTrue:[ |
|
2812 | 4133 |
self updateAfterImageChange. |
2728 | 4134 |
imagePreView image:img scroll:false. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4135 |
self updateListOfColorsAndColormapMode. |
1558 | 4136 |
self tileModeHolder value ifTrue:[ |
2042 | 4137 |
imagePreView tileMode:true tileOffset:(img extent). |
1558 | 4138 |
]. |
1345 | 4139 |
^ self. |
4140 |
]. |
|
4141 |
something == #subImageIn ifTrue:[ |
|
2042 | 4142 |
imagePreView image ~~ img ifTrue:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4143 |
self error:'internal error' mayProceed:true. |
1406 | 4144 |
]. |
1558 | 4145 |
self tileModeHolder value ifTrue:[ |
2042 | 4146 |
imagePreView invalidate. |
1558 | 4147 |
] ifFalse:[ |
2042 | 4148 |
imagePreView invalidate:aParameter. |
1558 | 4149 |
]. |
1345 | 4150 |
^ self. |
4151 |
]. |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
4152 |
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
|
4153 |
(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
|
4154 |
"/ no color/mask */ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
4155 |
"/ self halt. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
4156 |
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
|
4157 |
] ifFalse:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
4158 |
clrIndex := self listOfColors indexOf:aParameter. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
4159 |
]. |
3195 | 4160 |
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
|
4161 |
^ self. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
4162 |
]. |
1345 | 4163 |
^ self. |
4164 |
]. |
|
4165 |
||
1880 | 4166 |
changedObject == imageEditView modifiedHolder ifTrue:[ |
4167 |
"/ self halt:'to be implemented'. |
|
4168 |
^ self |
|
4169 |
]. |
|
4170 |
||
1345 | 4171 |
changedObject == imageEditView image ifTrue:[ |
2042 | 4172 |
"/ self halt:'to be implemented'. |
2812 | 4173 |
self updateAfterImageChange. |
1345 | 4174 |
^ self. |
4175 |
]. |
|
4176 |
||
942 | 4177 |
super update:something with:aParameter from:changedObject |
4178 |
||
2812 | 4179 |
"Modified: / 21-10-2010 / 14:34:31 / cg" |
4180 |
! |
|
4181 |
||
4182 |
updateAfterImageChange |
|
4183 |
|img| |
|
4184 |
||
4185 |
(img := self image) notNil ifTrue:[ |
|
4186 |
img := img onDevice:device. |
|
4187 |
self updateColorsFromImage:img. |
|
4188 |
self findColorMapMode. |
|
4189 |
self updateLabelsAndHistory. |
|
4190 |
||
4191 |
imageSeqNr isNil ifTrue:[ |
|
4192 |
imageSeqNr := 1 |
|
4193 |
]. |
|
4194 |
self imageHasImageSequenceHolder value:(self imageHasImageSequence). |
|
4195 |
self imageHasNextImageHolder value:(self imageHasNextImage). |
|
4196 |
self imageHasPreviousImageHolder value:(self imageHasPreviousImage). |
|
4197 |
] ifFalse:[ |
|
4198 |
self updateForNoImage |
|
4199 |
] |
|
4200 |
||
4201 |
"Modified: / 21-10-2010 / 14:40:45 / cg" |
|
942 | 4202 |
! |
4203 |
||
1900 | 4204 |
updateColorsFromImage:image |
4205 |
|colors| |
|
4206 |
||
2870 | 4207 |
image depth > 16 ifTrue:[ |
4208 |
self listOfColors contents:#(). |
|
4209 |
^ self. |
|
4210 |
]. |
|
4211 |
||
1904 | 4212 |
colors := image colorMap. |
4213 |
colors isNil ifTrue:[ |
|
1906 | 4214 |
Error handle:[:ex | |
4215 |
colors := OrderedCollection new. |
|
4216 |
] do:[ |
|
4217 |
colors := image usedColors asSet. |
|
2870 | 4218 |
]. |
1900 | 4219 |
]. |
1904 | 4220 |
self listOfColors contents:(colors asOrderedCollection). |
2870 | 4221 |
|
4222 |
"Modified: / 18-01-2012 / 13:57:43 / cg" |
|
1900 | 4223 |
! |
4224 |
||
1054 | 4225 |
updateForNoImage |
767 | 4226 |
"updates channels and view, if image is loaded" |
4227 |
||
2792 | 4228 |
self imageIsLoadedHolder value: false. |
767 | 4229 |
self listOfColors removeAll. |
2812 | 4230 |
self imagePreView image: nil. |
4231 |
self imageHasImageSequenceHolder value:false. |
|
4232 |
||
4233 |
"Modified: / 21-10-2010 / 14:39:13 / cg" |
|
767 | 4234 |
! |
4235 |
||
4236 |
updateLabelsAndHistory |
|
4237 |
"updates labels and history, if something has changed" |
|
4238 |
||
1910 | 4239 |
|image| |
4240 |
||
4241 |
image := self image. |
|
4242 |
||
2792 | 4243 |
self imageIsLoadedHolder value: image notNil. |
1910 | 4244 |
image isNil ifTrue: [^nil]. |
767 | 4245 |
|
4246 |
self updateInfoLabel. |
|
4247 |
||
1975 | 4248 |
imageEditView resourceClass notNil ifTrue:[ |
4249 |
imageEditView resourceSelector notNil ifTrue:[ |
|
4250 |
self addHistoryEntryForClass:imageEditView resourceClass selector:imageEditView resourceSelector. |
|
4251 |
] |
|
4252 |
]. |
|
4253 |
||
4254 |
image fileName notNil ifTrue: [ |
|
4255 |
self addHistoryEntryForFile:image fileName. |
|
4256 |
]. |
|
2792 | 4257 |
|
4258 |
"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
|
4259 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4260 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4261 |
updateListOfColorsAndColormapMode |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4262 |
|selectedColor colorMap image| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4263 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4264 |
selectedColor := self selectedColorOrNil. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4265 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4266 |
image := self image. |
1975 | 4267 |
image isNil ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4268 |
self listOfColors removeAll. |
1975 | 4269 |
] ifFalse:[ |
4270 |
colorMap := image colorMap. |
|
2447 | 4271 |
colorMap notNil ifTrue:[ |
4272 |
(colorMap size <= 4096) ifTrue:[ |
|
4273 |
image mask notNil ifTrue:[ |
|
4274 |
colorMap := (Array with:(Color noColor)),colorMap. |
|
4275 |
]. |
|
4276 |
self listOfColors contents:colorMap. |
|
4277 |
] ifFalse:[ |
|
4278 |
self listOfColors removeAll. |
|
4279 |
colorMap isFixedPalette ifTrue:[ |
|
4280 |
image colorMap:nil. |
|
4281 |
image photometric:#rgb. |
|
4282 |
image samplesPerPixel:3. |
|
4283 |
||
4284 |
image bitsPerSample:(Array |
|
4285 |
with:(colorMap bitsRed) |
|
4286 |
with:(colorMap bitsGreen) |
|
4287 |
with:(colorMap bitsBlue)). |
|
4288 |
]. |
|
4289 |
] |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4290 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4291 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4292 |
self findColorMapMode. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4293 |
selectedColor notNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4294 |
self selectColor:selectedColor. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
4295 |
]. |
767 | 4296 |
! ! |
4297 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4298 |
!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
|
4299 |
|
1951 | 4300 |
atColor:anOldColor put:newColor |
1952 | 4301 |
"a color changed to a new color" |
4302 |
||
1930 | 4303 |
|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
|
4304 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4305 |
list := self listOfColors. |
1951 | 4306 |
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
|
4307 |
|
1930 | 4308 |
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
|
4309 |
index ~~ 0 ifTrue:[ |
1928 | 4310 |
oldColor := list at:index. |
4311 |
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
|
4312 |
] ifFalse:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4313 |
self error:'internal error' mayProceed:true. |
1928 | 4314 |
list add:newColor |
4315 |
]. |
|
4316 |
||
4317 |
image := self image. |
|
4318 |
(image colorMap isNil |
|
4319 |
and:[drawingColormap isNil]) ifTrue:[ |
|
4320 |
oldColor notNil ifTrue:[ |
|
4321 |
imageEditView makeUndo. |
|
4322 |
newImage := image copy. |
|
4323 |
newImage |
|
4324 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
4325 |
do:[:x :y :clr | |
|
4326 |
|newClr| |
|
4327 |
||
1951 | 4328 |
newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr]. |
1928 | 4329 |
newImage colorAtX:x y:y put:newClr |
4330 |
]. |
|
4331 |
imageEditView image:newImage. |
|
4332 |
imageEditView setModified. |
|
4333 |
self updateImage. |
|
4334 |
self updateImagePreView. |
|
1930 | 4335 |
|
3195 | 4336 |
self selectedColors value:{oldSel}. |
1930 | 4337 |
imageEditView selectedColorIndex:oldSel. |
4338 |
imageEditView selectedColor:(self listOfColors at:oldSel). |
|
1928 | 4339 |
] |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4340 |
]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4341 |
! |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4342 |
|
942 | 4343 |
blueAtColor:aColor put:newBlue |
4344 |
"helper used to return a new row element, when blue is changed" |
|
4345 |
||
4346 |
|byte| |
|
4347 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4348 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4349 |
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
|
4350 |
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
|
4351 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4352 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4353 |
put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte). |
942 | 4354 |
! |
4355 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4356 |
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
|
4357 |
"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
|
4358 |
|
930 | 4359 |
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
|
4360 |
^ 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
|
4361 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4362 |
"Created: / 26.7.1998 / 12:30:35 / cg" |
930 | 4363 |
"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
|
4364 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4365 |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4366 |
canSelectBlueInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4367 |
^ aColor blueByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4368 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4369 |
"Created: / 7.8.1998 / 22:50:34 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4370 |
"Modified: / 7.8.1998 / 22:52:57 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4371 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4372 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4373 |
canSelectGreenInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4374 |
^ aColor greenByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4375 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4376 |
"Created: / 7.8.1998 / 22:50:22 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4377 |
"Modified: / 7.8.1998 / 22:52:46 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4378 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4379 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4380 |
canSelectRedInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4381 |
^ aColor redByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4382 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4383 |
"Created: / 7.8.1998 / 22:50:00 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4384 |
"Modified: / 7.8.1998 / 22:51:03 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4385 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
4386 |
|
942 | 4387 |
greenAtColor:aColor put:newGreen |
4388 |
"helper used to return a new row element, when green is changed" |
|
4389 |
||
4390 |
|byte| |
|
4391 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4392 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4393 |
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
|
4394 |
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
|
4395 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4396 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4397 |
put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)). |
942 | 4398 |
! |
4399 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4400 |
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
|
4401 |
"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
|
4402 |
|
930 | 4403 |
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
|
4404 |
^ 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
|
4405 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4406 |
"Created: / 26.7.1998 / 12:30:29 / cg" |
930 | 4407 |
"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
|
4408 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4409 |
|
942 | 4410 |
redAtColor:aColor put:newRed |
4411 |
"helper used to return a new row element, when red is changed" |
|
4412 |
||
4413 |
|byte| |
|
4414 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4415 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 4416 |
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
|
4417 |
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
|
4418 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4419 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
4420 |
put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)). |
942 | 4421 |
! |
4422 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4423 |
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
|
4424 |
"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
|
4425 |
|
930 | 4426 |
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
|
4427 |
^ 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
|
4428 |
|
930 | 4429 |
"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
|
4430 |
! |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4431 |
|
2712 | 4432 |
theColorItself:aColor |
4433 |
"an accessor for the table-column" |
|
4434 |
||
1449
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
4435 |
^ 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
|
4436 |
! ! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4437 |
|
2663 | 4438 |
!ImageEditor methodsFor:'defaults'! |
4439 |
||
4440 |
aboutIcon |
|
4441 |
^ self class defaultIcon |
|
4442 |
! ! |
|
4443 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4444 |
!ImageEditor methodsFor:'drag & drop'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4445 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4446 |
canDropObjects:aCollectionOfDropObjects in:aWidget |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4447 |
^ (aCollectionOfDropObjects size == 1) |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4448 |
and:[ aCollectionOfDropObjects |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4449 |
contains:[:dropObject | dropObject isFileObject]] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4450 |
! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4451 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4452 |
dropObjects:aCollectionOfDropObjects in:aWidget at:position |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4453 |
|dropObject| |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4454 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4455 |
dropObject := aCollectionOfDropObjects first. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4456 |
dropObject isFileObject ifTrue:[ |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4457 |
self loadFromFile:dropObject asFilename. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4458 |
] |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4459 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4460 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4461 |
!ImageEditor methodsFor:'event handling'! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4462 |
|
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4463 |
processEvent:anEvent |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4464 |
"Return true, if I have eaten the event" |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4465 |
|
2945 | 4466 |
<resource: #keyboard (#Paste #Copy )> |
4467 |
||
2841 | 4468 |
|view focusView p transformation| |
4469 |
||
4470 |
view := anEvent view. |
|
4471 |
view notNil ifTrue:[ |
|
4472 |
view == self imagePreView ifTrue:[ |
|
4473 |
((anEvent isButtonPressEvent and:[ anEvent button == 1 ]) |
|
4474 |
or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]]) ifTrue:[ |
|
4475 |
p := anEvent x @ anEvent y. |
|
4476 |
(transformation := view transformation) notNil ifTrue:[ |
|
4477 |
p := transformation applyInverseTo:p. |
|
4478 |
]. |
|
4479 |
self imageEditView scrollToMakeVisible:p. |
|
4480 |
^ true. |
|
2546 | 4481 |
]. |
2841 | 4482 |
]. |
4483 |
||
4484 |
anEvent isKeyPressEvent ifTrue:[ |
|
4485 |
focusView := view windowGroup focusView ? view. |
|
4486 |
(focusView isComponentOf:(builder componentAt:#colorDataSetView)) ifTrue:[ |
|
4487 |
anEvent key == #Paste ifTrue:[ |
|
4488 |
self pasteColorIntoColormap. |
|
4489 |
^ true. |
|
4490 |
]. |
|
4491 |
anEvent key == #Copy ifTrue:[ |
|
4492 |
self copyColorFromColormap. |
|
4493 |
^ true. |
|
4494 |
]. |
|
4495 |
]. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4496 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4497 |
]. |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4498 |
^ false. |
2841 | 4499 |
|
4500 |
"Modified: / 04-04-2011 / 13:50:09 / cg" |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4501 |
! ! |
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4502 |
|
672 | 4503 |
!ImageEditor methodsFor:'help'! |
4504 |
||
4505 |
defaultInfoLabel |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4506 |
"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
|
4507 |
some widget with a help text." |
672 | 4508 |
|
1966 | 4509 |
|resourceClass resourceSelector| |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4510 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4511 |
resourceClass := imageEditView resourceClass. |
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
4512 |
resourceClass notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4513 |
resourceSelector := imageEditView resourceSelector. |
1966 | 4514 |
resourceSelector notNil ifTrue:[ |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4515 |
^ resourceClass name, ' >> ', resourceSelector |
1966 | 4516 |
]. |
672 | 4517 |
]. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4518 |
^ 'No class and selector defined.' |
674 | 4519 |
! |
4520 |
||
702 | 4521 |
openDocumentation |
767 | 4522 |
"opens the documentation file of the Image Editor" |
674 | 4523 |
|
763 | 4524 |
self openHTMLDocument: 'tools/uipainter/ImageEditor.html' |
4525 |
||
672 | 4526 |
! ! |
4527 |
||
767 | 4528 |
!ImageEditor methodsFor:'loading'! |
4529 |
||
1975 | 4530 |
loadFromClass:aClass andSelector:aSelector |
4531 |
"loads an image from the method specified by class and selector" |
|
4532 |
||
4533 |
self assert:(aClass isNil or:[aClass isClass]). |
|
4534 |
||
2932
7f305ee14e98
changed: #loadFromClass:andSelector:
Claus Gittinger <cg@exept.de>
parents:
2893
diff
changeset
|
4535 |
(aClass isNil or:[aSelector isNil]) ifTrue:[ |
1975 | 4536 |
imageEditView resourceClass:aClass. |
4537 |
imageEditView resourceSelector:aSelector. |
|
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4538 |
imageEditView image:nil. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4539 |
self clearModified. |
1966 | 4540 |
^ self. |
4541 |
]. |
|
4542 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4543 |
"/ (imageEditView resourceClass == aClass |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4544 |
"/ and:[ imageEditView resourceSelector == aSelector ]) ifTrue:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4545 |
"/ imageEditView modified ifFalse:[ |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4546 |
"/ ^ self. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4547 |
"/ ]. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4548 |
"/ ]. |
1969
f1763f6f4500
stripped down menu, if in browser
Claus Gittinger <cg@exept.de>
parents:
1967
diff
changeset
|
4549 |
|
1975 | 4550 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue:[ |
1966 | 4551 |
self updateAfterImageChange. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4552 |
self clearModified. |
1966 | 4553 |
] |
1975 | 4554 |
|
4555 |
"Modified: / 16.3.1999 / 21:44:41 / cg" |
|
1966 | 4556 |
! |
4557 |
||
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4558 |
loadFromFile:aFileName |
767 | 4559 |
"loads an image from aFileName and sets up color map list and other info labels" |
4560 |
||
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4561 |
self withCursor:Cursor wait do:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
4562 |
(imageEditView loadFromFile: aFileName) notNil ifTrue:[ |
1966 | 4563 |
self updateAfterImageChange |
767 | 4564 |
] |
4565 |
] |
|
960 | 4566 |
|
1057 | 4567 |
"Modified: / 16.3.1999 / 21:44:26 / cg" |
767 | 4568 |
! |
4569 |
||
960 | 4570 |
loadFromImage:anImage |
767 | 4571 |
"loads an image from anImage and sets up color map list and other info labels" |
4572 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4573 |
|img| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4574 |
|
1057 | 4575 |
anImage notNil ifTrue:[ |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4576 |
img := anImage onDevice:device. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4577 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4578 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4579 |
imageEditView image:img. |
1799
e605f0af928a
clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents:
1796
diff
changeset
|
4580 |
imageEditView clearModified. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4581 |
|
1966 | 4582 |
self updateAfterImageChange. |
4583 |
"/ img notNil ifTrue:[ |
|
4584 |
"/ self updateColorsFromImage:img. |
|
4585 |
"/ self findColorMapMode. |
|
4586 |
"/ self updateLabelsAndHistory. |
|
4587 |
"/ ] ifFalse:[ |
|
4588 |
"/ self updateForNoImage |
|
4589 |
"/ ] |
|
960 | 4590 |
|
1057 | 4591 |
"Modified: / 16.3.1999 / 21:43:56 / cg" |
767 | 4592 |
! |
4593 |
||
1975 | 4594 |
loadFromOrPrepareForClass: aClass andSelector: aSelector |
767 | 4595 |
"loads an image by evaluating aMessage; |
4596 |
if no image could extract from aMessage; do set the class and the selector from |
|
4597 |
the aMessage for a saving at the end of editing" |
|
4598 |
||
1975 | 4599 |
(imageEditView loadFromClass:aClass andSelector:aSelector) notNil ifTrue: [ |
1900 | 4600 |
self updateColorsFromImage:self image. |
767 | 4601 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4602 |
] ifFalse: [ |
1975 | 4603 |
imageEditView resourceClass: aClass. |
4604 |
imageEditView resourceSelector:aSelector. |
|
767 | 4605 |
]. |
4606 |
self updateLabelsAndHistory. |
|
1057 | 4607 |
|
4608 |
"Modified: / 16.3.1999 / 21:45:07 / cg" |
|
767 | 4609 |
! ! |
4610 |
||
400 | 4611 |
!ImageEditor methodsFor:'menu modes'! |
4612 |
||
975 | 4613 |
colorMapMode |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4614 |
"returns the colorMapMode" |
400 | 4615 |
|
975 | 4616 |
colorMapMode isNil ifTrue: [colorMapMode := '' asValue]. |
400 | 4617 |
|
975 | 4618 |
^colorMapMode |
400 | 4619 |
! |
4620 |
||
975 | 4621 |
editMode |
4622 |
"returns editMode" |
|
400 | 4623 |
|
1054 | 4624 |
editMode isNil ifTrue: [ |
975 | 4625 |
editMode := #point asValue. |
1329 | 4626 |
editMode onChangeEvaluate:[imageEditView editMode:(editMode value)] |
975 | 4627 |
]. |
4628 |
||
4629 |
^editMode |
|
400 | 4630 |
! |
4631 |
||
975 | 4632 |
mouseKeyColorMode |
4633 |
"returns mouseKeyColorMode" |
|
400 | 4634 |
|
1345 | 4635 |
mouseKeyColorMode isNil ifTrue:[ |
975 | 4636 |
mouseKeyColorMode := 1 asValue. |
1345 | 4637 |
mouseKeyColorMode onChangeEvaluate: [ |
4638 |
imageEditView mouseKeyColorMode:mouseKeyColorMode value. |
|
3195 | 4639 |
self selectedColors value:{ self listOfColors indexOf:imageEditView selectedColor }. |
1345 | 4640 |
] |
956 | 4641 |
]. |
400 | 4642 |
|
975 | 4643 |
^mouseKeyColorMode |
1345 | 4644 |
|
4645 |
"Modified: / 10.2.2000 / 23:16:42 / cg" |
|
400 | 4646 |
! ! |
4647 |
||
1558 | 4648 |
!ImageEditor methodsFor:'private'! |
4649 |
||
1975 | 4650 |
checkModified |
4651 |
imageEditView modified value ifTrue:[ |
|
4652 |
(Dialog |
|
4653 |
confirm:(resources string:'Image was not saved. Proceed anyway ?') |
|
4654 |
yesLabel:(resources string:'Proceed') |
|
4655 |
noLabel:(resources string:'Cancel') |
|
4656 |
initialAnswer:false |
|
4657 |
) ifFalse: [^false]. |
|
4658 |
||
4659 |
imageEditView clearModified. |
|
4660 |
]. |
|
4661 |
^ true |
|
4662 |
||
4663 |
"Modified: / 29.7.1998 / 18:55:24 / cg" |
|
4664 |
! |
|
4665 |
||
1960 | 4666 |
pointFromString:aString |
4667 |
|p s x y| |
|
4668 |
||
4669 |
p := Object readFromString:aString onError:nil. |
|
1962 | 4670 |
p isPoint ifTrue:[^ p]. |
1960 | 4671 |
|
4672 |
s := aString readStream. |
|
4673 |
x := Number readFrom:s onError:nil. |
|
4674 |
x notNil ifTrue:[ |
|
4675 |
s skipSeparators. |
|
1962 | 4676 |
[s atEnd not and:[s peek isDigit not]] whileTrue:[s next]. |
1960 | 4677 |
y := Number readFrom:s onError:nil. |
1961 | 4678 |
^ x @ (y ? x) |
1960 | 4679 |
]. |
1962 | 4680 |
^ nil |
1960 | 4681 |
! |
4682 |
||
1939 | 4683 |
sortBlockForColors |
3195 | 4684 |
^ self sortBlockForColorsByHLS. |
4685 |
"/ ^ self sortBlockForColorsByRGB |
|
4686 |
! |
|
4687 |
||
4688 |
sortBlockForColorsByHLS |
|
4689 |
^ [:a :b | |
|
4690 |
|h1 h2 s1 s2 l1 l2| |
|
4691 |
||
4692 |
h1 := a hue ? 0. |
|
4693 |
h2 := b hue ? 0. |
|
4694 |
(h1 between: h2-30 and:h2+30) ifTrue:[ |
|
4695 |
l1 := a light. |
|
4696 |
l2 := b light. |
|
4697 |
l1 = l2 ifTrue:[ |
|
4698 |
a saturation < b saturation |
|
4699 |
] ifFalse:[ |
|
4700 |
l1 < l2 |
|
4701 |
]. |
|
4702 |
"/ s1 := a saturation. |
|
4703 |
"/ s2 := b saturation. |
|
4704 |
"/ s1 = s2 ifTrue:[ |
|
4705 |
"/ a light < b light |
|
4706 |
"/ ] ifFalse:[ |
|
4707 |
"/ s1 < s2 |
|
4708 |
"/ ] |
|
4709 |
] ifFalse:[ |
|
4710 |
h1 < h2 |
|
4711 |
] |
|
4712 |
] |
|
4713 |
! |
|
4714 |
||
4715 |
sortBlockForColorsByRGB |
|
1939 | 4716 |
^ [:a :b | |
4717 |
a redByte == b redByte ifTrue:[ |
|
4718 |
a greenByte == b greenByte ifTrue:[ |
|
4719 |
a blueByte < b blueByte |
|
4720 |
] ifFalse:[ |
|
4721 |
a greenByte < b greenByte |
|
4722 |
] |
|
4723 |
] ifFalse:[ |
|
4724 |
a redByte < b redByte |
|
4725 |
] |
|
4726 |
] |
|
4727 |
! |
|
4728 |
||
1598 | 4729 |
updateImage |
4730 |
|img| |
|
4731 |
||
4732 |
img := imageEditView image. |
|
4733 |
imageEditView image:img. |
|
4734 |
self fetchImageData. |
|
4735 |
! |
|
4736 |
||
1558 | 4737 |
updateImagePreView |
4738 |
self tileModeHolder value ifTrue:[ |
|
4739 |
self imagePreView tileMode:true tileOffset:(self image extent). |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4740 |
]. |
3253 | 4741 |
self imagePreView |
4742 |
setImage:(self image) scroll:false invalidate:false; "/ true. |
|
4743 |
invalidate. |
|
1558 | 4744 |
! ! |
4745 |
||
535 | 4746 |
!ImageEditor methodsFor:'queries'! |
4747 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4748 |
hasLastGrabScreenArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4749 |
^ [ lastGrabbedScreenArea notNil ] |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4750 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
4751 |
|
960 | 4752 |
hasMask |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4753 |
^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask'] |
960 | 4754 |
|
4755 |
"Created: / 18.8.1998 / 17:17:38 / cg" |
|
4756 |
! |
|
4757 |
||
1975 | 4758 |
modified |
4759 |
^ imageEditView modified |
|
4760 |
! |
|
4761 |
||
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4762 |
modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4763 |
super modified:aBoolean. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4764 |
imageEditView modified:aBoolean |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4765 |
! |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
4766 |
|
535 | 4767 |
preferredExtent |
767 | 4768 |
"returns the preferred extent" |
535 | 4769 |
|
2423
0c5ac1daf0e4
changed #preferredExtent - formating
Stefan Vogel <sv@exept.de>
parents:
2420
diff
changeset
|
4770 |
^ super preferredExtent max: (Screen current width//3)@(Screen current height//3.5) |
535 | 4771 |
! ! |
4772 |
||
400 | 4773 |
!ImageEditor methodsFor:'selection'! |
4774 |
||
4775 |
magnification |
|
767 | 4776 |
"returns the magnification of the image" |
400 | 4777 |
|
911 | 4778 |
self imageEditView isNil ifTrue: [^1]. |
4779 |
^imageEditView magnification x |
|
400 | 4780 |
! |
4781 |
||
4782 |
magnification: aValue |
|
767 | 4783 |
"sets the magnification of the image" |
400 | 4784 |
|
905 | 4785 |
|magnification| |
4786 |
magnification := (aValue ? 1) asPoint. |
|
911 | 4787 |
(magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil]. |
4788 |
imageEditView magnification: magnification |
|
400 | 4789 |
! |
4790 |
||
4791 |
selectedColorIndex |
|
767 | 4792 |
"returns the index of the selected color" |
400 | 4793 |
|
4794 |
^selectedColorIndex |
|
4795 |
! |
|
4796 |
||
4797 |
selectedColorIndex: anIndex |
|
767 | 4798 |
"sets the index of the selected color" |
400 | 4799 |
|
1054 | 4800 |
|clr pixel| |
4801 |
||
4802 |
selectedColorIndex := anIndex. |
|
2447 | 4803 |
anIndex isNil ifTrue:[^ self]. |
1054 | 4804 |
clr := self listOfColors at:anIndex ifAbsent:nil. |
4805 |
clr isNil ifTrue:[^ self]. |
|
4806 |
||
1075 | 4807 |
pixel := anIndex - 1. |
1054 | 4808 |
(self listOfColors at:1) = Color noColor ifTrue:[ |
4809 |
anIndex == 1 ifTrue:[ |
|
4810 |
pixel := nil. "/ mask |
|
4811 |
] ifFalse:[ |
|
1075 | 4812 |
pixel := pixel - 1 |
1054 | 4813 |
] |
4814 |
]. |
|
4815 |
imageEditView selectedColorIndex:pixel. |
|
4816 |
imageEditView selectedColor:clr. |
|
400 | 4817 |
! ! |
4818 |
||
1716 | 4819 |
!ImageEditor methodsFor:'startup & release'! |
400 | 4820 |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4821 |
closeDownViews |
1644 | 4822 |
builder notNil ifTrue:[ |
4823 |
DefaultRelativeSizes := |
|
4824 |
Array |
|
1998 | 4825 |
with:(builder componentAt:#mainPanel) relativeCorners |
1644 | 4826 |
with:(builder componentAt:#verticalPanel) relativeCorners. |
4827 |
]. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4828 |
super closeDownViews |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4829 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4830 |
|
400 | 4831 |
closeRequest |
2016 | 4832 |
"asks for permission before closing" |
4833 |
||
4834 |
imageEditView checkModified ifTrue:[ |
|
4835 |
super closeRequest |
|
4836 |
] |
|
400 | 4837 |
! |
4838 |
||
1980 | 4839 |
commonPostBuild |
1975 | 4840 |
imageEditView undoImages addDependent:self. |
4841 |
imageEditView imageInfoHolder:(self imageInfoHolder). |
|
4842 |
imageEditView activityInfoHolder:(self activityInfoHolder). |
|
4843 |
||
4844 |
imageEditView clickInfoCallBack:[:button :point | |
|
4845 |
|mouseButtonColorToolBar| |
|
3170 | 4846 |
button <= 2 ifTrue:[ |
4847 |
mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar. |
|
4848 |
(mouseButtonColorToolBar itemAt:button) toggleIndication. |
|
4849 |
mouseButtonColorToolBar do: [:i| i updateIndicators]. |
|
4850 |
]. |
|
1975 | 4851 |
]. |
4852 |
||
4853 |
imageEditView addDependent:self. |
|
4854 |
imageEditView modifiedHolder addDependent:self. |
|
4855 |
||
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4856 |
DefaultRelativeSizes notNil ifTrue:[ |
1998 | 4857 |
(builder componentAt:#mainPanel) relativeCorners:DefaultRelativeSizes first. |
1980 | 4858 |
(builder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4859 |
]. |
1995 | 4860 |
|
1996 | 4861 |
"/ using masters infoHolder ? |
4862 |
(builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[ |
|
1998 | 4863 |
(builder componentAt:#mainPanel) layout bottomOffset:0. |
1995 | 4864 |
(builder componentAt:#infoBarSubSpec) beInvisible |
4865 |
] |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4866 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
4867 |
|
1980 | 4868 |
open |
4869 |
"after opening, sets the masterApplication of the imageEditView to self" |
|
4870 |
||
4871 |
super open. |
|
4872 |
||
4873 |
imageEditView := (self componentAt: #imageEditView) subViews first. |
|
4874 |
! |
|
4875 |
||
400 | 4876 |
postOpenWith:aBuilder |
767 | 4877 |
"after opening, sets the masterApplication of the imageEditView to self; |
4878 |
evaluate the postOpenAction" |
|
400 | 4879 |
|
1921 | 4880 |
postOpenAction value. |
400 | 4881 |
|
1250 | 4882 |
super postOpenWith:aBuilder. |
4883 |
||
4884 |
aBuilder keyboardProcessor menuBar:nil. |
|
2339
a06d19fe7b32
click on preview to scroll editView;
Claus Gittinger <cg@exept.de>
parents:
2308
diff
changeset
|
4885 |
self windowGroup addPreEventHook:self. |
400 | 4886 |
! ! |
4887 |
||
1715 | 4888 |
!ImageEditor methodsFor:'user actions-colormap'! |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4889 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4890 |
addColorToColormap |
1682 | 4891 |
self addColorToColormap:(Color black) |
4892 |
! |
|
4893 |
||
4894 |
addColorToColormap:newColor |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4895 |
|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
|
4896 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4897 |
img := self image. |
1499
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4898 |
img isNil ifTrue:[ |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4899 |
self warn:'No Image.'. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4900 |
^ self |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4901 |
]. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
4902 |
|
1054 | 4903 |
depth := img depth. |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4904 |
cMap := img colorMap. |
1054 | 4905 |
cMap isNil ifTrue:[ |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4906 |
drawingColormap isNil ifTrue:[ |
1916 | 4907 |
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
|
4908 |
drawingColormap := OrderedCollection new. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4909 |
]. |
1682 | 4910 |
drawingColormap add:newColor. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4911 |
self listOfColors contents:drawingColormap. |
3195 | 4912 |
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
|
4913 |
"/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs. |
1054 | 4914 |
^ self |
4915 |
]. |
|
4916 |
||
1583 | 4917 |
("(depth == 1)" false |
1054 | 4918 |
or:[cMap size == (1 bitShift:depth)]) ifTrue:[ |
4919 |
depth >= 8 ifTrue:[ |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4920 |
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
|
4921 |
^ self |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4922 |
]. |
1916 | 4923 |
(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
|
4924 |
ifFalse:[ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4925 |
^ self |
1057 | 4926 |
]. |
4927 |
||
4928 |
imageEditView makeUndo. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4929 |
img mask notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4930 |
newMode := 'masked' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4931 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4932 |
newMode := 'depth' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4933 |
]. |
1057 | 4934 |
self colorMapMode:newMode. |
4935 |
] ifFalse:[ |
|
4936 |
imageEditView makeUndo. |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4937 |
]. |
1054 | 4938 |
|
4939 |
cMap := cMap asArray. |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4940 |
listOfColors := self listOfColors. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4941 |
oldCListSize := listOfColors size. |
1054 | 4942 |
|
1682 | 4943 |
newColorMap := cMap copyWith:newColor. |
1054 | 4944 |
|
4945 |
newImage := img species new |
|
4946 |
width:img width |
|
4947 |
height:img height |
|
4948 |
depth:depth |
|
4949 |
fromArray:img bits. |
|
4950 |
||
4951 |
newImage colorMap:newColorMap. |
|
4952 |
newImage fileName:img fileName. |
|
4953 |
newImage mask:(img mask copy). |
|
4954 |
||
4955 |
(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
|
4956 |
listOfColors contents: newImage colorMap. |
1054 | 4957 |
self findColorMapMode. |
4958 |
"/ 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
|
4959 |
listOfColors size > (oldCListSize + 1) ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
4960 |
listOfColors removeLast |
1054 | 4961 |
]. |
3195 | 4962 |
self selectedColors value:{listOfColors size}. |
1054 | 4963 |
self updateLabelsAndHistory. |
4964 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4965 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4966 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
1057 | 4967 |
"Modified: / 16.3.1999 / 21:57:26 / cg" |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4968 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
4969 |
|
1650 | 4970 |
changeHLS |
4971 |
"interactive Hue/Light/Saturation editing" |
|
4972 |
||
4973 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4974 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
2438 | 4975 |
originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels |
4976 |
anyChange | |
|
1652 | 4977 |
|
1741 | 4978 |
"/ compute the averageColor in the background (while asking user) |
2438 | 4979 |
avgColorHolder := nil asValue. |
4980 |
previewImageHolder := nil asValue. |
|
4981 |
||
1652 | 4982 |
readySema := Semaphore new. |
4983 |
[ |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4984 |
|image| |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4985 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4986 |
image := imageEditView image. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4987 |
originalColormap := image colorMap copy. |
2438 | 4988 |
originalPixels := image bits. |
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
4989 |
avgColor := image averageColor. |
2438 | 4990 |
avgColorHolder value:avgColor. |
4991 |
||
4992 |
previewImage := self image magnifiedPreservingRatioTo:100@100. |
|
4993 |
previewImageHolder value: previewImage. |
|
4994 |
originalPreviewColormap := previewImage colorMap copy. |
|
4995 |
originalPreviewPixels := previewImage bits. |
|
4996 |
||
1652 | 4997 |
readySema signal. |
4998 |
] forkAt:7. |
|
1649 | 4999 |
|
5000 |
acceptChannel := TriggerValue new. |
|
5001 |
||
5002 |
firstChange := true. |
|
2438 | 5003 |
anyChange := false. |
1649 | 5004 |
|
1651 | 5005 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
5006 |
Color |
|
5007 |
hue:((clr hue) ? 0 + hShift) |
|
3172 | 5008 |
light:((clr light * lFactor / 100) min:100) |
5009 |
saturation:((clr saturation * sFactor / 100) min:100)]. |
|
1652 | 5010 |
|
1649 | 5011 |
shiftAction := |
5012 |
[ |
|
1650 | 5013 |
|hShift lFactor sFactor| |
5014 |
||
1649 | 5015 |
acceptChannel value:true. |
5016 |
||
5017 |
firstChange ifTrue:[ |
|
5018 |
imageEditView makeUndo. |
|
5019 |
firstChange := false. |
|
2438 | 5020 |
anyChange := true. |
1649 | 5021 |
]. |
1652 | 5022 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
1650 | 5023 |
|
5024 |
hShift := hueShift value. |
|
5025 |
lFactor := lightValue value. |
|
5026 |
sFactor := saturationValue value. |
|
5027 |
||
1652 | 5028 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
5029 |
||
2438 | 5030 |
previewImage |
5031 |
colorMap:originalPreviewColormap copy; |
|
5032 |
bits:originalPreviewPixels copy; |
|
5033 |
release; |
|
5034 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
5035 |
previewImageHolder value:nil; value:previewImage. |
|
5036 |
||
1652 | 5037 |
shiftProcess notNil ifTrue:[ |
5038 |
shiftProcess terminate. |
|
5039 |
shiftProcess waitUntilTerminated. |
|
5040 |
shiftProcess := nil. |
|
5041 |
]. |
|
5042 |
shiftProcess := |
|
5043 |
[ |
|
5044 |
[ |
|
1656 | 5045 |
imageEditView image |
5046 |
colorMap:originalColormap copy; |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5047 |
bits:originalPixels copy; |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5048 |
release; |
1656 | 5049 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
1652 | 5050 |
self updateImage. |
5051 |
self updateInfoLabel. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5052 |
self updateImagePreView. |
1652 | 5053 |
] ensure:[ shiftProcess := nil ]. |
5054 |
] forkAt:7. |
|
1649 | 5055 |
]. |
5056 |
||
5057 |
bindings := IdentityDictionary new. |
|
1650 | 5058 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
1656 | 5059 |
hueShift onChangeEvaluate:shiftAction. |
1650 | 5060 |
|
5061 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
1656 | 5062 |
lightValue onChangeEvaluate:shiftAction. |
1650 | 5063 |
|
5064 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
1656 | 5065 |
saturationValue onChangeEvaluate:shiftAction. |
1650 | 5066 |
|
1649 | 5067 |
bindings at:#acceptChannel put:acceptChannel. |
1652 | 5068 |
bindings at:#hlsColor put:avgColorHolder. |
2438 | 5069 |
bindings at:#previewImageHolder put:previewImageHolder. |
1650 | 5070 |
|
5071 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
1649 | 5072 |
ifFalse:[ |
2438 | 5073 |
anyChange ifTrue:[ |
1649 | 5074 |
imageEditView undo |
5075 |
] |
|
5076 |
]. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5077 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5078 |
(p := shiftProcess) notNil ifTrue:[ |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5079 |
p waitUntilTerminated. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
5080 |
]. |
2438 | 5081 |
|
5082 |
anyChange ifTrue:[ |
|
5083 |
self updateImage. |
|
5084 |
self updateImagePreView. |
|
5085 |
]. |
|
1649 | 5086 |
! |
5087 |
||
3195 | 5088 |
changeHLSOfColors:colorsToShift |
5089 |
"interactive Hue/Light/Saturation editing" |
|
5090 |
||
5091 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
5092 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
|
5093 |
originalPixels p previewImage previewImageHolder originalPreviewColormap originalPreviewPixels |
|
5094 |
anyChange | |
|
5095 |
||
5096 |
"/ compute the averageColor in the background (while asking user) |
|
5097 |
avgColorHolder := nil asValue. |
|
5098 |
previewImageHolder := nil asValue. |
|
5099 |
||
5100 |
readySema := Semaphore new. |
|
5101 |
[ |
|
5102 |
|image red green blue| |
|
5103 |
||
5104 |
image := imageEditView image. |
|
5105 |
originalColormap := image colorMap copy. |
|
5106 |
originalPixels := image bits. |
|
5107 |
red := (colorsToShift collect:[:clr | clr red]) average. |
|
5108 |
green := (colorsToShift collect:[:clr | clr green]) average. |
|
5109 |
blue := (colorsToShift collect:[:clr | clr blue]) average. |
|
5110 |
avgColor := Color red:red green:green blue:blue. |
|
5111 |
avgColorHolder value:avgColor. |
|
5112 |
||
5113 |
previewImage := self image magnifiedPreservingRatioTo:100@100. |
|
5114 |
previewImageHolder value: previewImage. |
|
5115 |
originalPreviewColormap := previewImage colorMap copy. |
|
5116 |
originalPreviewPixels := previewImage bits. |
|
5117 |
||
5118 |
readySema signal. |
|
5119 |
] forkAt:7. |
|
5120 |
||
5121 |
acceptChannel := TriggerValue new. |
|
5122 |
||
5123 |
firstChange := true. |
|
5124 |
anyChange := false. |
|
5125 |
||
5126 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
|
5127 |
Color |
|
5128 |
hue:((clr hue) ? 0 + hShift) |
|
5129 |
light:((clr light * lFactor / 100) min:100) |
|
5130 |
saturation:((clr saturation * sFactor / 100) min:100)]. |
|
5131 |
||
5132 |
shiftAction := |
|
5133 |
[ |
|
5134 |
|hShift lFactor sFactor| |
|
5135 |
||
5136 |
acceptChannel value:true. |
|
5137 |
||
5138 |
firstChange ifTrue:[ |
|
5139 |
imageEditView makeUndo. |
|
5140 |
firstChange := false. |
|
5141 |
anyChange := true. |
|
5142 |
]. |
|
5143 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
|
5144 |
||
5145 |
hShift := hueShift value. |
|
5146 |
lFactor := lightValue value. |
|
5147 |
sFactor := saturationValue value. |
|
5148 |
||
5149 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
|
5150 |
||
5151 |
previewImage |
|
5152 |
colorMap:originalPreviewColormap copy; |
|
5153 |
bits:originalPreviewPixels copy; |
|
5154 |
release; |
|
5155 |
colorMapProcessing:[:clr | |
|
5156 |
(colorsToShift includes:clr) ifTrue:[ |
|
5157 |
shiftedColor value:clr value:hShift value:lFactor value:sFactor. |
|
5158 |
] ifFalse:[ |
|
5159 |
clr |
|
5160 |
] |
|
5161 |
]. |
|
5162 |
previewImageHolder value:nil; value:previewImage. |
|
5163 |
||
5164 |
shiftProcess notNil ifTrue:[ |
|
5165 |
shiftProcess terminate. |
|
5166 |
shiftProcess waitUntilTerminated. |
|
5167 |
shiftProcess := nil. |
|
5168 |
]. |
|
5169 |
||
5170 |
shiftProcess := |
|
5171 |
[ |
|
5172 |
[ |
|
5173 |
imageEditView image |
|
5174 |
colorMap:originalColormap copy; |
|
5175 |
bits:originalPixels copy; |
|
5176 |
release; |
|
5177 |
colorMapProcessing:[:clr | |
|
5178 |
(colorsToShift includes:clr) ifTrue:[ |
|
5179 |
shiftedColor value:clr value:hShift value:lFactor value:sFactor. |
|
5180 |
] ifFalse:[ |
|
5181 |
clr |
|
5182 |
] |
|
5183 |
]. |
|
5184 |
self updateImage. |
|
5185 |
self updateInfoLabel. |
|
5186 |
self updateImagePreView. |
|
5187 |
] ensure:[ shiftProcess := nil ]. |
|
5188 |
] forkAt:7. |
|
5189 |
]. |
|
5190 |
||
5191 |
bindings := IdentityDictionary new. |
|
5192 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
|
5193 |
hueShift onChangeEvaluate:shiftAction. |
|
5194 |
||
5195 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
5196 |
lightValue onChangeEvaluate:shiftAction. |
|
5197 |
||
5198 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
5199 |
saturationValue onChangeEvaluate:shiftAction. |
|
5200 |
||
5201 |
bindings at:#acceptChannel put:acceptChannel. |
|
5202 |
bindings at:#hlsColor put:avgColorHolder. |
|
5203 |
bindings at:#previewImageHolder put:previewImageHolder. |
|
5204 |
||
5205 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
5206 |
ifFalse:[ |
|
5207 |
anyChange ifTrue:[ |
|
5208 |
imageEditView undo |
|
5209 |
] |
|
5210 |
]. |
|
5211 |
||
5212 |
(p := shiftProcess) notNil ifTrue:[ |
|
5213 |
p waitUntilTerminated. |
|
5214 |
]. |
|
5215 |
||
5216 |
anyChange ifTrue:[ |
|
5217 |
self updateImage. |
|
5218 |
self updateImagePreView. |
|
5219 |
]. |
|
5220 |
! |
|
5221 |
||
2652 | 5222 |
clearColormapEntry0AndMaskedPixels |
5223 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
5224 |
0 and then clear all masked pixels (to pixelValue 0). |
|
5225 |
This is required for windows icons to be really transparent" |
|
5226 |
||
5227 |
|index colorMap| |
|
5228 |
||
5229 |
self compressColorMap. |
|
5230 |
colorMap := self image colorMap. |
|
5231 |
(colorMap includes:(Color black)) ifFalse:[ |
|
5232 |
self addColorToColormap:(Color black). |
|
5233 |
colorMap := self image colorMap. |
|
5234 |
]. |
|
5235 |
index := colorMap indexOf:(Color black). |
|
5236 |
index == 1 ifFalse:[ |
|
5237 |
self sortColorMap. |
|
5238 |
colorMap := self image colorMap. |
|
5239 |
]. |
|
5240 |
self clearMaskedPixels |
|
5241 |
! |
|
5242 |
||
1403 | 5243 |
clearMaskedPixels |
5244 |
"clear all masked pixels (to pixelValue 0)" |
|
5245 |
||
2652 | 5246 |
|newImage| |
5247 |
||
5248 |
newImage := self image clearMaskedPixels. |
|
5249 |
0 to:newImage height - 1 do:[:y | |
|
5250 |
0 to:newImage width - 1 do:[:x | |
|
5251 |
(newImage maskAtX:x y:y) == 0 ifTrue:[ |
|
5252 |
newImage pixelAtX:x y:y put:0 |
|
1460 | 5253 |
] |
1403 | 5254 |
] |
2652 | 5255 |
]. |
5256 |
||
5257 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5258 |
self fetchImageData. |
|
1403 | 5259 |
] |
5260 |
! |
|
5261 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5262 |
colorMapChanged |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5263 |
|img| |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5264 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5265 |
img := self image. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5266 |
img release. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
5267 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
5268 |
self imageEditView invalidate. |
960 | 5269 |
self imagePreView invalidate. |
5270 |
||
5271 |
"/ (imageEditView image:img) notNil ifTrue:[ |
|
5272 |
"/ self updateLabelsAndHistory. |
|
5273 |
"/ self imagePreView image:img |
|
5274 |
"/ ] |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5275 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5276 |
"Created: / 7.8.1998 / 22:26:10 / cg" |
960 | 5277 |
"Modified: / 18.8.1998 / 17:08:55 / cg" |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5278 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
5279 |
|
975 | 5280 |
colorMapMode:aMode |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5281 |
"calculates a new color map for the image from aMode" |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5282 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5283 |
|depth numColors newColorMap newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5284 |
oldImage image newColors realColorMap oldFileName |
1008 | 5285 |
usedColors useNearest usageCounts tmpBits tmpMap quest |
5286 |
prevMode maskThreshold maskImage| |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5287 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5288 |
self withExecuteCursorDo:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5289 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5290 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
5291 |
prevMode := colorMapMode value. |
1008 | 5292 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5293 |
newColorMap := self class listOfColorMaps at:aMode. |
3230 | 5294 |
(aMode == #depth32 or:[aMode == #masked32]) ifTrue:[ |
2572 | 5295 |
depth := 32. |
5296 |
] ifFalse:[ |
|
3230 | 5297 |
(aMode == #depth24 or:[aMode == #masked24]) ifTrue:[ |
5298 |
depth := 24. |
|
5299 |
] ifFalse:[ |
|
5300 |
depth := (newColorMap size log:2) asInteger. |
|
5301 |
]. |
|
2572 | 5302 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5303 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5304 |
useNearest := false. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5305 |
depth == 1 ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5306 |
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
|
5307 |
] ifFalse:[ |
1008 | 5308 |
prevMode isNil ifTrue:[ |
5309 |
quest := 'Compute colormap (or use standard)' |
|
5310 |
] ifFalse:[ |
|
5311 |
quest := 'Keep colormap (or use standard)' |
|
5312 |
] |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5313 |
]. |
1008 | 5314 |
((prevMode = aMode) |
1057 | 5315 |
or:[depth > oldImage depth |
5316 |
or:[self confirm:(resources string:quest)]]) ifTrue:[ |
|
1937 | 5317 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 5318 |
|
5319 |
"/ keep the colormap |
|
5320 |
newColorMap atAllPut:Color black. |
|
5321 |
depth > oldImage depth ifTrue:[ |
|
5322 |
"/ easy - simply copy the part |
|
5323 |
numColors := 1 bitShift:oldImage depth. |
|
5324 |
0 to:numColors-1 do:[:pixel | |
|
5325 |
newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel) |
|
1008 | 5326 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5327 |
] ifFalse:[ |
1935 | 5328 |
"/ see if all used color fit the new colormap |
5329 |
usedColors := oldImage usedColorsMax:(1 bitShift:depth). |
|
5330 |
(usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[ |
|
5331 |
usedColors := oldImage realUsedColors |
|
5332 |
]. |
|
5333 |
(usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[ |
|
5334 |
"/ yea - just install them |
|
5335 |
usedColors asArray keysAndValuesDo:[:idx :clr | |
|
5336 |
newColorMap at:idx put:clr |
|
5337 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5338 |
] ifFalse:[ |
1935 | 5339 |
"/ copy over those that are most often used. |
5340 |
oldImage depth < 8 ifTrue:[ |
|
5341 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
5342 |
oldImage bits |
|
5343 |
expandPixels:(oldImage depth) |
|
5344 |
width:oldImage width |
|
5345 |
height:oldImage height |
|
5346 |
into:tmpBits |
|
5347 |
mapping:nil. |
|
986 | 5348 |
] ifFalse:[ |
1935 | 5349 |
oldImage depth == 8 ifTrue:[ |
5350 |
tmpBits := oldImage bits |
|
5351 |
] ifFalse:[ |
|
5352 |
colorMapMode value:prevMode. |
|
5353 |
self findColorMapMode. |
|
5354 |
self warn:('Too many used colors in image (', oldImage usedColors size printString , ').'). |
|
5355 |
^ self |
|
5356 |
"/ (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs)) |
|
5357 |
"/ ifFalse:[. |
|
5358 |
"/ ^ self |
|
5359 |
"/ ]. |
|
5360 |
"/ self image: (Image newForDepth:depth) fromImage:oldImage. |
|
5361 |
"/ ^ self. |
|
5362 |
] |
|
5363 |
]. |
|
5364 |
usageCounts := tmpBits usageCounts. |
|
5365 |
tmpMap := Array new:usageCounts size. |
|
5366 |
oldImage colorMap asArray keysAndValuesDo:[:i :clr | |
|
5367 |
tmpMap at:i put:clr |
|
5368 |
]. |
|
5369 |
usageCounts sort:[:a :b | a > b] with:tmpMap. |
|
5370 |
||
5371 |
1 to:(1 bitShift:depth) do:[:idx | |
|
5372 |
newColorMap at:idx put:(tmpMap at:idx) |
|
5373 |
]. |
|
5374 |
||
5375 |
useNearest := Dialog |
|
5376 |
confirmWithCancel:(resources |
|
5377 |
stringWithCRs:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?' |
|
5378 |
with:usedColors size |
|
5379 |
with:(1 bitShift:depth)) |
|
5380 |
labels:(resources array:#('Cancel' 'First' 'Nearest')). |
|
5381 |
useNearest isNil ifTrue:[ |
|
1124 | 5382 |
colorMapMode value:prevMode. |
1935 | 5383 |
^ self "/ cancel |
5384 |
]. |
|
5385 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5386 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5387 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5388 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5389 |
"/ standard colormap |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5390 |
usedColors := oldImage usedColors. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5391 |
(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
|
5392 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
5393 |
confirmWithCancel:(resources |
1916 | 5394 |
stringWithCRs:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?' |
5395 |
) |
|
1542 | 5396 |
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
|
5397 |
useNearest isNil ifTrue:[ |
1542 | 5398 |
colorMapMode value:prevMode. |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5399 |
^ self "/ cancel |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5400 |
]. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
5401 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5402 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5403 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5404 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5405 |
|
2260 | 5406 |
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
|
5407 |
newImage depth:depth. |
3230 | 5408 |
depth >= 16 ifTrue:[ |
5409 |
depth == 32 ifTrue:[ |
|
5410 |
newImage colorMap:nil. |
|
5411 |
newImage samplesPerPixel:4. |
|
5412 |
newImage photometric:#rgba. |
|
5413 |
] ifFalse:[ |
|
5414 |
newImage colorMap:nil. |
|
5415 |
newImage samplesPerPixel:3. |
|
5416 |
newImage photometric:#rgb. |
|
5417 |
]. |
|
5418 |
]. |
|
3125
9d5624af77ab
Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents:
3122
diff
changeset
|
5419 |
"/ newImage photometric:oldImage photometric. |
2260 | 5420 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5421 |
oldFileName := oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5422 |
|
1008 | 5423 |
Image imageErrorSignal handle:[:ex| |
3227 | 5424 |
"/ arrive here only if not all colors can be represented; |
5425 |
"/ then do a more expensive nearest color search |
|
1008 | 5426 |
Color colorErrorSignal handle:[:ex| |
1542 | 5427 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5428 |
imageEditView undo. |
1008 | 5429 |
^ self warn:(resources string:'Conversion failed !!') |
5430 |
] do:[ |
|
1393 | 5431 |
newImage := Image newForDepth:depth. |
3103 | 5432 |
newImage |
5433 |
width:oldImage width height:oldImage height depth:depth; |
|
5434 |
colorMap:newColorMap; |
|
5435 |
photometric:#palette; |
|
5436 |
bits:(ByteArray new:(newImage bytesPerRow * newImage height)); |
|
5437 |
mask:oldImage mask. |
|
2260 | 5438 |
|
3227 | 5439 |
oldImage |
5440 |
colorsFromX:0 y:0 |
|
5441 |
toX:(oldImage width-1) y:(oldImage height-1) |
|
5442 |
do:[:x :y :clr | |
|
5443 |
|newColor| |
|
5444 |
||
5445 |
(newColorMap includes:clr) |
|
5446 |
ifTrue: [newColor := clr] |
|
5447 |
ifFalse: [ |
|
5448 |
newColor := clr nearestIn:newColorMap. |
|
5449 |
useNearest ifFalse:[ |
|
5450 |
(newColor deltaFrom:clr) > 0.5 ifTrue:[ |
|
5451 |
newColor := oldImage colorFromValue:0 |
|
5452 |
] |
|
1008 | 5453 |
] |
3227 | 5454 |
]. |
5455 |
newImage colorAtX:x y:y put:newColor. |
|
5456 |
]. |
|
5457 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5458 |
image := newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5459 |
]. |
1008 | 5460 |
] do:[ |
3227 | 5461 |
image := newImage fromImage:oldImage photometric:oldImage photometric. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5462 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5463 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5464 |
(aMode asString startsWith:'mask') ifTrue:[ |
1008 | 5465 |
image mask isNil ifTrue:[ |
1949 | 5466 |
false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
1008 | 5467 |
maskThreshold := 0.1. |
5468 |
maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
|
5469 |
] ifFalse:[ |
|
3122 | 5470 |
maskImage := ImageMask extent:image extent. |
1770 | 5471 |
maskImage bits:(ByteArray |
1008 | 5472 |
new:(maskImage bytesPerRow * maskImage height) |
5473 |
withAll:16rFF). |
|
5474 |
||
5475 |
"/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
|
5476 |
]. |
|
5477 |
image mask:maskImage. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5478 |
]. |
1008 | 5479 |
] ifFalse:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5480 |
image mask: nil. |
3317 | 5481 |
oldImage mask notNil ifTrue:[ |
5482 |
newImage depth == 32 ifTrue:[ |
|
5483 |
newImage computeAlphaValuesFromMask:oldImage mask |
|
5484 |
]. |
|
5485 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5486 |
]. |
1935 | 5487 |
|
1937 | 5488 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 5489 |
realColorMap := OrderedCollection new. |
5490 |
image realColorMap do:[:clr| |
|
5491 |
(realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
|
5492 |
]. |
|
5493 |
newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
|
5494 |
newColorMap do:[:clr| |
|
5495 |
((newColors size < newColorMap size) and: [(newColors includes: clr) not]) |
|
5496 |
ifTrue:[ |
|
5497 |
newColors add: clr |
|
5498 |
] |
|
5499 |
]. |
|
5500 |
image colorMap: newColors. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5501 |
]. |
1446 | 5502 |
image fileName: oldFileName. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5503 |
|
1054 | 5504 |
(imageEditView image: image) notNil ifTrue:[ |
1446 | 5505 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5506 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5507 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5508 |
|
2174 | 5509 |
"Modified: / 20-07-2007 / 09:18:59 / cg" |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5510 |
! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5511 |
|
2192 | 5512 |
colorize |
5513 |
"interactive Hue editing" |
|
5514 |
||
5515 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
5516 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
|
5517 |
originalPixels p| |
|
5518 |
||
5519 |
"/ compute the averageColor in the background (while asking user) |
|
5520 |
readySema := Semaphore new. |
|
5521 |
[ |
|
5522 |
|image| |
|
5523 |
||
5524 |
image := imageEditView image. |
|
5525 |
originalColormap := image colorMap copy. |
|
5526 |
avgColor := image averageColor. |
|
5527 |
originalPixels := image bits. |
|
5528 |
readySema signal. |
|
5529 |
] forkAt:7. |
|
5530 |
||
5531 |
acceptChannel := TriggerValue new. |
|
5532 |
avgColorHolder := avgColor asValue. |
|
5533 |
||
5534 |
firstChange := true. |
|
5535 |
||
5536 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
|
5537 |
Color |
|
5538 |
hue:((clr hue) ? 0 + hShift) |
|
3173 | 5539 |
light:((clr light * lFactor / 100) min:100) |
5540 |
saturation:(((clr saturation max:20) * sFactor / 100) min:100)]. |
|
2192 | 5541 |
|
5542 |
||
5543 |
shiftAction := |
|
5544 |
[ |
|
5545 |
|hShift lFactor sFactor| |
|
5546 |
||
5547 |
acceptChannel value:true. |
|
5548 |
||
5549 |
firstChange ifTrue:[ |
|
5550 |
imageEditView makeUndo. |
|
5551 |
firstChange := false. |
|
5552 |
]. |
|
5553 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
|
5554 |
||
5555 |
hShift := hueShift value. |
|
5556 |
lFactor := lightValue value. |
|
5557 |
sFactor := saturationValue value. |
|
5558 |
||
5559 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
|
5560 |
||
5561 |
shiftProcess notNil ifTrue:[ |
|
5562 |
shiftProcess terminate. |
|
5563 |
shiftProcess waitUntilTerminated. |
|
5564 |
shiftProcess := nil. |
|
5565 |
]. |
|
5566 |
shiftProcess := |
|
5567 |
[ |
|
5568 |
[ |
|
5569 |
imageEditView image |
|
5570 |
colorMap:originalColormap copy; |
|
5571 |
bits:originalPixels copy; |
|
5572 |
release; |
|
5573 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
|
5574 |
self updateImage. |
|
5575 |
self updateInfoLabel. |
|
5576 |
self updateImagePreView. |
|
5577 |
] ensure:[ shiftProcess := nil ]. |
|
5578 |
] forkAt:7. |
|
5579 |
]. |
|
5580 |
||
5581 |
bindings := IdentityDictionary new. |
|
5582 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
|
5583 |
hueShift onChangeEvaluate:shiftAction. |
|
5584 |
||
5585 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
5586 |
lightValue onChangeEvaluate:shiftAction. |
|
5587 |
||
5588 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
5589 |
saturationValue onChangeEvaluate:shiftAction. |
|
5590 |
||
5591 |
bindings at:#acceptChannel put:acceptChannel. |
|
5592 |
bindings at:#hlsColor put:avgColorHolder. |
|
5593 |
||
5594 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
5595 |
ifFalse:[ |
|
5596 |
firstChange ~~ true ifTrue:[ |
|
5597 |
imageEditView undo |
|
5598 |
] |
|
5599 |
]. |
|
5600 |
||
5601 |
(p := shiftProcess) notNil ifTrue:[ |
|
5602 |
p waitUntilTerminated. |
|
5603 |
]. |
|
5604 |
self updateImage. |
|
5605 |
self updateImagePreView. |
|
5606 |
||
5607 |
"Created: / 01-11-2007 / 23:27:37 / cg" |
|
5608 |
! |
|
5609 |
||
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5610 |
compressColorMap |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5611 |
"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
|
5612 |
|
2893 | 5613 |
|newImage| |
5614 |
||
5615 |
newImage := self image. |
|
5616 |
newImage compressColorMap. |
|
2652 | 5617 |
|
5618 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
5619 |
self fetchImageData. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
5620 |
] |
1008 | 5621 |
! |
5622 |
||
1852 | 5623 |
copyColorFromColormap |
1871 | 5624 |
imageEditView setClipboardObject:(self selectedColorOrNil) |
1852 | 5625 |
! |
5626 |
||
2054 | 5627 |
ditherToDepth |
5628 |
|depth| |
|
5629 |
||
5630 |
depth := Dialog request:'New depth ?'. |
|
5631 |
depth isEmptyOrNil ifTrue:[^ self]. |
|
5632 |
depth := Number readFrom:depth onError:nil. |
|
5633 |
depth isNil ifTrue:[^ self]. |
|
5634 |
||
5635 |
self ditherToDepth:depth |
|
5636 |
||
5637 |
"Created: / 07-07-2006 / 13:22:10 / cg" |
|
5638 |
! |
|
5639 |
||
5640 |
ditherToDepth:depth |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5641 |
|ditherColors newImage useStandardColors nGrey greyColorsAlready additionalGreyColors moreColors d| |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5642 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5643 |
useStandardColors := true. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5644 |
"/ 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
|
5645 |
"/ useStandardColors isNil ifTrue:[^ self]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5646 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5647 |
useStandardColors ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5648 |
depth = 1 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5649 |
ditherColors := Array with:(Color black) with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5650 |
] ifFalse:[ depth = 2 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5651 |
ditherColors := Array |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5652 |
with:(Color black) |
3140 | 5653 |
with:(Color darkGray) |
5654 |
with:(Color lightGray) |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5655 |
with:(Color white). |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5656 |
] ifFalse:[ depth = 3 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5657 |
ditherColors := Color colorCubeWithRed:2 green:2 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5658 |
] ifFalse:[ depth = 4 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5659 |
ditherColors := Color vgaColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5660 |
] ifFalse:[ depth = 5 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5661 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:2. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5662 |
] ifFalse:[ depth = 6 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5663 |
ditherColors := Color colorCubeWithRed:4 green:4 blue:3. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5664 |
] ifFalse:[ depth <= 8 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5665 |
ditherColors := Color colorCubeWithRed:6 green:6 blue:5. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5666 |
] ifFalse:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5667 |
self error:'unsupported depth'. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5668 |
]]]]]]]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5669 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5670 |
nGrey := (2 raisedTo:depth) - ditherColors size. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5671 |
nGrey > 0 ifTrue:[ |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5672 |
nGrey := nGrey min:128. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5673 |
greyColorsAlready := ditherColors select:[:clr | clr isGreyColor]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5674 |
d := 1 / nGrey. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5675 |
moreColors := (1 to:nGrey-1) |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5676 |
collect:[:i | Color brightness:(d * i)] |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5677 |
thenReject:[:clr | greyColorsAlready includes:clr ]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5678 |
|
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5679 |
ditherColors := ditherColors , moreColors. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5680 |
]. |
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5681 |
] ifFalse:[ |
3020 | 5682 |
self halt:'unhandled dither color setup'. |
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5683 |
]. |
2054 | 5684 |
|
5685 |
self withExecuteCursorDo:[ |
|
2576
9e8d63aadb11
more grey values used when dithering
Claus Gittinger <cg@exept.de>
parents:
2575
diff
changeset
|
5686 |
"/ newImage := self image asDitheredImageUsing:ditherColors depth:depth. |
2054 | 5687 |
newImage := self image asDitheredImageUsing:ditherColors depth:8. |
5688 |
||
5689 |
imageEditView makeUndo. |
|
5690 |
imageEditView image:newImage. |
|
5691 |
imageEditView setModified. |
|
5692 |
self updateImage. |
|
5693 |
self updateImagePreView. |
|
5694 |
||
5695 |
self fetchImageData. |
|
5696 |
]. |
|
5697 |
||
5698 |
"Created: / 07-07-2006 / 13:20:56 / cg" |
|
2073 | 5699 |
"Modified: / 05-09-2006 / 16:13:25 / cg" |
2054 | 5700 |
! |
5701 |
||
2174 | 5702 |
doubleClickOnColor:aColorIndex |
5703 |
self editSelectedColor. |
|
5704 |
||
5705 |
"Created: / 22-07-2007 / 13:14:37 / cg" |
|
5706 |
! |
|
5707 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5708 |
editSelectedColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5709 |
self processSelectedColorWith:[:clr | |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5710 |
|editor| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5711 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5712 |
editor := ColorEditDialog new. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5713 |
editor color:clr. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5714 |
editor open. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5715 |
editor accepted ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5716 |
AbortOperationRequest raise. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5717 |
]. |
3180 | 5718 |
editor color |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5719 |
] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5720 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
5721 |
|
1446 | 5722 |
fetchImageData |
1460 | 5723 |
|image| |
5724 |
||
5725 |
(image := imageEditView image) notNil ifTrue:[ |
|
5726 |
self findColorMapMode. |
|
5727 |
self updateLabelsAndHistory. |
|
5728 |
] |
|
1446 | 5729 |
! |
5730 |
||
1544 | 5731 |
inspectColor |
2573 | 5732 |
|clrIndex clr| |
5733 |
||
5734 |
self hasColormap ifFalse:[ |
|
5735 |
clr := self selectedColorOrNil |
|
5736 |
] ifTrue:[ |
|
5737 |
clrIndex := self selectedColorIndexOrNil. |
|
5738 |
clrIndex isNil ifTrue:[ |
|
5739 |
^ self |
|
5740 |
]. |
|
5741 |
clr := self image colorFromValue:clrIndex-1 |
|
1544 | 5742 |
]. |
2573 | 5743 |
clr inspect |
1544 | 5744 |
! |
5745 |
||
2651 | 5746 |
inspectColormap |
5747 |
self hasColormap ifTrue:[ |
|
5748 |
self image colorMap inspect |
|
5749 |
]. |
|
5750 |
! |
|
5751 |
||
1598 | 5752 |
makeBrighter |
5753 |
| anyChange| |
|
5754 |
||
5755 |
self withExecuteCursorDo:[ |
|
5756 |
anyChange := imageEditView makeBrighter. |
|
5757 |
anyChange ifFalse:[ |
|
5758 |
Dialog warn:'Image unchanged'. |
|
5759 |
] ifTrue:[ |
|
5760 |
self updateImage. |
|
5761 |
] |
|
5762 |
]. |
|
5763 |
! |
|
5764 |
||
5765 |
makeDarker |
|
5766 |
| anyChange| |
|
5767 |
||
5768 |
self withExecuteCursorDo:[ |
|
5769 |
anyChange := imageEditView makeDarker. |
|
5770 |
anyChange ifFalse:[ |
|
5771 |
Dialog warn:'Image unchanged'. |
|
5772 |
] ifTrue:[ |
|
5773 |
self updateImage. |
|
5774 |
] |
|
5775 |
]. |
|
5776 |
! |
|
5777 |
||
1926 | 5778 |
makeGrayScaleImage |
1598 | 5779 |
|anyChange| |
1436 | 5780 |
|
5781 |
self withExecuteCursorDo:[ |
|
1926 | 5782 |
anyChange := imageEditView makeGrayScaleImage. |
1436 | 5783 |
anyChange ifFalse:[ |
5784 |
Dialog warn:'Image unchanged'. |
|
5785 |
] ifTrue:[ |
|
1598 | 5786 |
self updateImage. |
5787 |
] |
|
5788 |
]. |
|
5789 |
! |
|
5790 |
||
5791 |
makeInverse |
|
5792 |
| anyChange| |
|
5793 |
||
5794 |
self withExecuteCursorDo:[ |
|
5795 |
anyChange := imageEditView makeInverse. |
|
5796 |
anyChange ifFalse:[ |
|
5797 |
Dialog warn:'Image unchanged'. |
|
5798 |
] ifTrue:[ |
|
5799 |
self updateImage. |
|
1436 | 5800 |
] |
5801 |
]. |
|
5802 |
! |
|
5803 |
||
1446 | 5804 |
makeSelectedColorBrighter |
3195 | 5805 |
self processSelectedColorsWith:[:clr | clr lightened] |
1446 | 5806 |
! |
5807 |
||
5808 |
makeSelectedColorDarker |
|
3195 | 5809 |
self processSelectedColorsWith:[:clr | clr darkened] |
1446 | 5810 |
! |
5811 |
||
1884 | 5812 |
makeSelectedColorGray |
3195 | 5813 |
self processSelectedColorsWith:[:clr | Color brightness:(clr brightness)] |
5814 |
! |
|
5815 |
||
5816 |
makeSelectedColorShifted |
|
5817 |
|cMap colors| |
|
5818 |
||
5819 |
cMap := self image colorMap. |
|
5820 |
self hasMask ifTrue:[ |
|
5821 |
colors := self selectedColors value collect:[:idx | cMap at:idx-1]. |
|
5822 |
] ifFalse:[ |
|
5823 |
colors := self selectedColors value collect:[:idx | cMap at:idx]. |
|
5824 |
]. |
|
5825 |
self changeHLSOfColors:colors. |
|
1884 | 5826 |
! |
5827 |
||
2826 | 5828 |
makeSlightlyBrighter |
5829 |
| anyChange| |
|
5830 |
||
5831 |
self withExecuteCursorDo:[ |
|
5832 |
anyChange := imageEditView makeSlightlyBrighter. |
|
5833 |
anyChange ifFalse:[ |
|
5834 |
Dialog warn:'Image unchanged'. |
|
5835 |
] ifTrue:[ |
|
5836 |
self updateImage. |
|
5837 |
] |
|
5838 |
]. |
|
5839 |
||
5840 |
"Created: / 24-11-2010 / 11:06:11 / cg" |
|
5841 |
! |
|
5842 |
||
5843 |
makeSlightlyDarker |
|
5844 |
| anyChange| |
|
5845 |
||
5846 |
self withExecuteCursorDo:[ |
|
5847 |
anyChange := imageEditView makeSlightlyDarker. |
|
5848 |
anyChange ifFalse:[ |
|
5849 |
Dialog warn:'Image unchanged'. |
|
5850 |
] ifTrue:[ |
|
5851 |
self updateImage. |
|
5852 |
] |
|
5853 |
]. |
|
5854 |
||
5855 |
"Created: / 24-11-2010 / 11:06:23 / cg" |
|
5856 |
! |
|
5857 |
||
2652 | 5858 |
menu_clearColormapEntry0AndMaskedPixels |
5859 |
"ensure that there is a colorMap entry with 0/0/0 at position |
|
5860 |
0 and then clear all masked pixels (to pixelValue 0)" |
|
5861 |
||
5862 |
imageEditView makeUndo. |
|
5863 |
self withExecuteCursorDo:[ |
|
5864 |
self clearColormapEntry0AndMaskedPixels |
|
5865 |
] |
|
5866 |
! |
|
5867 |
||
5868 |
menu_clearMaskedPixels |
|
5869 |
"clear all masked pixels (to pixelValue 0)" |
|
5870 |
||
5871 |
imageEditView makeUndo. |
|
5872 |
||
5873 |
self withExecuteCursorDo:[ |
|
5874 |
self clearMaskedPixels |
|
5875 |
] |
|
5876 |
! |
|
5877 |
||
5878 |
menu_compressColorMap |
|
5879 |
"calculates a new color map for the image, using only used colors" |
|
5880 |
||
2893 | 5881 |
|depth oldImage usedColors colorMap| |
2652 | 5882 |
|
5883 |
oldImage := self image. |
|
5884 |
||
5885 |
oldImage photometric ~~ #palette ifTrue:[ |
|
5886 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
1852 | 5887 |
^ self |
5888 |
]. |
|
2893 | 5889 |
depth := oldImage depth. |
3103 | 5890 |
colorMap := oldImage colorMap asArray. |
2652 | 5891 |
usedColors := oldImage realUsedColors. |
2893 | 5892 |
usedColors size == colorMap size ifTrue:[ |
2652 | 5893 |
self information:'Compress colorMap: Colormap already compressed - no compression.'. |
5894 |
^ self |
|
5895 |
]. |
|
5896 |
||
5897 |
imageEditView makeUndo. |
|
5898 |
||
5899 |
self withExecuteCursorDo:[ |
|
5900 |
self compressColorMap |
|
1852 | 5901 |
] |
5902 |
! |
|
5903 |
||
2652 | 5904 |
menu_copyMask |
5905 |
|mask| |
|
5906 |
||
5907 |
mask := self image mask. |
|
5908 |
MaskClipboard := mask subImageIn: (0@0 extent:mask extent). |
|
5909 |
! |
|
5910 |
||
5911 |
menu_pasteMask |
|
1480 | 5912 |
|img mask| |
5913 |
||
5914 |
imageEditView makeUndo. |
|
5915 |
||
5916 |
img := self image. |
|
5917 |
mask := img mask. |
|
5918 |
||
5919 |
mask |
|
5920 |
copyFrom:MaskClipboard |
|
5921 |
x:0 y:0 |
|
5922 |
toX:0 y:0 |
|
5923 |
width:(mask width min:MaskClipboard width) |
|
5924 |
height:(mask height min:MaskClipboard height). |
|
5925 |
img mask:mask. |
|
5926 |
(imageEditView image:img copy) notNil ifTrue:[ |
|
5927 |
self fetchImageData. |
|
5928 |
] |
|
5929 |
! |
|
5930 |
||
2652 | 5931 |
menu_sortColorMap |
5932 |
"calculates a new color map for the image, sorting colors" |
|
5933 |
||
5934 |
self menu_sortColorMapWith:self sortBlockForColors |
|
5935 |
! |
|
5936 |
||
5937 |
menu_sortColorMapWith:sortBlock |
|
5938 |
"calculates a new color map for the image, sorting colors" |
|
5939 |
||
5940 |
self image photometric ~~ #palette ifTrue:[ |
|
5941 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
5942 |
^ self |
|
5943 |
]. |
|
5944 |
||
5945 |
imageEditView makeUndo. |
|
5946 |
||
5947 |
self withExecuteCursorDo:[ |
|
5948 |
self sortColorMapWith:sortBlock |
|
5949 |
] |
|
5950 |
||
5951 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
5952 |
"Created: / 30.9.1998 / 23:51:23 / cg" |
|
5953 |
! |
|
5954 |
||
5955 |
pasteColorIntoColormap |
|
5956 |
|copyBufferColor| |
|
5957 |
||
5958 |
copyBufferColor := imageEditView getClipboardObject. |
|
5959 |
copyBufferColor isColor ifFalse:[ |
|
5960 |
UserPreferences current beepInEditor ifTrue:[ |
|
5961 |
self window beep. |
|
5962 |
]. |
|
5963 |
^ self |
|
5964 |
]. |
|
5965 |
||
5966 |
self processSelectedColorWith:[:clr | |
|
5967 |
copyBufferColor |
|
5968 |
] |
|
5969 |
! |
|
5970 |
||
1682 | 5971 |
pickAndAddColorToColormap |
5972 |
self addColorToColormap:(Color fromUser) |
|
5973 |
! |
|
5974 |
||
1933 | 5975 |
pickAndPasteColor |
5976 |
self pickColor. |
|
5977 |
self pasteColorIntoColormap. |
|
5978 |
! |
|
5979 |
||
1852 | 5980 |
pickColor |
1871 | 5981 |
imageEditView setClipboardObject:(Color fromUser) |
1852 | 5982 |
! |
5983 |
||
1682 | 5984 |
processSelectedColorWith:aBlock |
3195 | 5985 |
"undoable color processing: |
5986 |
the selected color will be replaced by the value of aBlock" |
|
5987 |
||
5988 |
self processSelectedColorsWith:aBlock. |
|
5989 |
! |
|
5990 |
||
5991 |
processSelectedColorsWith:aBlock |
|
5992 |
"undoable color processing: |
|
5993 |
the selected colors will be replaced by the value of aBlock |
|
5994 |
(which gets a color vector and must return a color vector)" |
|
5995 |
||
3281 | 5996 |
|img cMap modifiedColormap oldColors newImage selectedColorIndices newColors maskOffset| |
3195 | 5997 |
|
5998 |
selectedColorIndices := self selectedColors value. |
|
5999 |
selectedColorIndices isEmptyOrNil ifTrue:[^ self]. |
|
1682 | 6000 |
|
6001 |
img := self image. |
|
6002 |
cMap := img colorMap. |
|
6003 |
cMap isNil ifTrue:[ |
|
1916 | 6004 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1682 | 6005 |
^ self |
6006 |
]. |
|
3195 | 6007 |
self hasMask ifTrue:[ |
3281 | 6008 |
maskOffset := 1. |
3195 | 6009 |
] ifFalse:[ |
3281 | 6010 |
maskOffset := 0. |
3195 | 6011 |
]. |
3281 | 6012 |
oldColors := selectedColorIndices collect:[:idx | cMap at:idx-maskOffset]. |
1682 | 6013 |
imageEditView makeUndo. |
6014 |
||
2992 | 6015 |
modifiedColormap := cMap asNewArray. |
1852 | 6016 |
|
3195 | 6017 |
newColors := oldColors collect:aBlock. |
6018 |
selectedColorIndices with:newColors do:[:idx :newColor | |
|
3281 | 6019 |
modifiedColormap at:idx-maskOffset put:newColor |
3195 | 6020 |
]. |
1682 | 6021 |
|
6022 |
newImage := img species new |
|
6023 |
width:img width |
|
6024 |
height:img height |
|
1843 | 6025 |
depth:img depth |
1682 | 6026 |
fromArray:img bits. |
6027 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6028 |
newImage colorMap:modifiedColormap. |
1682 | 6029 |
newImage fileName:img fileName. |
6030 |
newImage mask:(img mask copy). |
|
6031 |
||
6032 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
6033 |
self fetchImageData. |
|
6034 |
]. |
|
3195 | 6035 |
self selectedColors value:selectedColorIndices. |
1682 | 6036 |
! |
6037 |
||
1124 | 6038 |
reduceNumberOfColors |
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6039 |
|s n anyChange img usedColors| |
1124 | 6040 |
|
2817 | 6041 |
s := Dialog request:'Number of color bits to strip (1-7) ?' initialAnswer:3. |
1435 | 6042 |
s size == 0 ifTrue:[^ self]. |
1934 | 6043 |
|
1124 | 6044 |
n := Integer readFrom:s onError:0. |
6045 |
(n between:1 and:7) ifFalse:[ |
|
6046 |
Dialog warn:'Image unchanged'. |
|
6047 |
^ self |
|
6048 |
]. |
|
6049 |
||
6050 |
self withExecuteCursorDo:[ |
|
6051 |
anyChange := imageEditView reduceColorResolutionBy:n. |
|
6052 |
anyChange ifFalse:[ |
|
6053 |
Dialog warn:'Image unchanged'. |
|
6054 |
] ifTrue:[ |
|
6055 |
img := imageEditView image. |
|
6056 |
imageEditView image:img. |
|
1446 | 6057 |
|
6058 |
self fetchImageData. |
|
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6059 |
usedColors := img usedColorsMax:10000. |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6060 |
usedColors size == 10000 ifTrue:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6061 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6062 |
] ifFalse:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6063 |
Dialog information:(usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
6064 |
] |
1124 | 6065 |
] |
6066 |
]. |
|
2817 | 6067 |
|
6068 |
"Modified: / 29-10-2010 / 18:08:01 / cg" |
|
1124 | 6069 |
! |
6070 |
||
1930 | 6071 |
reduceNumberOfColors2 |
1938 | 6072 |
|s rndR rndG rndB usedColors image newImage| |
6073 |
||
6074 |
s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4. |
|
1934 | 6075 |
s size == 0 ifTrue:[^ self]. |
1938 | 6076 |
rndR := Integer readFrom:s onError:0. |
1939 | 6077 |
|
1938 | 6078 |
s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2. |
6079 |
s size == 0 ifTrue:[^ self]. |
|
6080 |
rndG := Integer readFrom:s onError:0. |
|
1939 | 6081 |
|
1938 | 6082 |
s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10. |
6083 |
s size == 0 ifTrue:[^ self]. |
|
6084 |
rndB := Integer readFrom:s onError:0. |
|
1939 | 6085 |
|
6086 |
((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[ |
|
1930 | 6087 |
Dialog warn:'Image unchanged'. |
6088 |
^ self |
|
6089 |
]. |
|
6090 |
||
6091 |
self withExecuteCursorDo:[ |
|
3195 | 6092 |
|reduceColor| |
6093 |
||
6094 |
reduceColor := |
|
6095 |
[:clr | |
|
6096 |
|r g b nr ng nb| |
|
1934 | 6097 |
|
6098 |
r := clr redByte. |
|
6099 |
g := clr greenByte. |
|
6100 |
b := clr blueByte. |
|
1938 | 6101 |
nr := (r roundTo:rndR) min:255. |
6102 |
ng := (g roundTo:rndG) min:255. |
|
6103 |
nb := (b roundTo:rndB) min:255. |
|
1934 | 6104 |
|
3195 | 6105 |
Color redByte:nr greenByte:ng blueByte:nb. |
6106 |
]. |
|
6107 |
||
6108 |
image := self image. |
|
6109 |
"/ usedColors := image usedColorsMax:4096. |
|
6110 |
imageEditView makeUndo. |
|
6111 |
||
6112 |
newImage := image copy. |
|
6113 |
newImage photometric == #palette ifTrue:[ |
|
6114 |
newImage colorMap:(image colorMap collect:reduceColor). |
|
6115 |
] ifFalse:[ |
|
6116 |
image |
|
6117 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
6118 |
do:[:x :y :clr | |
|
6119 |
newImage colorAtX:x y:y put:(reduceColor value:clr) |
|
2260 | 6120 |
]. |
3195 | 6121 |
]. |
1934 | 6122 |
imageEditView image:newImage. |
6123 |
imageEditView setModified. |
|
6124 |
self updateImage. |
|
6125 |
self updateImagePreView. |
|
6126 |
||
6127 |
self fetchImageData. |
|
6128 |
usedColors := newImage usedColorsMax:10000. |
|
6129 |
usedColors size == 10000 ifTrue:[ |
|
6130 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
|
6131 |
] ifFalse:[ |
|
6132 |
Dialog information:(usedColors size printString , ' colors used.') |
|
6133 |
] |
|
1930 | 6134 |
]. |
2054 | 6135 |
|
6136 |
"Modified: / 07-07-2006 / 13:10:42 / cg" |
|
1930 | 6137 |
! |
6138 |
||
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6139 |
selectColor:aColor |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6140 |
|idx img cMap| |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6141 |
|
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6142 |
aColor isNil ifTrue:[ |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6143 |
idx := nil. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6144 |
] ifFalse:[ |
2791 | 6145 |
img := self image. |
6146 |
img notNil ifTrue: [ |
|
6147 |
aColor == Color noColor ifTrue:[ |
|
6148 |
(img mask notNil) ifTrue:[ |
|
6149 |
idx := 1. |
|
6150 |
] |
|
6151 |
] ifFalse:[ |
|
2447 | 6152 |
(cMap := self listOfColors) notNil ifTrue:[ |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6153 |
idx := cMap indexOf:aColor ifAbsent:nil. |
2447 | 6154 |
]. |
6155 |
idx isNil ifTrue:[ |
|
6156 |
"/ should not happen... |
|
6157 |
(cMap := img colorMap) notNil ifTrue:[ |
|
6158 |
idx := cMap indexOf:aColor ifAbsent:nil. |
|
6159 |
idx notNil ifTrue:[ |
|
6160 |
img mask notNil ifTrue:[ |
|
6161 |
idx := idx + 1. |
|
6162 |
]. |
|
6163 |
] |
|
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6164 |
]. |
2447 | 6165 |
]. |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6166 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6167 |
]. |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6168 |
]. |
3195 | 6169 |
self selectedColors value:{idx}. |
2790 | 6170 |
|
2791 | 6171 |
"Modified: / 02-07-2010 / 12:06:07 / cg" |
2446
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6172 |
! |
862717a7ca0f
color selection when undoing
Claus Gittinger <cg@exept.de>
parents:
2438
diff
changeset
|
6173 |
|
1682 | 6174 |
selectedColorIndexOrNil |
2651 | 6175 |
|img clrIndex| |
1682 | 6176 |
|
6177 |
img := self image. |
|
6178 |
img isNil ifTrue:[ |
|
2764 | 6179 |
"/ self warn:'No Image.'. |
1682 | 6180 |
^ nil |
6181 |
]. |
|
6182 |
clrIndex := self selectionOfColor value. |
|
1896 | 6183 |
self hasMask "img mask notNil" ifTrue: [ |
2449
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6184 |
(clrIndex isInteger and:[clrIndex > 1]) ifTrue:[ |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6185 |
^ clrIndex - 1 |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6186 |
]. |
5ef668d71314
changed #selectedColorIndexOrNil
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
6187 |
^ nil |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6188 |
]. |
1682 | 6189 |
^ clrIndex |
6190 |
! |
|
6191 |
||
1852 | 6192 |
selectedColorOrNil |
2447 | 6193 |
|cmapIndex img cMap colorList| |
1896 | 6194 |
|
6195 |
cmapIndex := self selectedColorIndexOrNil. |
|
1900 | 6196 |
cmapIndex isNil ifTrue:[^ nil]. |
2556 | 6197 |
cmapIndex == 0 ifTrue:[^ nil]. |
1852 | 6198 |
|
6199 |
img := self image. |
|
6200 |
cMap := img colorMap. |
|
6201 |
cMap isNil ifTrue:[ |
|
2447 | 6202 |
"/ self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
6203 |
colorList := self listOfColors. |
|
6204 |
colorList notNil ifTrue:[ |
|
6205 |
^ colorList at:cmapIndex ifAbsent:nil |
|
6206 |
]. |
|
1900 | 6207 |
^ nil |
1852 | 6208 |
]. |
1896 | 6209 |
^ cMap at:cmapIndex. |
1852 | 6210 |
! |
6211 |
||
1008 | 6212 |
sortColorMap |
6213 |
"calculates a new color map for the image, sorting colors" |
|
6214 |
||
3195 | 6215 |
self sortColorMapWith:self sortBlockForColorsByRGB |
1939 | 6216 |
! |
6217 |
||
6218 |
sortColorMapWith:sortBlock |
|
6219 |
"calculates a new color map for the image, sorting colors" |
|
6220 |
||
3224 | 6221 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits |
6222 |
expectedSize w h| |
|
1008 | 6223 |
|
6224 |
oldImage := self image. |
|
6225 |
depth := oldImage depth. |
|
3224 | 6226 |
w := oldImage width. |
6227 |
h := oldImage height. |
|
1008 | 6228 |
|
2652 | 6229 |
usedColors := oldImage realColorMap. |
6230 |
||
6231 |
"/ translation table |
|
6232 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
6233 |
newColorMap := usedColors asArray. |
|
6234 |
newColorMap sort:sortBlock. |
|
6235 |
||
6236 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
6237 |
|newPixel| |
|
6238 |
||
6239 |
(usedColors includes:clr) ifTrue:[ |
|
6240 |
newPixel := newColorMap indexOf:clr. |
|
6241 |
oldToNew at:oldIdx put:newPixel-1. |
|
6242 |
] |
|
1008 | 6243 |
]. |
6244 |
||
2652 | 6245 |
oldBits := oldImage bits. |
3224 | 6246 |
"/ sanity check... |
6247 |
expectedSize := ((w * h * depth + 7) // 8). |
|
6248 |
(oldBits size < expectedSize) ifTrue:[ |
|
6249 |
self halt:'incorrect pixeldata size'. |
|
6250 |
oldBits := (ByteArray new:expectedSize) replaceFrom:1 with:oldBits; yourself. |
|
6251 |
]. |
|
2652 | 6252 |
newBits := ByteArray new:(oldBits size). |
6253 |
depth ~~ 8 ifTrue:[ |
|
3224 | 6254 |
|
2652 | 6255 |
"/ expand/compress can only handle 8bits |
3224 | 6256 |
tmpBits := ByteArray uninitializedNew:(w*h). |
2652 | 6257 |
oldBits |
6258 |
expandPixels:depth |
|
3224 | 6259 |
width:w height:h |
2652 | 6260 |
into:tmpBits |
6261 |
mapping:oldToNew. |
|
6262 |
tmpBits |
|
6263 |
compressPixels:depth |
|
3224 | 6264 |
width:w height:h |
2652 | 6265 |
into:newBits |
6266 |
mapping:nil |
|
6267 |
] ifFalse:[ |
|
6268 |
oldBits |
|
6269 |
expandPixels:depth |
|
3224 | 6270 |
width:w height:h |
2652 | 6271 |
into:newBits |
6272 |
mapping:oldToNew. |
|
6273 |
]. |
|
6274 |
||
6275 |
newImage := oldImage species new |
|
3224 | 6276 |
width:w height:h depth:depth |
2652 | 6277 |
fromArray:newBits. |
6278 |
||
6279 |
newImage colorMap:newColorMap. |
|
6280 |
newImage fileName:oldImage fileName. |
|
6281 |
newImage mask:(oldImage mask copy). |
|
6282 |
||
6283 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
6284 |
self fetchImageData. |
|
1008 | 6285 |
] |
6286 |
||
6287 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
6288 |
"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
|
6289 |
! ! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
6290 |
|
1715 | 6291 |
!ImageEditor methodsFor:'user actions-editing'! |
400 | 6292 |
|
2354
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6293 |
do3DProjection |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6294 |
|box dx1 dx2 image| |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6295 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6296 |
image := imageEditView image. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6297 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6298 |
box := EnterBox new. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6299 |
box title:(resources string:'dX1 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6300 |
box okText:(resources string:'OK'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6301 |
box abortText:(resources string:'Cancel'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6302 |
box initialText:'0.1'. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6303 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6304 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6305 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6306 |
and: [(dx1 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6307 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6308 |
box title:(resources string:'dX2 (0 < dx < 0.5):'). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6309 |
box initialText:(dx1 printString). |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6310 |
box showAtPointer. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6311 |
(box accepted |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6312 |
and: [(dx2 := Number readFrom:(box contents) onError:nil) notNil]) |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6313 |
ifTrue:[ |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6314 |
imageEditView threeDProjection:dx1 and:dx2. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6315 |
] |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6316 |
]. |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6317 |
|
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6318 |
self updateInfoLabel |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6319 |
! |
15be12f5e320
3d projection (first attempt)
Claus Gittinger <cg@exept.de>
parents:
2339
diff
changeset
|
6320 |
|
1882 | 6321 |
doBrightenImage |
6322 |
imageEditView brightenImage. |
|
6323 |
self listOfColors removeAll. |
|
6324 |
self findColorMapMode. |
|
2585 | 6325 |
"/ imageEditView removelastUndo |
1882 | 6326 |
! |
6327 |
||
767 | 6328 |
doBrowseClass |
6329 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
400 | 6330 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6331 |
|cls| |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6332 |
|
1965
1d2b7893ae89
some code cleanup (resourceClass was actually its name)
Claus Gittinger <cg@exept.de>
parents:
1962
diff
changeset
|
6333 |
cls := imageEditView resourceClass. |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6334 |
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
|
6335 |
|
3242 | 6336 |
cls browserClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6337 |
openInClass:cls class |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6338 |
selector:(imageEditView resourceSelector) |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6339 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
6340 |
"Modified: / 31.7.1998 / 02:01:15 / cg" |
400 | 6341 |
! |
6342 |
||
1703 | 6343 |
doCopyImageToClipboard |
6344 |
imageEditView copyImageToClipboard. |
|
6345 |
! |
|
6346 |
||
1045 | 6347 |
doCropAll |
986 | 6348 |
"find all borders and cut them off" |
6349 |
||
1045 | 6350 |
imageEditView cropLeft:true right:true top:true bottom:true. |
986 | 6351 |
self updateInfoLabel |
6352 |
||
6353 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
6354 |
"Created: / 7.9.1998 / 16:33:43 / cg" |
|
6355 |
! |
|
6356 |
||
1045 | 6357 |
doCropBottom |
986 | 6358 |
"find a bottom border and cut it off" |
6359 |
||
1045 | 6360 |
imageEditView cropLeft:false right:false top:false bottom:true. |
986 | 6361 |
self updateInfoLabel |
6362 |
||
6363 |
"Created: / 7.9.1998 / 13:00:20 / cg" |
|
6364 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
6365 |
! |
|
6366 |
||
1045 | 6367 |
doCropLeft |
986 | 6368 |
"find a left border and cut it off" |
6369 |
||
1045 | 6370 |
imageEditView cropLeft:true right:false top:false bottom:false. |
986 | 6371 |
self updateInfoLabel |
6372 |
||
6373 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
6374 |
"Modified: / 7.9.1998 / 14:26:34 / cg" |
|
6375 |
! |
|
6376 |
||
1045 | 6377 |
doCropManual |
986 | 6378 |
"let user specify borders and cut them off" |
6379 |
||
1502 | 6380 |
|bindings left top right bottom img firstChange gropAction acceptChannel| |
6381 |
||
6382 |
acceptChannel := TriggerValue new. |
|
1490 | 6383 |
|
6384 |
firstChange := true. |
|
6385 |
||
1502 | 6386 |
gropAction := |
6387 |
[:lV :rV :tV :bV | |l r t b| |
|
6388 |
acceptChannel value:true. |
|
6389 |
||
6390 |
l := lV value. |
|
6391 |
r := rV value. |
|
6392 |
t := tV value. |
|
6393 |
b := bV value. |
|
6394 |
(l + r + t + b) == 0 ifTrue:[ |
|
2520 | 6395 |
UserPreferences current beepInEditor ifTrue:[ |
6396 |
self window beep |
|
6397 |
] |
|
1502 | 6398 |
] ifFalse:[ |
6399 |
img := imageEditView image. |
|
6400 |
firstChange ifTrue:[ |
|
6401 |
imageEditView makeUndo. |
|
6402 |
firstChange := false. |
|
6403 |
]. |
|
6404 |
imageEditView |
|
6405 |
makeSubImageX:l y:t |
|
6406 |
width:(img width - l - r) |
|
6407 |
height:(img height - t - b). |
|
2546 | 6408 |
|
6409 |
self updateImagePreView. |
|
1502 | 6410 |
self updateInfoLabel |
6411 |
]. |
|
1490 | 6412 |
]. |
986 | 6413 |
|
6414 |
bindings := IdentityDictionary new. |
|
1507 | 6415 |
bindings at:#left put:(left := 1 asValue). |
6416 |
bindings at:#right put:(right := 1 asValue). |
|
6417 |
bindings at:#top put:(top := 1 asValue). |
|
6418 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1502 | 6419 |
bindings at:#acceptChannel put:acceptChannel. |
6420 |
||
6421 |
bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
|
6422 |
bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
|
6423 |
bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
|
6424 |
bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
|
6425 |
||
6426 |
bindings at:#applyAction put:[ gropAction value:left value:right value:top value:bottom ]. |
|
1490 | 6427 |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
6428 |
(self openDialogInterface:#cropDialogSpec withBindings:bindings) |
1507 | 6429 |
ifFalse:[ |
6430 |
firstChange ~~ true ifTrue:[ |
|
1558 | 6431 |
imageEditView undo. |
6432 |
self updateImagePreView. |
|
1507 | 6433 |
] |
6434 |
]. |
|
986 | 6435 |
|
6436 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6437 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6438 |
! |
|
6439 |
||
1045 | 6440 |
doCropRight |
986 | 6441 |
"find a right border and cut it off" |
6442 |
||
1045 | 6443 |
imageEditView cropLeft:false right:true top:false bottom:false. |
986 | 6444 |
self updateInfoLabel |
6445 |
||
6446 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
6447 |
"Modified: / 7.9.1998 / 14:26:44 / cg" |
|
6448 |
! |
|
6449 |
||
1045 | 6450 |
doCropTop |
986 | 6451 |
"find a top border and cut it off" |
6452 |
||
1045 | 6453 |
imageEditView cropLeft:false right:false top:true bottom:false. |
986 | 6454 |
self updateInfoLabel |
6455 |
||
6456 |
"Created: / 7.9.1998 / 13:00:19 / cg" |
|
6457 |
"Modified: / 7.9.1998 / 14:26:52 / cg" |
|
6458 |
! |
|
6459 |
||
1882 | 6460 |
doDarkenImage |
6461 |
imageEditView darkenImage. |
|
6462 |
self listOfColors removeAll. |
|
6463 |
self findColorMapMode. |
|
2585 | 6464 |
"/ imageEditView removelastUndo |
1882 | 6465 |
! |
6466 |
||
1433 | 6467 |
doEditMask |
6468 |
self image mask edit |
|
6469 |
! |
|
6470 |
||
767 | 6471 |
doFlipHorizontal |
6472 |
"flips horizontally current image" |
|
400 | 6473 |
|
911 | 6474 |
imageEditView flipHorizontal |
400 | 6475 |
! |
6476 |
||
767 | 6477 |
doFlipVertical |
6478 |
"flips vertically current image" |
|
400 | 6479 |
|
911 | 6480 |
imageEditView flipVertical |
400 | 6481 |
! |
6482 |
||
2196 | 6483 |
doInsertTextFromUser |
3157 | 6484 |
|text tempForm tempImage maskImage font w h paintColor| |
2196 | 6485 |
|
2424 | 6486 |
text := Dialog request:'Text to be inserted (placed as bitmap into clipboard for paste):'. |
6487 |
text isEmptyOrNil ifTrue:[^ self ]. |
|
2196 | 6488 |
|
6489 |
font := Font family:'arial' size:20. |
|
6490 |
font := font onDevice:Screen current. |
|
6491 |
w := font widthOf:text. |
|
6492 |
h := font heightOf:text. |
|
6493 |
||
6494 |
tempForm := Form extent:(w@h) depth:1 onDevice:(Screen current). |
|
6495 |
tempForm clear. |
|
6496 |
tempForm font:font. |
|
6497 |
tempForm paint:(Color colorId:1). |
|
6498 |
tempForm displayString:text at:(0@font ascent). |
|
6499 |
||
6500 |
tempImage := tempForm asImage. |
|
6501 |
maskImage := tempForm asImage. |
|
3157 | 6502 |
|
6503 |
paintColor := imageEditView selectedColor. |
|
6504 |
paintColor colorId == 0 ifTrue:[ |
|
6505 |
paintColor := Color black |
|
6506 |
]. |
|
2196 | 6507 |
tempImage |
6508 |
photometric:#palette; |
|
3157 | 6509 |
colorMap:(Array |
6510 |
with:Color white |
|
6511 |
with:paintColor); |
|
2196 | 6512 |
mask:maskImage. |
6513 |
||
6514 |
ImageEditView copyImageToClipboard:tempImage. |
|
6515 |
self editMode value:#paste. |
|
6516 |
||
6517 |
"Modified: / 11-11-2007 / 12:32:55 / cg" |
|
6518 |
! |
|
6519 |
||
1896 | 6520 |
doInspectImage |
6521 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
6522 |
||
6523 |
self image inspect |
|
6524 |
! |
|
6525 |
||
767 | 6526 |
doMagnifyDown |
1987 | 6527 |
"magnifies the current image one step down" |
400 | 6528 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6529 |
|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
|
6530 |
|
1987 | 6531 |
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
|
6532 |
(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
|
6533 |
magHolder value: mag - 1 |
400 | 6534 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6535 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6536 |
"Modified: / 26.7.1998 / 20:24:08 / cg" |
400 | 6537 |
! |
6538 |
||
767 | 6539 |
doMagnifyImage |
1479 | 6540 |
"magnifies the current image to a new size" |
400 | 6541 |
|
3196 | 6542 |
|box newSize image antiAliased| |
6543 |
||
6544 |
antiAliased := false asValue. |
|
1353 | 6545 |
image := imageEditView image. |
6546 |
||
6547 |
box := EnterBox new. |
|
6548 |
box title:(resources string:'Images new size:'). |
|
6549 |
box okText:(resources string:'OK'). |
|
6550 |
box abortText:(resources string:'Cancel'). |
|
6551 |
box initialText:image extent printString. |
|
3196 | 6552 |
box addCheckBox:(resources string:'Antialiased') on:antiAliased. |
1353 | 6553 |
box showAtPointer. |
3196 | 6554 |
|
1353 | 6555 |
(box accepted |
1960 | 6556 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6557 |
ifTrue:[ |
1479 | 6558 |
newSize isPoint ifFalse:[ |
3196 | 6559 |
self warn:'Please enter the new size as ''x @ y''.'. |
1479 | 6560 |
^ self. |
6561 |
]. |
|
3196 | 6562 |
antiAliased value ifTrue:[ |
6563 |
imageEditView magnifyAntiAliasedImageTo:newSize. |
|
6564 |
] ifFalse:[ |
|
6565 |
imageEditView magnifyImageTo:newSize. |
|
6566 |
]. |
|
1479 | 6567 |
]. |
6568 |
||
6569 |
self updateInfoLabel |
|
6570 |
! |
|
6571 |
||
6572 |
doMagnifyImageBy |
|
6573 |
"magnifies the current image (by a scale)" |
|
6574 |
||
3196 | 6575 |
|oldSize newSize scaleString scale image antiAliased| |
1479 | 6576 |
|
6577 |
image := imageEditView image. |
|
6578 |
oldSize := image extent. |
|
6579 |
||
3196 | 6580 |
antiAliased := false asValue. |
6581 |
||
6582 |
Dialog modifyingBoxWith:[:box | |
|
6583 |
box addCheckBox:(resources string:'Antialiased') on:antiAliased. |
|
6584 |
] do:[ |
|
6585 |
scaleString := Dialog |
|
2260 | 6586 |
request:(resources string:'Scale factor (<1 to shrink; >1 to magnify):') |
6587 |
initialAnswer:'1' |
|
6588 |
list:#('0.25' '0.5' '2' '4'). |
|
3196 | 6589 |
]. |
6590 |
scaleString isNil ifTrue:[^ self]. |
|
2260 | 6591 |
|
6592 |
"/ box := EnterBox new. |
|
6593 |
"/ box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):'). |
|
6594 |
"/ box okText:(resources string:'OK'). |
|
6595 |
"/ box abortText:(resources string:'Cancel'). |
|
6596 |
"/ box initialText:1 printString. |
|
6597 |
"/ box showAtPointer. |
|
6598 |
"/ box accepted ifTrue:[ |
|
6599 |
"/ scaleString := box contents. |
|
6600 |
"/ ]. |
|
6601 |
||
6602 |
scale := Object readFromString:scaleString onError:nil. |
|
6603 |
||
6604 |
scale notNil ifTrue:[ |
|
1479 | 6605 |
scale isNumber ifFalse:[ |
6606 |
self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'. |
|
6607 |
^ self. |
|
6608 |
]. |
|
6609 |
newSize := oldSize * scale. |
|
3196 | 6610 |
antiAliased value ifTrue:[ |
6611 |
imageEditView magnifyAntiAliasedImageTo:newSize. |
|
6612 |
] ifFalse:[ |
|
6613 |
imageEditView magnifyImageTo:newSize. |
|
6614 |
]. |
|
1353 | 6615 |
]. |
6616 |
||
400 | 6617 |
self updateInfoLabel |
6618 |
! |
|
6619 |
||
767 | 6620 |
doMagnifyUp |
1987 | 6621 |
"magnifies the current image one step up" |
400 | 6622 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6623 |
|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
|
6624 |
|
1987 | 6625 |
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
|
6626 |
(mag := magHolder value) < 99 ifTrue: [ |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6627 |
magHolder value: mag + 1 |
400 | 6628 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6629 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
6630 |
"Modified: / 26.7.1998 / 20:23:52 / cg" |
400 | 6631 |
! |
6632 |
||
767 | 6633 |
doNegativeImage |
6634 |
"negates current image by negating the color map" |
|
400 | 6635 |
|
1598 | 6636 |
self image depth ~~ 1 ifTrue:[ |
6637 |
Dialog warn:'Only useful for depth 1 images'. |
|
6638 |
^ self |
|
6639 |
]. |
|
911 | 6640 |
imageEditView negativeImage. |
400 | 6641 |
self listOfColors removeAll. |
901 | 6642 |
self findColorMapMode. |
2585 | 6643 |
"/ imageEditView removelastUndo |
400 | 6644 |
! |
6645 |
||
767 | 6646 |
doResizeImage |
1353 | 6647 |
"resizes the current image" |
6648 |
||
6649 |
|box newSize image| |
|
6650 |
||
6651 |
image := imageEditView image. |
|
6652 |
||
6653 |
box := EnterBox new. |
|
6654 |
box title:(resources string:'Images new size:'). |
|
6655 |
box okText:(resources string:'OK'). |
|
6656 |
box abortText:(resources string:'Cancel'). |
|
6657 |
box initialText:image extent printString. |
|
6658 |
box showAtPointer. |
|
6659 |
(box accepted |
|
1960 | 6660 |
and: [(newSize := self pointFromString:(box contents)) notNil]) |
1353 | 6661 |
ifTrue:[ |
6662 |
imageEditView resizeImageTo:newSize. |
|
6663 |
]. |
|
400 | 6664 |
! |
6665 |
||
767 | 6666 |
doRotateImage |
6667 |
"rotates current image" |
|
400 | 6668 |
|
2884 | 6669 |
|rotationString box rotation| |
6670 |
||
6671 |
rotationString := Dialog |
|
6672 |
request:(resources string:'Rotate by (degrees, clockwise):') |
|
6673 |
list:#( '-90' '90' '180' '45' '-45' '135' '-135' ) |
|
6674 |
initialAnswer:90. |
|
6675 |
rotationString isEmptyOrNil ifTrue:[^ self]. "/ cancelled |
|
6676 |
rotation := Number readFrom:rotationString onError:[nil]. |
|
6677 |
rotation isNil ifTrue:[^ self]. |
|
6678 |
||
6679 |
"/ box := EnterBox new. |
|
6680 |
"/ box title:(resources string:'Rotate by (degrees, clockwise):'). |
|
6681 |
"/ box okText:(resources string:'OK'). |
|
6682 |
"/ box abortText:(resources string:'Cancel'). |
|
6683 |
"/ box initialText: '0'. |
|
6684 |
"/ box showAtPointer. |
|
6685 |
"/ (box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil]) |
|
6686 |
"/ ifFalse:[ ^ self ]. |
|
6687 |
||
6688 |
imageEditView rotateImageBy:rotation. |
|
6689 |
self updateInfoLabel. |
|
6690 |
||
6691 |
"Modified: / 18-03-2012 / 14:41:14 / cg" |
|
400 | 6692 |
! |
6693 |
||
1557 | 6694 |
doShiftManual |
6695 |
"let user specify amount and shift" |
|
6696 |
||
1713 | 6697 |
|bindings amount img firstChange shiftAction acceptChannel wrapHolder| |
1557 | 6698 |
|
6699 |
acceptChannel := TriggerValue new. |
|
1960 | 6700 |
wrapHolder := (lastShiftUsedWrap ? true) asValue. |
1557 | 6701 |
|
6702 |
firstChange := true. |
|
6703 |
||
6704 |
shiftAction := |
|
6705 |
[:shiftH :shiftV | |
|
6706 |
acceptChannel value:true. |
|
6707 |
||
6708 |
img := imageEditView image. |
|
6709 |
firstChange ifTrue:[ |
|
6710 |
imageEditView makeUndo. |
|
6711 |
firstChange := false. |
|
6712 |
]. |
|
1713 | 6713 |
imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). |
1557 | 6714 |
self updateInfoLabel |
6715 |
]. |
|
6716 |
||
6717 |
bindings := IdentityDictionary new. |
|
6718 |
bindings at:#shiftAmount put:(amount := 1 asValue). |
|
1713 | 6719 |
bindings at:#wrap put:wrapHolder. |
1557 | 6720 |
bindings at:#acceptChannel put:acceptChannel. |
6721 |
||
6722 |
bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ]. |
|
6723 |
bindings at:#shiftRightNow put:[ shiftAction value:amount value value:0 ]. |
|
6724 |
bindings at:#shiftUpNow put:[ shiftAction value:0 value:(-1*amount value) ]. |
|
6725 |
bindings at:#shiftDownNow put:[ shiftAction value:0 value:amount value ]. |
|
6726 |
||
6727 |
(self openDialogInterface:#shiftDialogSpec withBindings:bindings) |
|
6728 |
ifFalse:[ |
|
6729 |
firstChange ~~ true ifTrue:[ |
|
6730 |
imageEditView undo |
|
6731 |
] |
|
6732 |
]. |
|
1960 | 6733 |
lastShiftUsedWrap := wrapHolder value. |
1557 | 6734 |
|
6735 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6736 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6737 |
! |
|
6738 |
||
1480 | 6739 |
doUnCropManual |
6740 |
"let user specify borders and add them" |
|
6741 |
||
6742 |
|bindings left top right bottom img| |
|
6743 |
||
6744 |
bindings := IdentityDictionary new. |
|
1704 | 6745 |
bindings at:#left put:(left := 1 asValue). |
6746 |
bindings at:#right put:(right := 1 asValue). |
|
6747 |
bindings at:#top put:(top := 1 asValue). |
|
6748 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
6749 |
(self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
1480 | 6750 |
ifTrue:[ |
6751 |
left := left value. |
|
6752 |
right := right value. |
|
6753 |
top := top value. |
|
6754 |
bottom := bottom value. |
|
6755 |
img := imageEditView image. |
|
6756 |
||
6757 |
imageEditView |
|
6758 |
makeBorderedImageX:left y:top |
|
6759 |
width:(img width + left + right) |
|
6760 |
height:(img height + top + bottom). |
|
6761 |
self updateInfoLabel |
|
6762 |
]. |
|
6763 |
||
6764 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
6765 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
6766 |
! |
|
6767 |
||
767 | 6768 |
doUndo |
6769 |
"reverses last edit action" |
|
400 | 6770 |
|
1436 | 6771 |
imageEditView undo. |
3253 | 6772 |
self updateImagePreView |
400 | 6773 |
! ! |
6774 |
||
2812 | 6775 |
!ImageEditor methodsFor:'user actions-image sequences'! |
6776 |
||
6777 |
editEachImageFromSequence |
|
6778 |
|seq| |
|
6779 |
||
6780 |
self checkModified ifFalse:[ ^ self ]. |
|
6781 |
||
6782 |
imageEditView releaseUndos. |
|
6783 |
||
6784 |
seq := self image imageSequence. |
|
6785 |
seq size > 10 ifTrue:[ |
|
6786 |
(Dialog confirm:(resources string:'Ok to open %1 image editor windows?' with:seq size)) |
|
6787 |
ifFalse:[^ self]. |
|
6788 |
]. |
|
6789 |
||
6790 |
seq do:[:eachFrame | |
|
6791 |
ImageEditor openOnImage:eachFrame image |
|
6792 |
]. |
|
6793 |
||
6794 |
"Modified: / 21-10-2010 / 15:01:25 / cg" |
|
6795 |
! |
|
6796 |
||
6797 |
gotoImageInSequence:index |
|
6798 |
"display the next image in the image sequence" |
|
6799 |
||
6800 |
|img seq frame listOfColors| |
|
6801 |
||
6802 |
imageEditView releaseUndos. |
|
6803 |
||
6804 |
seq := self image imageSequence. |
|
6805 |
||
6806 |
imageSeqNr := index. |
|
6807 |
frame := seq at:imageSeqNr. |
|
6808 |
imageEditView image:(frame image). |
|
6809 |
||
6810 |
(img := self image) notNil ifTrue:[ |
|
6811 |
listOfColors := self listOfColors. |
|
6812 |
img colorMap notNil ifTrue:[ |
|
6813 |
listOfColors contents:(img usedColors asSet asOrderedCollection). |
|
6814 |
] ifFalse:[ |
|
6815 |
listOfColors removeAll. |
|
6816 |
]. |
|
6817 |
self findColorMapMode. |
|
6818 |
self updateLabelsAndHistory. |
|
6819 |
img := img onDevice:device. |
|
6820 |
imageEditView image:img. |
|
6821 |
] ifFalse:[ |
|
6822 |
self updateForNoImage |
|
6823 |
]. |
|
6824 |
||
6825 |
"Created: / 21-10-2010 / 14:22:11 / cg" |
|
6826 |
! |
|
6827 |
||
6828 |
nextImageInSequence |
|
6829 |
"display the next image in the image sequence" |
|
6830 |
||
6831 |
|seq index| |
|
6832 |
||
6833 |
seq := self image imageSequence. |
|
6834 |
(index := imageSeqNr) isNil ifTrue:[ |
|
6835 |
index := 1. |
|
6836 |
]. |
|
6837 |
index := index + 1. |
|
6838 |
index > seq size ifTrue:[ |
|
6839 |
self information:'Back to first image in sequence'. |
|
6840 |
index := 1. |
|
6841 |
]. |
|
6842 |
self gotoImageInSequence:index. |
|
6843 |
||
6844 |
"Modified: / 21-10-2010 / 14:24:11 / cg" |
|
6845 |
! |
|
6846 |
||
6847 |
previousImageInSequence |
|
6848 |
"display the previous image in the image sequence" |
|
6849 |
||
6850 |
|seq index| |
|
6851 |
||
6852 |
seq := self image imageSequence. |
|
6853 |
(index := imageSeqNr) isNil ifTrue:[ |
|
6854 |
index := 1. |
|
6855 |
]. |
|
6856 |
index := index - 1. |
|
6857 |
index < 1 ifTrue:[ |
|
6858 |
self information:'Wrap to last image in sequence'. |
|
6859 |
index := seq size. |
|
6860 |
]. |
|
6861 |
self gotoImageInSequence:index. |
|
6862 |
||
6863 |
"Created: / 21-10-2010 / 14:25:03 / cg" |
|
6864 |
! ! |
|
6865 |
||
1715 | 6866 |
!ImageEditor methodsFor:'user actions-loading'! |
400 | 6867 |
|
767 | 6868 |
doLoadFromClass |
6869 |
"opens a dialog for loading an image from class and a (resource-) selector" |
|
400 | 6870 |
|
1122 | 6871 |
|img| |
6872 |
||
1975 | 6873 |
self checkModified ifFalse:[ ^ self ]. |
6874 |
||
1054 | 6875 |
(imageEditView loadFromClass) notNil ifTrue:[ |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6876 |
imageSeqNr := nil. |
1122 | 6877 |
(img := self image) notNil ifTrue: [ |
1900 | 6878 |
self updateColorsFromImage:img. |
574 | 6879 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
6880 |
self updateLabelsAndHistory. |
1054 | 6881 |
] ifFalse: [ |
6882 |
self updateForNoImage |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
6883 |
]. |
449 | 6884 |
] |
400 | 6885 |
! |
6886 |
||
767 | 6887 |
doLoadFromFile |
6888 |
"opens a dialog for loading an image from a file" |
|
400 | 6889 |
|
2820 | 6890 |
|img file filters title| |
1353 | 6891 |
|
1975 | 6892 |
self checkModified ifFalse:[ ^ self ]. |
6893 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
6894 |
imageSeqNr := nil. |
1353 | 6895 |
img := self image. |
6896 |
img notNil ifTrue: [ |
|
6897 |
file := img fileName |
|
6898 |
]. |
|
6899 |
||
2820 | 6900 |
title := (resources string:'Load Image From'). |
6901 |
||
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
6902 |
(UserPreferences current useNativeFileDialog |
3100 | 6903 |
and:[Screen current isWindowsPlatform]) ifTrue:[ |
2820 | 6904 |
self withWaitCursorDo:[ |
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
6905 |
file := Screen current |
2820 | 6906 |
nativeFileDialogFor:(self window topView id) |
6907 |
save:false |
|
6908 |
title:title |
|
6909 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
6910 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 6911 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 6912 |
filter: |
6913 |
{ |
|
6914 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp;*.jpg' } . |
|
6915 |
{ (resources string:'All Files') . '*.*' } |
|
6916 |
} |
|
2821 | 6917 |
extension:nil |
2827 | 6918 |
"blocking:false". |
2820 | 6919 |
]. |
6920 |
] ifFalse:[ |
|
6921 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
6922 |
file notNil ifTrue:[ |
|
6923 |
file := FileSelectionBrowser |
|
6924 |
request:title |
|
6925 |
fileName:file |
|
6926 |
withFileFilters:filters. |
|
6927 |
] ifFalse:[ |
|
6928 |
file := FileSelectionBrowser |
|
6929 |
request:title |
|
6930 |
inDirectory:LastDirectory |
|
6931 |
withFileFilters:filters. |
|
6932 |
]. |
|
1353 | 6933 |
]. |
2820 | 6934 |
|
1353 | 6935 |
file notNil ifTrue:[ |
6936 |
LastDirectory := file asFilename directoryName. |
|
6937 |
self loadFromFile:file |
|
6938 |
] |
|
2820 | 6939 |
|
2827 | 6940 |
"Modified: / 14-12-2010 / 13:52:11 / cg" |
400 | 6941 |
! |
6942 |
||
2796 | 6943 |
doLoadFromURL |
6944 |
"opens a dialog for loading an image from a URL" |
|
6945 |
||
2866 | 6946 |
|tempFile url response| |
2796 | 6947 |
|
6948 |
self checkModified ifFalse:[ ^ self ]. |
|
6949 |
||
6950 |
url := Dialog |
|
2866 | 6951 |
request:(resources string:'Load Image from URL') |
2796 | 6952 |
initialAnswer:LastURL. |
6953 |
||
6954 |
url notEmptyOrNil ifTrue:[ |
|
3050 | 6955 |
HTTPInterface isNil ifTrue:[ Smalltalk loadPackage:'stx:goodies/communication']. |
6956 |
||
2796 | 6957 |
LastURL := url. |
3027 | 6958 |
tempFile := FileStream newTemporary close fileName. |
2866 | 6959 |
self withWaitCursorDo:[ |
6960 |
response := HTTPInterface get:url destinationFile:tempFile. |
|
6961 |
]. |
|
6962 |
response isErrorResponse ifTrue:[ |
|
6963 |
Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText). |
|
6964 |
] ifFalse:[ |
|
6965 |
self loadFromFile:tempFile. |
|
6966 |
]. |
|
2796 | 6967 |
tempFile delete |
6968 |
] |
|
6969 |
||
6970 |
"Created: / 20-09-2010 / 11:30:59 / cg" |
|
6971 |
! |
|
6972 |
||
767 | 6973 |
doNewImage |
6974 |
"opens a dialog with choices of size and color map for creating a new image" |
|
400 | 6975 |
|
1975 | 6976 |
|dialogAspects width height cMapString cMapMode cMap imageClass image szString defaultSize ext| |
6977 |
||
6978 |
self checkModified ifFalse:[ ^ self ]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6979 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6980 |
defaultSize := (self class listOfDefaultSizes includes:'32x32') |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6981 |
ifTrue:['32x32'] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6982 |
ifFalse:[self class listOfDefaultSizes first]. |
767 | 6983 |
|
1975 | 6984 |
dialogAspects := IdentityDictionary new |
767 | 6985 |
at:#listOfSizes put: self class listOfDefaultSizes asValue; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6986 |
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
|
6987 |
at:#selectionOfSize put: (LastSizeString ? defaultSize) asValue; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
6988 |
at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue; |
400 | 6989 |
yourself. |
6990 |
||
1975 | 6991 |
(self openDialogInterface:#dialogSpecForNewImage withBindings:dialogAspects) |
1383 | 6992 |
ifTrue:[ |
1975 | 6993 |
szString := (dialogAspects at:#selectionOfSize) value. |
1960 | 6994 |
ext := self pointFromString:szString. |
1962 | 6995 |
ext isNil ifTrue:[ |
6996 |
width := height := 32 |
|
6997 |
] ifFalse:[ |
|
6998 |
width := ext x. |
|
6999 |
height := ext y. |
|
7000 |
]. |
|
1960 | 7001 |
"/ width := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]). |
7002 |
"/ height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]). |
|
400 | 7003 |
|
1975 | 7004 |
cMapString := (dialogAspects at:#selectionOfColorMap) value. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7005 |
cMapMode := self class namesOfColorMaps keyAtEqualValue:cMapString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7006 |
cMap := self class listOfColorMaps at:cMapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7007 |
imageClass := Image implementorForDepth:(cMap size highBit-1). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7008 |
image := imageClass width: width height: height. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7009 |
image bits:(ByteArray new:(image bytesPerRow*height)). |
400 | 7010 |
|
1637 | 7011 |
LastSizeString := szString. |
7012 |
LastColormapMode := cMapString. |
|
7013 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7014 |
(cMapMode startsWith: 'mask') ifTrue:[ |
3125
9d5624af77ab
Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents:
3122
diff
changeset
|
7015 |
image mask: (ImageMask width: width height: height depth: 1 fromArray: (ByteArray new: width*height)). |
400 | 7016 |
]. |
7017 |
image colorMap: cMap. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7018 |
(imageEditView image: image) notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7019 |
self updateListOfColorsAndColormapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7020 |
self updateLabelsAndHistory. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
7021 |
]. |
400 | 7022 |
image fillRectangleX:0 y:0 width:width height:height with:Color white. |
767 | 7023 |
] |
929 | 7024 |
! |
7025 |
||
2058 | 7026 |
doNewImageEditor |
7027 |
"opens a new image editor" |
|
7028 |
||
7029 |
ImageEditor open |
|
7030 |
||
7031 |
"Created: / 17-08-2006 / 09:03:14 / cg" |
|
7032 |
! |
|
7033 |
||
1682 | 7034 |
doNewImageFromClipboard |
7035 |
|image| |
|
7036 |
||
1975 | 7037 |
self checkModified ifFalse:[ ^ self ]. |
7038 |
||
1682 | 7039 |
image := imageEditView clipBoard. |
3164 | 7040 |
image isImageOrForm ifFalse:[ |
7041 |
image := Image readFrom:(image asString) onError:nil. |
|
7042 |
image isNil ifTrue:[ |
|
7043 |
Dialog warn:'Clipboard does not contain an image I can use/understand'. |
|
7044 |
^ self. |
|
7045 |
]. |
|
7046 |
]. |
|
1975 | 7047 |
imageEditView image:image. |
7048 |
||
7049 |
image notNil ifTrue:[ |
|
1900 | 7050 |
self updateColorsFromImage:image. |
1682 | 7051 |
self findColorMapMode. |
7052 |
self updateLabelsAndHistory. |
|
7053 |
] |
|
7054 |
! |
|
7055 |
||
3200 | 7056 |
doNewMaskFromClipboard |
7057 |
|mask image newImage| |
|
7058 |
||
7059 |
self checkModified ifFalse:[ ^ self ]. |
|
7060 |
||
7061 |
mask := imageEditView clipBoard. |
|
7062 |
mask isImageOrForm ifFalse:[ |
|
7063 |
mask := Image readFrom:(mask asString) onError:nil. |
|
7064 |
mask isNil ifTrue:[ |
|
7065 |
Dialog warn:'Clipboard does not contain an image I can use/understand'. |
|
7066 |
^ self. |
|
7067 |
]. |
|
7068 |
]. |
|
7069 |
(image:= imageEditView image) isNil ifTrue:[ |
|
7070 |
image := mask. |
|
7071 |
]. |
|
7072 |
mask extent ~= image extent ifTrue:[ |
|
7073 |
mask := imageEditView resizedImage:mask to:image extent. |
|
7074 |
]. |
|
7075 |
newImage := image copy. |
|
7076 |
newImage mask:mask. |
|
7077 |
imageEditView newImageWithUndo:newImage. |
|
7078 |
self updateAfterImageChange. |
|
7079 |
"/ self updateColorsFromImage:image. |
|
7080 |
"/ self findColorMapMode. |
|
7081 |
"/ self updateLabelsAndHistory. |
|
7082 |
! |
|
7083 |
||
929 | 7084 |
grabScreenImage |
7085 |
"let user choose an area and grab that are for editing" |
|
7086 |
||
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7087 |
self grabScreenImageUsing:[ |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7088 |
|r| |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7089 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7090 |
[Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7091 |
r := Rectangle fromUser. |
2708 | 7092 |
(r width == 0 or:[r height == 0]) ifTrue:[ |
7093 |
nil |
|
7094 |
] ifFalse:[ |
|
7095 |
lastGrabbedScreenArea := r. |
|
7096 |
Image fromScreen:r |
|
7097 |
] |
|
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7098 |
]. |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7099 |
! |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7100 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7101 |
grabScreenImageFromLastArea |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7102 |
"grab again from the previous area for editing" |
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7103 |
|
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7104 |
self grabScreenImageUsing:[ |
2708 | 7105 |
Image fromScreen:lastGrabbedScreenArea |
2707
6610854318eb
remember last grabbed screen area
Claus Gittinger <cg@exept.de>
parents:
2704
diff
changeset
|
7106 |
]. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7107 |
! |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7108 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7109 |
grabScreenImageUsing:aBlock |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7110 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7111 |
|
1975 | 7112 |
self checkModified ifFalse:[ ^ self ]. |
7113 |
||
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7114 |
Processor |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7115 |
addTimedBlock:[ |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7116 |
|image d8image img| |
929 | 7117 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
7118 |
imageSeqNr := nil. |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7119 |
image := aBlock value. |
2708 | 7120 |
image notNil ifTrue:[ |
1121 | 7121 |
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
|
7122 |
false ifTrue:[ |
1687
f4543a556b89
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1682
diff
changeset
|
7123 |
Error handle:[:ex | |sig| |
2996 | 7124 |
(sig := ex creator) == HaltInterrupt ifTrue:[ex reject]. |
1122 | 7125 |
sig == Signal noHandlerSignal ifTrue:[ex reject]. |
1121 | 7126 |
|
7127 |
self warn:'Could not convert to depth8 image (too many colors)'. |
|
7128 |
d8image := nil. |
|
7129 |
] do:[ |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
7130 |
d8image := Depth8Image fromImage:image photometric:#palette. |
1121 | 7131 |
]. |
7132 |
d8image notNil ifTrue:[ |
|
7133 |
image := d8image |
|
7134 |
] |
|
2420
14678b9fea60
grabScreenImage - do not convert to 8bit; leave as is initially
Claus Gittinger <cg@exept.de>
parents:
2375
diff
changeset
|
7135 |
]. |
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7136 |
]. |
1121 | 7137 |
(imageEditView image:image) notNil ifTrue:[ |
7138 |
self listOfColors contents:(image colorMap). |
|
7139 |
self findColorMapMode. |
|
7140 |
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
|
7141 |
] |
1121 | 7142 |
] |
7143 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
7144 |
afterSeconds:1 |
929 | 7145 |
|
7146 |
"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
|
7147 |
"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
|
7148 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
7149 |
|
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7150 |
grabWindowImage |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7151 |
"let user choose an area and grab that are for editing" |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7152 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7153 |
self grabScreenImageUsing:[ |
3188 | 7154 |
|v topView| |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7155 |
|
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7156 |
(v := Screen current viewFromUser) notNil ifTrue:[ |
3188 | 7157 |
topView := v topView. |
7158 |
topView raise; makeFullyVisible. |
|
2704 | 7159 |
Delay waitForSeconds:0.5. "/ give view a chance to redraw itself. |
3188 | 7160 |
Image fromView:topView |
2701
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7161 |
]. |
5abe05ebb370
added: grabWindowImage (menu)
Claus Gittinger <cg@exept.de>
parents:
2663
diff
changeset
|
7162 |
]. |
400 | 7163 |
! ! |
7164 |
||
1715 | 7165 |
!ImageEditor methodsFor:'user actions-saving'! |
400 | 7166 |
|
767 | 7167 |
doPrint |
7168 |
"prints current image on the current printer" |
|
400 | 7169 |
|
1734 | 7170 |
self withWaitCursorDo:[ |
7171 |
imageEditView print |
|
7172 |
] |
|
400 | 7173 |
! |
7174 |
||
1613 | 7175 |
doSaveButtonImageToFileAs |
7176 |
"opens a dialog for saving current image to a file" |
|
7177 |
||
7178 |
imageEditView saveButtonImageToFileAs. |
|
7179 |
self updateLabelsAndHistory. |
|
7180 |
! |
|
7181 |
||
767 | 7182 |
doSaveImageFile |
7183 |
"saves current image to current file" |
|
400 | 7184 |
|
1481 | 7185 |
imageEditView save. |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7186 |
self clearModified. |
400 | 7187 |
! |
7188 |
||
767 | 7189 |
doSaveImageFileAs |
1922 | 7190 |
"opens a dialog for saving an image to a file" |
7191 |
||
7192 |
|img file filters| |
|
7193 |
||
7194 |
img := self image. |
|
7195 |
img notNil ifTrue: [ |
|
7196 |
file := img fileName |
|
7197 |
]. |
|
7198 |
||
2595 | 7199 |
filters := FileSelectionBrowser saveImageFileNameFilters. |
1922 | 7200 |
|
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
7201 |
(UserPreferences current useNativeFileDialog |
3100 | 7202 |
and:[Screen current isWindowsPlatform]) ifTrue:[ |
2820 | 7203 |
self withWaitCursorDo:[ |
3066
a8e197ceebed
Replace references to Diplay with "Screen current" - where appropriate
Stefan Vogel <sv@exept.de>
parents:
3050
diff
changeset
|
7204 |
file := Screen current |
2820 | 7205 |
nativeFileDialogFor:(self window topView id) |
7206 |
save:true |
|
7207 |
title:(resources string:'Save Image To') |
|
7208 |
inDirectory:(file notNil ifTrue:[file asFilename directory pathName] ifFalse:[LastDirectory]) |
|
7209 |
initialAnswer:(file notNil ifTrue:[file asFilename baseName] ifFalse:['image.png']) |
|
2827 | 7210 |
"/ flags:#( ENABLESIZING "HIDEREADONLY" EXPLORER NOCHANGEDIR) |
2820 | 7211 |
filter: |
7212 |
{ |
|
7213 |
{ (resources string:'Image Files') . '*.tif;*.png;*.gif;*.bmp' } . |
|
7214 |
{ (resources string:'All Files') . '*.*' } |
|
7215 |
} |
|
2821 | 7216 |
extension:nil |
2827 | 7217 |
"blocking:false". |
2807 | 7218 |
]. |
2820 | 7219 |
] ifFalse:[ |
7220 |
(FileSelectionBrowser isNil or:[DirectoryView isNil]) ifTrue:[ |
|
7221 |
file notNil ifTrue:[ |
|
7222 |
file := Dialog requestFileName:'Save Image To' |
|
7223 |
default:file |
|
7224 |
pattern:(filters first). |
|
7225 |
] ifFalse:[ |
|
7226 |
file := Dialog |
|
7227 |
requestFileName:'Save Image To' |
|
7228 |
default:'image.png' |
|
7229 |
pattern:(filters first) |
|
7230 |
fromDirectory:LastDirectory. |
|
7231 |
]. |
|
2807 | 7232 |
] ifFalse:[ |
2820 | 7233 |
file notNil ifTrue:[ |
7234 |
file := FileSelectionBrowser |
|
7235 |
request:'Save Image To' |
|
7236 |
fileName:file |
|
7237 |
withFileFilters:filters. |
|
7238 |
] ifFalse:[ |
|
7239 |
file := FileSelectionBrowser |
|
7240 |
request:'Save Image To' |
|
7241 |
inDirectory:LastDirectory |
|
7242 |
withFileFilters:filters. |
|
7243 |
]. |
|
2807 | 7244 |
]. |
1922 | 7245 |
]. |
7246 |
file notNil ifTrue:[ |
|
7247 |
imageEditView saveImageFileAs:file. |
|
7248 |
LastDirectory := file asFilename directoryName. |
|
7249 |
self updateLabelsAndHistory. |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7250 |
self clearModified. |
1922 | 7251 |
] |
2807 | 7252 |
|
2827 | 7253 |
"Modified: / 14-12-2010 / 13:51:47 / cg" |
400 | 7254 |
! |
7255 |
||
767 | 7256 |
doSaveImageMaskFileAs |
7257 |
"opens a dialog for saving mask of current image to a file" |
|
400 | 7258 |
|
1481 | 7259 |
imageEditView saveImageMaskFileAs. |
400 | 7260 |
! |
7261 |
||
767 | 7262 |
doSaveMethod |
1975 | 7263 |
"saves the image in current class and selector" |
7264 |
||
7265 |
imageEditView saveMethod ifTrue:[ |
|
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7266 |
self updateLabelsAndHistory. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7267 |
self clearModified. |
400 | 7268 |
] |
7269 |
! |
|
7270 |
||
767 | 7271 |
doSaveMethodAs |
7272 |
"opens a dialog for saving current image on a class and a selector" |
|
400 | 7273 |
|
1975 | 7274 |
imageEditView saveMethodAs ifTrue:[ |
2006
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7275 |
self updateLabelsAndHistory. |
ae6fe65e9f33
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
1998
diff
changeset
|
7276 |
self clearModified. |
400 | 7277 |
] |
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7278 |
! |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7279 |
|
3022 | 7280 |
doShowPixelArrayLiteralString |
7281 |
"opens a dialog showing a literal array-like storeString |
|
7282 |
(sometimes useful to embed an image into source code)" |
|
7283 |
||
7284 |
|img| |
|
7285 |
||
7286 |
img := imageEditView image. |
|
7287 |
TextBox openOn:img bits storeString |
|
7288 |
! |
|
7289 |
||
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7290 |
doShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7291 |
"opens a dialog showing the storeString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7292 |
(sometimes useful to embed an image into source code)" |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7293 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7294 |
|img| |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7295 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7296 |
img := imageEditView image. |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
7297 |
TextBox openOn:img storeString |
1975 | 7298 |
! |
7299 |
||
7300 |
save |
|
7301 |
"saves current image on current class and selector" |
|
7302 |
||
7303 |
self doSaveMethod |
|
400 | 7304 |
! ! |
7305 |
||
1715 | 7306 |
!ImageEditor methodsFor:'user actions-settings'! |
1353 | 7307 |
|
7308 |
doChangeGridMagnification |
|
7309 |
"change grid magnification" |
|
7310 |
||
7311 |
|box oldGridLimit newGridLimit| |
|
7312 |
||
7313 |
oldGridLimit := imageEditView class gridMagnificationLimit asPoint. |
|
7314 |
||
7315 |
box := EnterBox new. |
|
7316 |
box title:(resources string:'Grid Magnification Limit:'). |
|
7317 |
box okText:(resources string:'OK'). |
|
7318 |
box abortText:(resources string:'Cancel'). |
|
7319 |
box initialText:(oldGridLimit x printString). |
|
7320 |
box showAtPointer. |
|
7321 |
||
7322 |
(box accepted |
|
7323 |
and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil] |
|
7324 |
) ifTrue:[ |
|
7325 |
newGridLimit := (99 min: (2 max:newGridLimit)) asPoint. |
|
7326 |
imageEditView class gridMagnificationLimit:newGridLimit. |
|
7327 |
imageEditView invalidate |
|
7328 |
] |
|
7329 |
||
2192 | 7330 |
! |
7331 |
||
7332 |
penWidth:n |
|
7333 |
imageEditView penWidth:n |
|
7334 |
||
7335 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
2375 | 7336 |
! |
7337 |
||
2881 | 7338 |
penWidthHolderChanged |
7339 |
imageEditView penWidth:(self penWidthHolder value) |
|
7340 |
||
7341 |
"Created: / 15-02-2012 / 22:32:00 / cg" |
|
7342 |
! |
|
7343 |
||
2375 | 7344 |
spraySpot:n |
7345 |
imageEditView spraySpot:n |
|
7346 |
||
7347 |
"Created: / 01-11-2007 / 23:47:48 / cg" |
|
2881 | 7348 |
! |
7349 |
||
7350 |
spraySpotHolderChanged |
|
7351 |
imageEditView spraySpot:(self spraySpotHolder value) |
|
7352 |
||
7353 |
"Created: / 15-02-2012 / 22:37:08 / cg" |
|
1353 | 7354 |
! ! |
7355 |
||
400 | 7356 |
!ImageEditor class methodsFor:'documentation'! |
7357 |
||
7358 |
version |
|
7359 |
^ '$Header$' |
|
2590 | 7360 |
! |
7361 |
||
7362 |
version_CVS |
|
7363 |
^ '$Header$' |
|
400 | 7364 |
! ! |
2945 | 7365 |