author | Claus Gittinger <cg@exept.de> |
Fri, 20 Jan 2006 16:27:10 +0100 | |
changeset 1956 | 65cc475656d3 |
parent 1952 | 73a141744891 |
child 1960 | 62c7258f3c31 |
permissions | -rw-r--r-- |
400 | 1 |
" |
767 | 2 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 3 |
All Rights Reserved |
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
405 | 7 |
inclusion of the above copyright notice. This software may not |
400 | 8 |
be provided or otherwise made available to, or used by, any |
405 | 9 |
other person. No title to or ownership of the software is |
400 | 10 |
hereby transferred. |
11 |
" |
|
12 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
13 |
"{ Package: 'stx:libtool2' }" |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
14 |
|
400 | 15 |
ToolApplicationModel subclass:#ImageEditor |
975 | 16 |
instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
17 |
selectedColorIndex postOpenAction imageSeqNr drawingColormap' |
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
18 |
classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
19 |
DefaultRelativeSizes' |
929 | 20 |
poolDictionaries:'' |
21 |
category:'Interface-UIPainter' |
|
400 | 22 |
! |
23 |
||
24 |
!ImageEditor class methodsFor:'documentation'! |
|
25 |
||
26 |
copyright |
|
27 |
" |
|
767 | 28 |
COPYRIGHT (c) 1997-1998 by eXept Software AG |
400 | 29 |
All Rights Reserved |
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
405 | 33 |
inclusion of the above copyright notice. This software may not |
400 | 34 |
be provided or otherwise made available to, or used by, any |
405 | 35 |
other person. No title to or ownership of the software is |
400 | 36 |
hereby transferred. |
37 |
" |
|
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
737 | 42 |
Image Editor allows you to create, design, modify or just inspect images. |
400 | 43 |
|
44 |
[start with:] |
|
45 |
ImageEditor open |
|
941 | 46 |
ImageEditor openOnClass:Icon andSelector:#startIcon |
400 | 47 |
|
48 |
[see also:] |
|
49 |
ImageEditView Image |
|
50 |
||
51 |
[author:] |
|
544 | 52 |
Thomas Zwick, eXept Software AG |
1806 | 53 |
Claus Gittinger, eXept Software AG |
400 | 54 |
" |
55 |
! ! |
|
56 |
||
57 |
!ImageEditor class methodsFor:'instance creation'! |
|
58 |
||
59 |
openModalOnClass: aClass andSelector: aSelector |
|
900 | 60 |
"opens modal a Image Editor on aClass and aSelector" |
767 | 61 |
" |
62 |
self openModalOnClass: self andSelector: #leftMouseKeyIcon |
|
63 |
" |
|
400 | 64 |
|
767 | 65 |
|imageEditor imageEditView className resourceClassName resourceSelector| |
66 |
||
400 | 67 |
imageEditor := self new. |
767 | 68 |
|
900 | 69 |
aClass isClass ifTrue: [className := aClass name]. |
70 |
aClass isString ifTrue: [className := aClass]. |
|
903 | 71 |
aClass isNil ifTrue: [className := '']. |
400 | 72 |
|
688 | 73 |
imageEditor postOpenAction: [imageEditView := imageEditor imageEditView. imageEditor loadFromOrPrepareForMessage: className, ' ', aSelector]. |
400 | 74 |
imageEditor openModal. |
75 |
||
688 | 76 |
resourceClassName := imageEditView resourceClass. |
767 | 77 |
resourceSelector := imageEditView resourceSelector. |
415 | 78 |
|
815 | 79 |
((className asString ~= resourceClassName) |
80 |
or:[aSelector asString ~= resourceSelector]) |
|
415 | 81 |
ifTrue: [^resourceClassName, ' ', resourceSelector] |
82 |
ifFalse:[^nil] |
|
400 | 83 |
! |
84 |
||
85 |
openOnClass: aClass andSelector: aSelector |
|
900 | 86 |
"opens a Image Editor on aClass and aSelector" |
767 | 87 |
" |
88 |
self openOnClass: self andSelector: #leftMouseKeyIcon |
|
89 |
" |
|
400 | 90 |
|
1057 | 91 |
|editor| |
92 |
||
93 |
editor := self new. |
|
94 |
editor allButOpen. |
|
1381 | 95 |
aSelector notNil ifTrue:[ |
96 |
editor loadFromMessage: aClass name, ' ', aSelector. |
|
97 |
] ifFalse:[ |
|
98 |
editor resourceClass:aClass |
|
99 |
]. |
|
1057 | 100 |
editor openWindow |
101 |
||
102 |
"Modified: / 16.3.1999 / 21:33:49 / cg" |
|
400 | 103 |
! |
104 |
||
767 | 105 |
openOnFile: aFileName |
900 | 106 |
"opens a Image Editor on aFileName" |
767 | 107 |
" |
108 |
self openOnFile: 'bitmaps/SmalltalkX.xbm' |
|
109 |
" |
|
400 | 110 |
|
1057 | 111 |
|editor| |
112 |
||
113 |
editor := self new. |
|
114 |
editor allButOpen. |
|
115 |
editor loadFromFile: aFileName. |
|
116 |
editor openWindow |
|
117 |
||
118 |
"Modified: / 16.3.1999 / 21:33:25 / cg" |
|
400 | 119 |
! |
120 |
||
767 | 121 |
openOnImage: anImage |
900 | 122 |
"opens a Image Editor on anImage" |
767 | 123 |
" |
895 | 124 |
self openOnImage: Icon startIcon |
767 | 125 |
" |
400 | 126 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
127 |
|editor| |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
128 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
129 |
editor := self new. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
130 |
editor allButOpen. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
131 |
editor loadFromImage: anImage. |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
132 |
editor openWindow |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
133 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
134 |
"Modified: / 11.3.1999 / 16:18:33 / cg" |
400 | 135 |
! ! |
136 |
||
137 |
!ImageEditor class methodsFor:'accessing'! |
|
138 |
||
139 |
listOfColorMaps |
|
767 | 140 |
"returns the list of default color maps for a new image" |
400 | 141 |
|
142 |
|colorMap| |
|
898 | 143 |
|
400 | 144 |
(colorMap := OrderedCollection new) |
145 |
add: Color black; |
|
146 |
add: Color white; |
|
147 |
add: Color red; |
|
148 |
add: Color green; |
|
149 |
add: Color blue; |
|
150 |
add: Color cyan; |
|
151 |
add: Color yellow; |
|
152 |
add: Color magenta; |
|
898 | 153 |
add: (Color redByte: 127 greenByte: 0 blueByte: 0); |
154 |
add: (Color redByte: 0 greenByte: 127 blueByte: 0); |
|
155 |
add: (Color redByte: 0 greenByte: 0 blueByte: 127); |
|
156 |
add: (Color redByte: 0 greenByte: 127 blueByte: 127); |
|
157 |
add: (Color redByte: 127 greenByte: 127 blueByte: 0); |
|
158 |
add: (Color redByte: 127 greenByte: 0 blueByte: 127); |
|
159 |
add: (Color redByte: 127 greenByte: 127 blueByte: 127); |
|
160 |
add: (Color redByte: 170 greenByte: 170 blueByte: 170). |
|
161 |
||
400 | 162 |
0 to: 5 do: |
163 |
[:r| |
|
164 |
0 to: 5 do: |
|
165 |
[:g| |
|
166 |
0 to: 5 do: |
|
167 |
[:b| |
|
898 | 168 |
colorMap add: (Color redByte: (r*255//5) ceiling greenByte: (g*255//5) ceiling blueByte: (b*255//5) ceiling) |
400 | 169 |
] |
170 |
] |
|
171 |
]. |
|
172 |
||
173 |
1 to: 25 do: |
|
174 |
[:g| |
|
898 | 175 |
colorMap add: (Color redByte: (g*255//26) ceiling greenByte: (g*255//26) ceiling blueByte: (g*255//26) ceiling) |
400 | 176 |
]. |
177 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
178 |
^ Dictionary new |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
179 |
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
|
180 |
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
|
181 |
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
|
182 |
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
|
183 |
at: #depth8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
184 |
at: #masked8 put: colorMap; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
185 |
at: #depth4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
186 |
at: #masked4 put: (colorMap copyFrom: 1 to: 16); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
187 |
at: #depth2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
188 |
at: #masked2 put: (colorMap copyFrom: 1 to: 4); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
189 |
at: #depth1 put: (colorMap copyFrom: 1 to: 2); |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
190 |
at: #masked1 put: (colorMap copyFrom: 1 to: 2); |
400 | 191 |
yourself |
192 |
! |
|
193 |
||
194 |
listOfDefaultSizes |
|
767 | 195 |
"returns the list of default sizes for a new image" |
400 | 196 |
|
932
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
197 |
^#('8x8' '16x16' '22x22' '32x32' '48x48' '64x64') |
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
198 |
|
7111238cda23
fixed dimension of new-image dialog.
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
199 |
"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
|
200 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
201 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
202 |
namesOfColorMaps |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
203 |
^ Dictionary new |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
204 |
at: #depth24 put: '24-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
205 |
at: #masked24 put: '24-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
206 |
at: #depth16 put: '16-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
207 |
at: #masked16 put: '16-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
208 |
at: #depth8 put: ' 8-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
209 |
at: #masked8 put: ' 8-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
210 |
at: #depth4 put: ' 4-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
211 |
at: #masked4 put: ' 4-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
212 |
at: #depth2 put: ' 2-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
213 |
at: #masked2 put: ' 2-plane + mask'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
214 |
at: #depth1 put: ' 1-plane'; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
215 |
at: #masked1 put: ' 1-plane + mask' ; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
216 |
yourself |
400 | 217 |
! ! |
218 |
||
460 | 219 |
!ImageEditor class methodsFor:'help specs'! |
220 |
||
1545 | 221 |
flyByHelpSpec |
222 |
<resource: #help> |
|
223 |
||
224 |
^super flyByHelpSpec addPairsFrom:#( |
|
225 |
||
226 |
#drawModeBox |
|
227 |
'Rectangle' |
|
228 |
||
229 |
#drawModeCopy |
|
230 |
'Copy' |
|
231 |
||
232 |
#drawModeFill |
|
1637 | 233 |
'Flood-Fill' |
1545 | 234 |
|
235 |
#drawModeFilledBox |
|
1637 | 236 |
'Filled Rectangle' |
1545 | 237 |
|
238 |
#drawModePaste |
|
239 |
'Paste' |
|
240 |
||
241 |
#drawModePasteUnder |
|
1637 | 242 |
'Paste Under' |
243 |
||
244 |
#drawModePasteWithMask |
|
1656 | 245 |
'Paste with Mask' |
1545 | 246 |
|
247 |
#drawModePoint |
|
248 |
'Point' |
|
249 |
||
1639 | 250 |
#drawModeSpecial |
251 |
'Special Operations' |
|
252 |
||
1545 | 253 |
#fileGrabImage |
1748
a62052c6ee71
toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents:
1741
diff
changeset
|
254 |
'Pick from Screen' |
1545 | 255 |
|
256 |
#fileLoadFromClass |
|
1884 | 257 |
'Load from Method...' |
1545 | 258 |
|
259 |
#fileLoadFromFile |
|
1884 | 260 |
'Load from File...' |
1545 | 261 |
|
262 |
#fileNewImage |
|
1637 | 263 |
'New Image' |
1545 | 264 |
|
265 |
#filePrint |
|
266 |
'Print' |
|
267 |
||
268 |
#fileSaveAs |
|
1884 | 269 |
'Save to File...' |
1545 | 270 |
|
271 |
#fileSaveMaskAs |
|
1884 | 272 |
'Save Mask to File...' |
1545 | 273 |
|
274 |
#fileSaveMethod |
|
1637 | 275 |
'Save as Method' |
1545 | 276 |
|
277 |
#fileSaveMethodAs |
|
1884 | 278 |
'Save as Method...' |
1545 | 279 |
|
280 |
) |
|
281 |
! |
|
282 |
||
460 | 283 |
helpSpec |
737 | 284 |
"This resource specification was automatically generated |
285 |
by the UIHelpTool of ST/X." |
|
286 |
||
287 |
"Do not manually edit this!! If it is corrupted, |
|
288 |
the UIHelpTool may not be able to read the specification." |
|
460 | 289 |
|
290 |
" |
|
737 | 291 |
UIHelpTool openOnClass:ImageEditor |
460 | 292 |
" |
293 |
||
737 | 294 |
<resource: #help> |
295 |
||
296 |
^super helpSpec addPairsFrom:#( |
|
460 | 297 |
|
298 |
#colorMap |
|
929 | 299 |
'ColorMap functions.' |
300 |
||
301 |
#colorMap1 |
|
302 |
'Convert to depth-1 image.' |
|
303 |
||
986 | 304 |
#colorMap1M |
305 |
'Convert to depth-1 image plus mask.' |
|
306 |
||
929 | 307 |
#colorMap2 |
308 |
'Convert to depth-2 image.' |
|
309 |
||
986 | 310 |
#colorMap2M |
311 |
'Convert to depth-2 image plus mask.' |
|
312 |
||
929 | 313 |
#colorMap4 |
314 |
'Convert to depth-4 image.' |
|
315 |
||
986 | 316 |
#colorMap4M |
317 |
'Convert to depth-4 image plus mask.' |
|
318 |
||
929 | 319 |
#colorMap8 |
320 |
'Convert to depth-8 image.' |
|
321 |
||
322 |
#colorMap8M |
|
323 |
'Convert to depth-8 image plus mask.' |
|
324 |
||
986 | 325 |
#colorMapTable |
326 |
'Shows a list of used colors of the image.' |
|
327 |
||
929 | 328 |
#compressColormap |
329 |
'Remove unneeded entries from the colorMap.' |
|
460 | 330 |
|
1045 | 331 |
#cropAll |
986 | 332 |
'Find and remove all borders.' |
333 |
||
1045 | 334 |
#cropBottom |
986 | 335 |
'Find and remove bottom border.' |
336 |
||
1045 | 337 |
#cropLeft |
986 | 338 |
'Find and remove left border.' |
339 |
||
1045 | 340 |
#cropManual |
986 | 341 |
'Specify border(s) to remove.' |
342 |
||
1045 | 343 |
#cropRight |
986 | 344 |
'Find and remove right border.' |
345 |
||
1045 | 346 |
#cropTop |
986 | 347 |
'Find and remove top border.' |
487 | 348 |
|
460 | 349 |
#drawModeBox |
1637 | 350 |
'Rectangle Drawing Mode.' |
460 | 351 |
|
352 |
#drawModeCopy |
|
1637 | 353 |
'Area Copy Mode.' |
460 | 354 |
|
355 |
#drawModeFill |
|
1637 | 356 |
'Flood Fill Mode.' |
460 | 357 |
|
358 |
#drawModeFilledBox |
|
1637 | 359 |
'Filled Rectangle Drawing Mode.' |
460 | 360 |
|
361 |
#drawModePaste |
|
1637 | 362 |
'Paste Mode.' |
914 | 363 |
|
364 |
#drawModePasteUnder |
|
1637 | 365 |
'Paste-Under Mode.' |
366 |
||
367 |
#drawModePasteWithMask |
|
368 |
'Paste-with-Mask Mode.' |
|
460 | 369 |
|
370 |
#drawModePoint |
|
1637 | 371 |
'Point Drawing Mode.' |
460 | 372 |
|
1639 | 373 |
#drawModeSpecial |
374 |
'Special Operations' |
|
375 |
||
460 | 376 |
#editFlipHorizontal |
1637 | 377 |
'Flip the image horizontally.' |
460 | 378 |
|
379 |
#editFlipVertical |
|
1637 | 380 |
'Flip the image vertically.' |
460 | 381 |
|
382 |
#editMagnifyImage |
|
914 | 383 |
'Magnify the image.' |
460 | 384 |
|
385 |
#editNegate |
|
914 | 386 |
'Invert the images colors.' |
460 | 387 |
|
388 |
#editResize |
|
914 | 389 |
'Resize the image (preserving the old image).' |
460 | 390 |
|
391 |
#editRotate |
|
914 | 392 |
'Rotate the image.' |
460 | 393 |
|
929 | 394 |
#fileGrabImage |
395 |
'Pick an image from the screen.' |
|
396 |
||
460 | 397 |
#fileLoadFromClass |
929 | 398 |
'Select and load an image from a resource method.' |
460 | 399 |
|
400 |
#fileLoadFromFile |
|
929 | 401 |
'Select and load an image from a file.' |
460 | 402 |
|
403 |
#fileNewImage |
|
914 | 404 |
'Create a new image' |
460 | 405 |
|
406 |
#filePrint |
|
407 |
'Print the image on a postscript printer.' |
|
408 |
||
409 |
#fileSaveAs |
|
914 | 410 |
'Save the image to a file.' |
460 | 411 |
|
412 |
#fileSaveMaskAs |
|
914 | 413 |
'Save the mask of the image to a file.' |
460 | 414 |
|
1613 | 415 |
#fileSaveButtonImageAs |
416 |
'Save an image of a button with the image to a file (for html use).' |
|
417 |
||
460 | 418 |
#fileSaveMethod |
914 | 419 |
'Save the image as resource method in the current class and selector.' |
460 | 420 |
|
421 |
#fileSaveMethodAs |
|
914 | 422 |
'Save the image as resource method in a class.' |
460 | 423 |
|
487 | 424 |
#magnificationNumber |
914 | 425 |
'Shows the current magnification.' |
487 | 426 |
|
427 |
#magnifyImageDown |
|
914 | 428 |
'Decrease magnification.' |
487 | 429 |
|
430 |
#magnifyImageUp |
|
914 | 431 |
'Increase magnification.' |
487 | 432 |
|
433 |
#mouseKeyColorMode |
|
1637 | 434 |
'Toggle between left and right mouse button color.' |
487 | 435 |
|
436 |
#previewView |
|
914 | 437 |
'Shows a preview of the image.' |
487 | 438 |
|
905 | 439 |
#settingsGridMagnification |
914 | 440 |
'Change the grid magnification of the edit view.' |
905 | 441 |
|
460 | 442 |
) |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
443 |
|
986 | 444 |
"Modified: / 7.9.1998 / 18:20:26 / cg" |
460 | 445 |
! ! |
446 |
||
737 | 447 |
!ImageEditor class methodsFor:'image specs'! |
448 |
||
1637 | 449 |
copyIcon |
450 |
"This resource specification was automatically generated |
|
451 |
by the ImageEditor of ST/X." |
|
452 |
||
453 |
"Do not manually edit this!! If it is corrupted, |
|
454 |
the ImageEditor may not be able to read the specification." |
|
455 |
||
456 |
" |
|
457 |
self copyIcon inspect |
|
458 |
ImageEditor openOnClass:self andSelector:#copyIcon |
|
459 |
Icon flushCachedIcons |
|
460 |
" |
|
461 |
||
462 |
<resource: #image> |
|
463 |
||
464 |
^Icon |
|
465 |
constantNamed:#'ImageEditor class copyIcon' |
|
466 |
ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@** @@J)UUTB*Z*)@*&**PJ)**$B*Z*)@*&**PJ)**$@@Z*)@@F**P@AUUT@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@C? O>@??3??O?<??3??O?<??3??@_<A?0@@@@a') ; yourself); yourself] |
|
467 |
! |
|
468 |
||
469 |
fillIcon |
|
470 |
"This resource specification was automatically generated |
|
471 |
by the ImageEditor of ST/X." |
|
472 |
||
473 |
"Do not manually edit this!! If it is corrupted, |
|
474 |
the ImageEditor may not be able to read the specification." |
|
475 |
||
476 |
" |
|
477 |
self fillIcon inspect |
|
478 |
ImageEditor openOnClass:self andSelector:#fillIcon |
|
479 |
Icon flushCachedIcons |
|
480 |
" |
|
481 |
||
482 |
<resource: #image> |
|
483 |
||
484 |
^Icon |
|
485 |
constantNamed:#'ImageEditor class fillIcon' |
|
486 |
ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@ @@@@*H@@D*(@@DUUP@EAUU@AAEU@@@@U@@DDA@@@@@@@@PP@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C @Q@BN@I<@?8C?0[?!!G<@O P\@@ D@@@@@@@@@a') ; yourself); yourself] |
|
487 |
! |
|
488 |
||
489 |
fillRectIcon |
|
490 |
"This resource specification was automatically generated |
|
491 |
by the ImageEditor of ST/X." |
|
492 |
||
493 |
"Do not manually edit this!! If it is corrupted, |
|
494 |
the ImageEditor may not be able to read the specification." |
|
495 |
||
496 |
" |
|
497 |
self fillRectIcon inspect |
|
498 |
ImageEditor openOnClass:self andSelector:#fillRectIcon |
|
499 |
Icon flushCachedIcons |
|
500 |
" |
|
501 |
||
502 |
<resource: #image> |
|
503 |
||
504 |
^Icon |
|
505 |
constantNamed:#'ImageEditor class fillRectIcon' |
|
506 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a') ; yourself); yourself] |
|
507 |
! |
|
508 |
||
737 | 509 |
leftMouseKeyIcon |
510 |
"This resource specification was automatically generated |
|
511 |
by the ImageEditor of ST/X." |
|
512 |
||
513 |
"Do not manually edit this!! If it is corrupted, |
|
514 |
the ImageEditor may not be able to read the specification." |
|
515 |
||
516 |
" |
|
1405 | 517 |
self leftMouseKeyIcon inspect |
737 | 518 |
ImageEditor openOnClass:self andSelector:#leftMouseKeyIcon |
519 |
" |
|
520 |
||
521 |
<resource: #image> |
|
522 |
||
523 |
^Icon |
|
524 |
constantNamed:#'ImageEditor leftMouseKeyIcon' |
|
1433 | 525 |
ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@EJJ@@AR" @@T((@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself] |
526 |
! |
|
737 | 527 |
|
1637 | 528 |
pasteIcon |
529 |
"This resource specification was automatically generated |
|
530 |
by the ImageEditor of ST/X." |
|
531 |
||
532 |
"Do not manually edit this!! If it is corrupted, |
|
533 |
the ImageEditor may not be able to read the specification." |
|
534 |
||
535 |
" |
|
536 |
self pasteIcon inspect |
|
537 |
ImageEditor openOnClass:self andSelector:#pasteIcon |
|
538 |
Icon flushCachedIcons |
|
539 |
" |
|
540 |
||
541 |
<resource: #image> |
|
542 |
||
543 |
^Icon |
|
544 |
constantNamed:#'ImageEditor class pasteIcon' |
|
545 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L0A&@@D3LC@@A @AL3@3@FX@@QDPY&Y& |
|
546 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself] |
|
547 |
! |
|
548 |
||
549 |
pasteUnderIcon |
|
550 |
"This resource specification was automatically generated |
|
551 |
by the ImageEditor of ST/X." |
|
552 |
||
553 |
"Do not manually edit this!! If it is corrupted, |
|
554 |
the ImageEditor may not be able to read the specification." |
|
555 |
||
556 |
" |
|
557 |
self pasteUnderIcon inspect |
|
558 |
ImageEditor openOnClass:self andSelector:#pasteUnderIcon |
|
559 |
Icon flushCachedIcons |
|
560 |
" |
|
561 |
||
562 |
<resource: #image> |
|
563 |
||
564 |
^Icon |
|
565 |
constantNamed:#'ImageEditor class pasteUnderIcon' |
|
566 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L0A&@@D3LC@@A @AL3@3@FX@@QDPY&Y& |
|
567 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself] |
|
568 |
! |
|
569 |
||
570 |
pasteWithMaskIcon |
|
571 |
"This resource specification was automatically generated |
|
572 |
by the ImageEditor of ST/X." |
|
573 |
||
574 |
"Do not manually edit this!! If it is corrupted, |
|
575 |
the ImageEditor may not be able to read the specification." |
|
576 |
||
577 |
" |
|
578 |
self pasteWithMaskIcon inspect |
|
579 |
ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon |
|
580 |
Icon flushCachedIcons |
|
581 |
" |
|
582 |
||
583 |
<resource: #image> |
|
584 |
||
585 |
^Icon |
|
586 |
constantNamed:#'ImageEditor class pasteWithMaskIcon' |
|
587 |
ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L3A&@@D3LCL0A @AL3@3LFX@@QDPY&Y& |
|
588 |
@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself] |
|
589 |
! |
|
590 |
||
591 |
pointIcon |
|
592 |
"This resource specification was automatically generated |
|
593 |
by the ImageEditor of ST/X." |
|
594 |
||
595 |
"Do not manually edit this!! If it is corrupted, |
|
596 |
the ImageEditor may not be able to read the specification." |
|
597 |
||
598 |
" |
|
599 |
self pointIcon inspect |
|
600 |
ImageEditor openOnClass:self andSelector:#pointIcon |
|
601 |
Icon flushCachedIcons |
|
602 |
" |
|
603 |
||
604 |
<resource: #image> |
|
605 |
||
606 |
^Icon |
|
607 |
constantNamed:#'ImageEditor class pointIcon' |
|
608 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@B@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@0@G@@8@G@@8@G@@8@G@@X@B@@@@@@@@@a') ; yourself); yourself] |
|
609 |
! |
|
610 |
||
611 |
rectIcon |
|
612 |
"This resource specification was automatically generated |
|
613 |
by the ImageEditor of ST/X." |
|
614 |
||
615 |
"Do not manually edit this!! If it is corrupted, |
|
616 |
the ImageEditor may not be able to read the specification." |
|
617 |
||
618 |
" |
|
619 |
self rectIcon inspect |
|
620 |
ImageEditor openOnClass:self andSelector:#rectIcon |
|
621 |
Icon flushCachedIcons |
|
622 |
" |
|
623 |
||
624 |
<resource: #image> |
|
625 |
||
626 |
^Icon |
|
627 |
constantNamed:#'ImageEditor class rectIcon' |
|
628 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0HA@ DB@PHA@ DB@PHA@ DC?0@@@@@@@a') ; yourself); yourself] |
|
629 |
! |
|
630 |
||
737 | 631 |
rightMouseKeyIcon |
632 |
"This resource specification was automatically generated |
|
633 |
by the ImageEditor of ST/X." |
|
634 |
||
635 |
"Do not manually edit this!! If it is corrupted, |
|
636 |
the ImageEditor may not be able to read the specification." |
|
637 |
||
638 |
" |
|
1405 | 639 |
self rightMouseKeyIcon inspect |
737 | 640 |
ImageEditor openOnClass:self andSelector:#rightMouseKeyIcon |
641 |
" |
|
642 |
||
643 |
<resource: #image> |
|
644 |
||
645 |
^Icon |
|
646 |
constantNamed:#'ImageEditor rightMouseKeyIcon' |
|
1433 | 647 |
ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@JJE@@B"!!P@@((T@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself] |
1637 | 648 |
! |
649 |
||
650 |
specialIcon |
|
651 |
"This resource specification was automatically generated |
|
652 |
by the ImageEditor of ST/X." |
|
653 |
||
654 |
"Do not manually edit this!! If it is corrupted, |
|
655 |
the ImageEditor may not be able to read the specification." |
|
656 |
||
657 |
" |
|
658 |
self specialIcon inspect |
|
659 |
ImageEditor openOnClass:self andSelector:#specialIcon |
|
660 |
Icon flushCachedIcons |
|
661 |
" |
|
662 |
||
663 |
<resource: #image> |
|
664 |
||
665 |
^Icon |
|
666 |
constantNamed:#'ImageEditor class specialIcon' |
|
667 |
ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@@@B@@@@@0@@@@@@@@@@@@@@@P@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@L@@0@G @^@A8@G @L@@0@@@@L@@0@@@@@a') ; yourself); yourself] |
|
1433 | 668 |
! ! |
737 | 669 |
|
400 | 670 |
!ImageEditor class methodsFor:'interface specs'! |
671 |
||
1650 | 672 |
changeHLSDialogSpec |
673 |
"This resource specification was automatically generated |
|
674 |
by the UIPainter of ST/X." |
|
675 |
||
676 |
"Do not manually edit this!! If it is corrupted, |
|
677 |
the UIPainter may not be able to read the specification." |
|
678 |
||
679 |
" |
|
680 |
UIPainter new openOnClass:ImageEditor andSelector:#changeHLSDialogSpec |
|
681 |
ImageEditor new openInterface:#changeHLSDialogSpec |
|
682 |
" |
|
683 |
||
684 |
<resource: #canvas> |
|
685 |
||
686 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
687 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
688 |
name: changeHLSDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
689 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
690 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
691 |
label: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
692 |
name: 'HLS Edit Dialog' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
693 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
694 |
bounds: (Rectangle 14 46 326 229) |
1650 | 695 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
696 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
697 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
698 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
699 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
700 |
label: 'Hue-Shift:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
701 |
name: 'HueLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
702 |
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
|
703 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
704 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
705 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
706 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
707 |
name: 'HueShiftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
708 |
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
|
709 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
710 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
711 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
712 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
713 |
maxValue: 360 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
714 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
715 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
716 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
717 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
718 |
name: 'HueWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
719 |
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
|
720 |
model: hueShiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
721 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
722 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
723 |
endlessRotation: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
724 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
725 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
726 |
label: 'Light Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
727 |
name: 'LightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
728 |
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
|
729 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
730 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
731 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
732 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
733 |
name: 'LightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
734 |
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
|
735 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
736 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
737 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
738 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
739 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
740 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
741 |
acceptOnPointerLeave: false |
1650 | 742 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
743 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
744 |
name: 'LightWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
745 |
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
|
746 |
model: lightAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
747 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
748 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
749 |
step: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
750 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
751 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
752 |
label: 'Saturation Factor:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
753 |
name: 'SaturationLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
754 |
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
|
755 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
756 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
757 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
758 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
759 |
name: 'SaturationEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
760 |
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
|
761 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
762 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
763 |
type: numberInRange |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
764 |
minValue: 0 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
765 |
maxValue: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
766 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
767 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
768 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
769 |
(ThumbWheelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
770 |
name: 'SaturationWheel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
771 |
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
|
772 |
model: saturationAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
773 |
orientation: horizontal |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
774 |
stop: 1000 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
775 |
step: 1 |
1650 | 776 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
777 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
778 |
name: 'HueColorLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
779 |
layout: (LayoutFrame 10 0.0 109 0 -10 1.0 148 0) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
780 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
781 |
backgroundChannel: hlsColor |
1650 | 782 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
783 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
784 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
785 |
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
|
786 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
787 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
788 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
789 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
790 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
791 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
792 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
793 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
794 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
795 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
796 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
797 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
798 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
799 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
800 |
extent: (Point 151 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
801 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
802 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
803 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
804 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
805 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
806 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
807 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
808 |
extent: (Point 152 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
809 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
810 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
811 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
812 |
) |
1650 | 813 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
814 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
815 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
816 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
817 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
818 |
! |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
819 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
820 |
cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
821 |
"This resource specification was automatically generated |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
822 |
by the UIPainter of ST/X." |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
823 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
824 |
"Do not manually edit this!! If it is corrupted, |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
825 |
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
|
826 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
827 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
828 |
UIPainter new openOnClass:ImageEditor andSelector:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
829 |
ImageEditor new openInterface:#cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
830 |
" |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
831 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
832 |
<resource: #canvas> |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
833 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
834 |
^ |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
835 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
836 |
name: cropDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
837 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
838 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
839 |
label: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
840 |
name: 'Crop Border(s)' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
841 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
842 |
bounds: (Rectangle 14 46 259 229) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
843 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
844 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
845 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
846 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
847 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
848 |
label: 'Left:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
849 |
name: 'GropLeftLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
850 |
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
|
851 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
852 |
adjust: right |
1650 | 853 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
854 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
855 |
name: 'GropLeftEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
856 |
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
|
857 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
858 |
model: left |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
859 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
860 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
861 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
862 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
863 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
864 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
865 |
name: 'GropLeftNowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
866 |
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
|
867 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
868 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
869 |
model: gropLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
870 |
autoRepeat: true |
1650 | 871 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
872 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
873 |
label: 'Right:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
874 |
name: 'GropRightLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
875 |
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
|
876 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
877 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
878 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
879 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
880 |
name: 'GropRightEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
881 |
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
|
882 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
883 |
model: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
884 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
885 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
886 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
887 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
888 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
889 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
890 |
name: 'GropRightButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
891 |
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
|
892 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
893 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
894 |
model: gropRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
895 |
autoRepeat: true |
1650 | 896 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
897 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
898 |
label: 'Top:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
899 |
name: 'GropTopLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
900 |
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
|
901 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
902 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
903 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
904 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
905 |
name: 'GropTopEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
906 |
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
|
907 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
908 |
model: top |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
909 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
910 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
911 |
acceptOnPointerLeave: false |
1650 | 912 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
913 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
914 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
915 |
name: 'GropTopButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
916 |
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
|
917 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
918 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
919 |
model: gropTopNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
920 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
921 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
922 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
923 |
label: 'Bottom:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
924 |
name: 'GropBottomLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
925 |
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
|
926 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
927 |
adjust: right |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
928 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
929 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
930 |
name: 'GropBottomEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
931 |
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
|
932 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
933 |
model: bottom |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
934 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
935 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
936 |
acceptOnPointerLeave: false |
1650 | 937 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
938 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
939 |
label: 'Now' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
940 |
name: 'GropBottomButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
941 |
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
|
942 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
943 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
944 |
model: gropBottomNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
945 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
946 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
947 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
948 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
949 |
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
|
950 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
951 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
952 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
953 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
954 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
955 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
956 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
957 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
958 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
959 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
960 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
961 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
962 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
963 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
964 |
extent: (Point 77 22) |
1650 | 965 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
966 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
967 |
label: 'Apply' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
968 |
name: 'Button3' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
969 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
970 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
971 |
model: applyAction |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
972 |
extent: (Point 78 22) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
973 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
974 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
975 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
976 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
977 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
978 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
979 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
980 |
extent: (Point 78 22) |
1650 | 981 |
) |
982 |
) |
|
983 |
||
984 |
) |
|
985 |
) |
|
986 |
) |
|
987 |
||
988 |
) |
|
989 |
) |
|
990 |
! |
|
991 |
||
767 | 992 |
dialogSpecForNewImage |
737 | 993 |
"This resource specification was automatically generated |
994 |
by the UIPainter of ST/X." |
|
519 | 995 |
|
737 | 996 |
"Do not manually edit this!! If it is corrupted, |
997 |
the UIPainter may not be able to read the specification." |
|
519 | 998 |
|
999 |
" |
|
767 | 1000 |
UIPainter new openOnClass:ImageEditor andSelector:#dialogSpecForNewImage |
1001 |
ImageEditor new openInterface:#dialogSpecForNewImage |
|
519 | 1002 |
" |
1003 |
||
1004 |
<resource: #canvas> |
|
1005 |
||
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1006 |
^ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1007 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1008 |
name: dialogSpecForNewImage |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1009 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1010 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1011 |
label: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1012 |
name: 'New Image' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1013 |
min: (Point 10 10) |
1806 | 1014 |
bounds: (Rectangle 0 0 301 119) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1015 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1016 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1017 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1018 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1019 |
(ViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1020 |
name: 'View' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1021 |
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
|
1022 |
level: 1 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1023 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1024 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1025 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1026 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1027 |
label: 'Size' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1028 |
name: 'framedBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1029 |
layout: (LayoutFrame 1 0.0 7 0.0 0 0.4 76 0) |
1806 | 1030 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1031 |
labelPosition: topLeft |
1806 | 1032 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1033 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1034 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1035 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1036 |
(ComboBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1037 |
name: 'defaultSizesComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1038 |
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
|
1039 |
model: selectionOfSize |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1040 |
type: string |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1041 |
acceptOnPointerLeave: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1042 |
comboList: listOfDefaultSizes |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1043 |
isFilenameBox: false |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1044 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1045 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1046 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1047 |
) |
1490 | 1048 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1049 |
(FramedBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1050 |
label: 'Color Map' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1051 |
name: 'framedBox2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1052 |
layout: (LayoutFrame 0 0.4 7 0.0 -1 1.0 76 0) |
1806 | 1053 |
style: (FontDescription helvetica medium roman 12) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1054 |
labelPosition: topLeft |
1806 | 1055 |
translateLabel: true |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1056 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1057 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1058 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1059 |
(ComboListSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1060 |
name: 'colorMapComboBox' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1061 |
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
|
1062 |
model: selectionOfColorMap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1063 |
comboList: listOfColorMaps |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1064 |
useIndex: false |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1065 |
hidePullDownMenuButton: false |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1066 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1067 |
) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1068 |
|
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1069 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1070 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1071 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1072 |
|
986 | 1073 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1074 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1075 |
(UISubSpecification |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1076 |
name: 'windowSpecForCommitWithoutChannels' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1077 |
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
|
1078 |
minorKey: windowSpecForCommitWithoutChannels |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1079 |
) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1080 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1081 |
|
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1449
diff
changeset
|
1082 |
) |
986 | 1083 |
) |
1084 |
! |
|
1085 |
||
1557 | 1086 |
shiftDialogSpec |
1087 |
"This resource specification was automatically generated |
|
1088 |
by the UIPainter of ST/X." |
|
1089 |
||
1090 |
"Do not manually edit this!! If it is corrupted, |
|
1091 |
the UIPainter may not be able to read the specification." |
|
1092 |
||
1093 |
" |
|
1094 |
UIPainter new openOnClass:ImageEditor andSelector:#shiftDialogSpec |
|
1095 |
ImageEditor new openInterface:#shiftDialogSpec |
|
1096 |
" |
|
1097 |
||
1098 |
<resource: #canvas> |
|
1099 |
||
1100 |
^ |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1101 |
#(FullSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1102 |
name: shiftDialogSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1103 |
window: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1104 |
(WindowSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1105 |
label: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1106 |
name: 'Shift' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1107 |
min: (Point 10 10) |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1108 |
bounds: (Rectangle 14 46 259 229) |
1557 | 1109 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1110 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1111 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1112 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1113 |
(LabelSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1114 |
label: 'Amount:' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1115 |
name: 'AmountLabel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1116 |
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
|
1117 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1118 |
adjust: right |
1557 | 1119 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1120 |
(InputFieldSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1121 |
name: 'AmountEntryField' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1122 |
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
|
1123 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1124 |
model: shiftAmount |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1125 |
type: number |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1126 |
acceptChannel: acceptChannel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1127 |
acceptOnPointerLeave: false |
1557 | 1128 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1129 |
(HorizontalPanelViewSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1130 |
name: 'HorizontalPanel1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1131 |
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
|
1132 |
horizontalLayout: fitSpace |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1133 |
verticalLayout: center |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1134 |
horizontalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1135 |
verticalSpace: 3 |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1136 |
reverseOrderIfOKAtLeft: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1137 |
component: |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1138 |
(SpecCollection |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1139 |
collection: ( |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1140 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1141 |
label: 'Cancel' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1142 |
name: 'Button1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1143 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1144 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1145 |
model: cancel |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1146 |
extent: (Point 118 22) |
1557 | 1147 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1148 |
(ActionButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1149 |
label: 'OK' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1150 |
name: 'Button2' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1151 |
translateLabel: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1152 |
tabable: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1153 |
model: accept |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1154 |
extent: (Point 118 22) |
1557 | 1155 |
) |
1156 |
) |
|
1157 |
||
1158 |
) |
|
1159 |
) |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1160 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1161 |
name: 'upArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1162 |
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
|
1163 |
model: shiftUpNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1164 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1165 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1166 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1167 |
direction: up |
1557 | 1168 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1169 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1170 |
name: 'leftArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1171 |
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
|
1172 |
model: shiftLeftNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1173 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1174 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1175 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1176 |
direction: left |
1557 | 1177 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1178 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1179 |
name: 'rightArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1180 |
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
|
1181 |
model: shiftRightNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1182 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1183 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1184 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1185 |
direction: right |
1557 | 1186 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1187 |
(ArrowButtonSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1188 |
name: 'downArrowButton' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1189 |
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
|
1190 |
model: shiftDownNow |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1191 |
isTriggerOnDown: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1192 |
autoRepeat: true |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1193 |
actionValue: '' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1194 |
direction: down |
1557 | 1195 |
) |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1196 |
(CheckBoxSpec |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1197 |
label: 'Wrap' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1198 |
name: 'CheckBox1' |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1199 |
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
|
1200 |
model: wrap |
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1201 |
translateLabel: true |
1713 | 1202 |
) |
1557 | 1203 |
) |
1204 |
||
1205 |
) |
|
1206 |
) |
|
1207 |
! |
|
1208 |
||
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
1209 |
uncropDialogSpec |
1480 | 1210 |
"This resource specification was automatically generated |
1211 |
by the UIPainter of ST/X." |
|
1796 | 1212 |
|
1480 | 1213 |
"Do not manually edit this!! If it is corrupted, |
1214 |
the UIPainter may not be able to read the specification." |
|
1796 | 1215 |
|
1480 | 1216 |
" |
1796 | 1217 |
UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec |
1218 |
ImageEditor new openInterface:#uncropDialogSpec |
|
1480 | 1219 |
" |
1796 | 1220 |
|
1221 |
<resource: #canvas> |
|
1222 |
||
1223 |
^ |
|
1224 |
#(FullSpec |
|
1225 |
name: uncropDialogSpec |
|
1226 |
window: |
|
1227 |
(WindowSpec |
|
1228 |
label: 'Add Border(s)' |
|
1229 |
name: 'Add Border(s)' |
|
1230 |
min: (Point 10 10) |
|
1231 |
max: (Point 800 478) |
|
1232 |
bounds: (Rectangle 0 0 261 228) |
|
1233 |
) |
|
1234 |
component: |
|
1235 |
(SpecCollection |
|
1236 |
collection: ( |
|
1237 |
(LabelSpec |
|
1238 |
label: 'Left:' |
|
1239 |
name: 'Label1' |
|
1240 |
layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
|
1241 |
translateLabel: true |
|
1242 |
adjust: right |
|
1243 |
) |
|
1244 |
(InputFieldSpec |
|
1245 |
name: 'EntryField1' |
|
1246 |
layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
|
1247 |
model: left |
|
1248 |
type: number |
|
1249 |
acceptOnPointerLeave: false |
|
1250 |
) |
|
1251 |
(LabelSpec |
|
1252 |
label: 'Right:' |
|
1253 |
name: 'Label2' |
|
1254 |
layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
|
1255 |
translateLabel: true |
|
1256 |
adjust: right |
|
1257 |
) |
|
1258 |
(InputFieldSpec |
|
1259 |
name: 'EntryField2' |
|
1260 |
layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
|
1261 |
model: right |
|
1262 |
type: number |
|
1263 |
acceptOnPointerLeave: false |
|
1264 |
) |
|
1265 |
(LabelSpec |
|
1266 |
label: 'Top:' |
|
1267 |
name: 'Label3' |
|
1268 |
layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
|
1269 |
translateLabel: true |
|
1270 |
adjust: right |
|
1271 |
) |
|
1272 |
(InputFieldSpec |
|
1273 |
name: 'EntryField3' |
|
1274 |
layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
|
1275 |
model: top |
|
1276 |
type: number |
|
1277 |
acceptOnPointerLeave: false |
|
1278 |
) |
|
1279 |
(LabelSpec |
|
1280 |
label: 'Bottom:' |
|
1281 |
name: 'Label4' |
|
1282 |
layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
|
1283 |
translateLabel: true |
|
1284 |
adjust: right |
|
1285 |
) |
|
1286 |
(InputFieldSpec |
|
1287 |
name: 'EntryField4' |
|
1288 |
layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
|
1289 |
model: bottom |
|
1290 |
type: number |
|
1291 |
acceptOnPointerLeave: false |
|
1292 |
) |
|
1293 |
(HorizontalPanelViewSpec |
|
1294 |
name: 'HorizontalPanel1' |
|
1295 |
layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
|
1296 |
horizontalLayout: fitSpace |
|
1297 |
verticalLayout: center |
|
1298 |
horizontalSpace: 3 |
|
1299 |
verticalSpace: 3 |
|
1300 |
reverseOrderIfOKAtLeft: true |
|
1301 |
component: |
|
1302 |
(SpecCollection |
|
1303 |
collection: ( |
|
1304 |
(ActionButtonSpec |
|
1305 |
label: 'Cancel' |
|
1306 |
name: 'Button1' |
|
1307 |
translateLabel: true |
|
1308 |
model: cancel |
|
1309 |
extent: (Point 118 22) |
|
1310 |
) |
|
1311 |
(ActionButtonSpec |
|
1312 |
label: 'OK' |
|
1313 |
name: 'Button2' |
|
1314 |
translateLabel: true |
|
1315 |
model: accept |
|
1316 |
extent: (Point 118 22) |
|
1317 |
) |
|
1318 |
) |
|
1319 |
||
1320 |
) |
|
1321 |
) |
|
1322 |
) |
|
1323 |
||
1324 |
) |
|
1325 |
) |
|
1480 | 1326 |
! |
1327 |
||
767 | 1328 |
windowSpec |
1329 |
"This resource specification was automatically generated |
|
1330 |
by the UIPainter of ST/X." |
|
1331 |
||
1332 |
"Do not manually edit this!! If it is corrupted, |
|
1333 |
the UIPainter may not be able to read the specification." |
|
1334 |
||
1335 |
" |
|
1336 |
UIPainter new openOnClass:ImageEditor andSelector:#windowSpec |
|
1337 |
ImageEditor new openInterface:#windowSpec |
|
1338 |
ImageEditor open |
|
1339 |
" |
|
1340 |
||
1341 |
<resource: #canvas> |
|
1342 |
||
1558 | 1343 |
^ |
1820 | 1344 |
#(FullSpec |
1345 |
name: windowSpec |
|
1346 |
window: |
|
1347 |
(WindowSpec |
|
1348 |
label: 'Image Editor' |
|
1349 |
name: 'Image Editor' |
|
1350 |
min: (Point 400 320) |
|
1351 |
bounds: (Rectangle 0 0 450 350) |
|
1352 |
menu: menu |
|
1558 | 1353 |
) |
1820 | 1354 |
component: |
1355 |
(SpecCollection |
|
1356 |
collection: ( |
|
1357 |
(MenuPanelSpec |
|
1358 |
name: 'menuToolbarView' |
|
1359 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1360 |
style: (FontDescription helvetica medium roman 10) |
|
1361 |
menu: menuToolbar |
|
1362 |
showSeparatingLines: true |
|
1558 | 1363 |
) |
1820 | 1364 |
(VariableHorizontalPanelSpec |
1365 |
name: 'horizontalPanel' |
|
1366 |
layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
1367 |
snapMode: both |
|
1843 | 1368 |
barLevel: 0 |
1820 | 1369 |
component: |
1370 |
(SpecCollection |
|
1371 |
collection: ( |
|
1372 |
(ViewSpec |
|
1373 |
name: 'leftView' |
|
1374 |
level: 1 |
|
1375 |
component: |
|
1376 |
(SpecCollection |
|
1377 |
collection: ( |
|
1378 |
(VariableVerticalPanelSpec |
|
1379 |
name: 'verticalPanel' |
|
1380 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1381 |
level: 0 |
|
1382 |
snapMode: both |
|
1383 |
component: |
|
1384 |
(SpecCollection |
|
1385 |
collection: ( |
|
1386 |
(ViewSpec |
|
1387 |
name: 'View1' |
|
1388 |
component: |
|
1389 |
(SpecCollection |
|
1390 |
collection: ( |
|
1391 |
(MenuPanelSpec |
|
1392 |
name: 'MouseButtonColorToolBar' |
|
1393 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
1394 |
level: 0 |
|
1395 |
menu: menuMouseButtonColors |
|
1558 | 1396 |
) |
1820 | 1397 |
(DataSetSpec |
1398 |
name: 'colorDataSetView' |
|
1399 |
layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
1400 |
activeHelpKey: colorMapTable |
|
1401 |
style: (FontDescription helvetica medium roman 10) |
|
1402 |
model: selectionOfColor |
|
1403 |
menu: colorMapMenu |
|
1404 |
hasHorizontalScrollBar: true |
|
1405 |
hasVerticalScrollBar: true |
|
1406 |
miniScrollerHorizontal: true |
|
1407 |
miniScrollerVertical: true |
|
1408 |
dataList: listOfColors |
|
1409 |
has3Dseparators: true |
|
1900 | 1410 |
columnHolder: colorTableColumns |
1820 | 1411 |
verticalSpacing: 1 |
1900 | 1412 |
"/ columns: |
1413 |
"/ (OrderedCollection |
|
1414 |
"/ |
|
1415 |
"/ (DataSetColumnSpec |
|
1416 |
"/ labelButtonType: Button |
|
1417 |
"/ rendererType: rowSelector |
|
1418 |
"/ backgroundSelector: theColorItSelf: |
|
1419 |
"/ ) |
|
1420 |
"/ (DataSetColumnSpec |
|
1421 |
"/ label: 'R' |
|
1422 |
"/ labelAlignment: left |
|
1423 |
"/ labelButtonType: Button |
|
1424 |
"/ columnAlignment: right |
|
1425 |
"/ editorType: InputField |
|
1426 |
"/ type: number |
|
1427 |
"/ model: redFromColor: |
|
1428 |
"/ writeSelector: redAtColor:put: |
|
1429 |
"/ selectSelector: canSelectRedInColor: |
|
1430 |
"/ ) |
|
1431 |
"/ |
|
1432 |
"/ (DataSetColumnSpec |
|
1433 |
"/ label: 'G' |
|
1434 |
"/ labelAlignment: left |
|
1435 |
"/ labelButtonType: Button |
|
1436 |
"/ columnAlignment: right |
|
1437 |
"/ editorType: InputField |
|
1438 |
"/ type: number |
|
1439 |
"/ model: greenFromColor: |
|
1440 |
"/ writeSelector: greenAtColor:put: |
|
1441 |
"/ selectSelector: canSelectGreenInColor: |
|
1442 |
"/ ) |
|
1443 |
"/ (DataSetColumnSpec |
|
1444 |
"/ label: 'B' |
|
1445 |
"/ labelAlignment: left |
|
1446 |
"/ labelButtonType: Button |
|
1447 |
"/ columnAlignment: right |
|
1448 |
"/ editorType: InputField |
|
1449 |
"/ type: number |
|
1450 |
"/ model: blueFromColor: |
|
1451 |
"/ writeSelector: blueAtColor:put: |
|
1452 |
"/ selectSelector: canSelectBlueInColor: |
|
1453 |
"/ ) |
|
1454 |
"/ ) |
|
1820 | 1455 |
columnAdaptor: colorColumnAdaptor |
767 | 1456 |
) |
1558 | 1457 |
) |
1458 |
||
1459 |
) |
|
1460 |
) |
|
1820 | 1461 |
(ArbitraryComponentSpec |
1462 |
name: 'imagePreView' |
|
1463 |
activeHelpKey: previewView |
|
1464 |
menu: previewMenu |
|
1465 |
hasHorizontalScrollBar: true |
|
1466 |
hasVerticalScrollBar: true |
|
1467 |
miniScrollerHorizontal: true |
|
1468 |
miniScrollerVertical: true |
|
1469 |
hasBorder: false |
|
1470 |
component: ImageView |
|
767 | 1471 |
) |
1558 | 1472 |
) |
1473 |
||
767 | 1474 |
) |
1820 | 1475 |
handles: (Any 0.5 1.0) |
767 | 1476 |
) |
1558 | 1477 |
) |
1478 |
||
767 | 1479 |
) |
1558 | 1480 |
) |
1820 | 1481 |
(ViewSpec |
1482 |
name: 'rightView' |
|
1483 |
component: |
|
1484 |
(SpecCollection |
|
1485 |
collection: ( |
|
1486 |
(MenuPanelSpec |
|
1487 |
name: 'ToolBar1' |
|
1488 |
layout: (LayoutFrame 0 0 0 0.0 28 0 0 1.0) |
|
1489 |
level: 1 |
|
1490 |
menu: toolsMenuToolbar |
|
1491 |
verticalLayout: true |
|
1492 |
centerItems: true |
|
1493 |
textDefault: true |
|
1558 | 1494 |
) |
1820 | 1495 |
(ViewSpec |
1496 |
name: 'editingView' |
|
1497 |
layout: (LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0) |
|
1498 |
level: 1 |
|
1499 |
component: |
|
1500 |
(SpecCollection |
|
1501 |
collection: ( |
|
1502 |
(ArbitraryComponentSpec |
|
1503 |
name: 'imageEditView' |
|
1504 |
layout: (LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0) |
|
1505 |
hasHorizontalScrollBar: true |
|
1506 |
hasVerticalScrollBar: true |
|
1507 |
hasBorder: false |
|
1508 |
component: ImageEditView |
|
1637 | 1509 |
) |
1820 | 1510 |
(LabelSpec |
1511 |
name: 'coordLabel' |
|
1512 |
layout: (LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0) |
|
1513 |
level: -1 |
|
1514 |
labelChannel: imageInfoHolder |
|
1515 |
resizeForLabel: false |
|
1516 |
adjust: left |
|
1637 | 1517 |
) |
1820 | 1518 |
(ArrowButtonSpec |
1519 |
name: 'magnifyDownButton' |
|
1520 |
layout: (LayoutFrame -80 1 -22 1 -58 1 0 1) |
|
1521 |
activeHelpKey: magnifyImageDown |
|
1522 |
model: doMagnifyDown |
|
1523 |
enableChannel: imageIsLoaded |
|
1524 |
isTriggerOnDown: true |
|
1525 |
direction: left |
|
1637 | 1526 |
) |
1820 | 1527 |
(ArrowButtonSpec |
1528 |
name: 'magnifyUpButton' |
|
1529 |
layout: (LayoutFrame -24 1 -22 1 -2 1 0 1) |
|
1530 |
activeHelpKey: magnifyImageUp |
|
1531 |
model: doMagnifyUp |
|
1532 |
enableChannel: imageIsLoaded |
|
1533 |
isTriggerOnDown: true |
|
1534 |
direction: right |
|
1637 | 1535 |
) |
1820 | 1536 |
(InputFieldSpec |
1537 |
name: 'magnificationInputField' |
|
1538 |
layout: (LayoutFrame -57 1 -22 1 -26 1 0 1) |
|
1539 |
activeHelpKey: magnificationNumber |
|
1540 |
enableChannel: imageIsLoaded |
|
1541 |
model: valueOfMagnification |
|
1542 |
type: numberInRange |
|
1543 |
acceptOnReturn: false |
|
1544 |
acceptOnTab: false |
|
1545 |
numChars: 2 |
|
1546 |
minValue: 1 |
|
1547 |
maxValue: 99 |
|
1548 |
acceptOnPointerLeave: false |
|
1637 | 1549 |
) |
1550 |
) |
|
1551 |
||
1552 |
) |
|
1558 | 1553 |
) |
1554 |
) |
|
1555 |
||
1556 |
) |
|
1557 |
) |
|
1558 |
) |
|
1559 |
||
767 | 1560 |
) |
1843 | 1561 |
handles: (Any 0.288889 1.0) |
1558 | 1562 |
) |
1820 | 1563 |
(UISubSpecification |
1564 |
name: 'infoBarSubSpec' |
|
1565 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
1566 |
majorKey: ToolApplicationModel |
|
1567 |
minorKey: windowSpecForInfoBar |
|
1558 | 1568 |
) |
1569 |
) |
|
1570 |
||
1571 |
) |
|
767 | 1572 |
) |
519 | 1573 |
! ! |
1574 |
||
1575 |
!ImageEditor class methodsFor:'menu specs'! |
|
1576 |
||
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1577 |
colorMapMenu |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1578 |
"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
|
1579 |
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
|
1580 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1581 |
"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
|
1582 |
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
|
1583 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1584 |
" |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1585 |
MenuEditor new openOnClass:ImageEditor andSelector:#colorMapMenu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1586 |
(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
|
1587 |
" |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1588 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1589 |
<resource: #menu> |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1590 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1591 |
^ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1592 |
#(Menu |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1593 |
( |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1594 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1595 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1596 |
label: 'Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1597 |
itemValue: addColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1598 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1599 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1600 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1601 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1602 |
label: 'Pick and Add Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1603 |
itemValue: pickAndAddColorToColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1604 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1605 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1606 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1607 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1608 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1609 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1610 |
enabled: hasColormap |
1852 | 1611 |
label: 'Cut Color' |
1612 |
itemValue: cutColorFromColormap |
|
1613 |
translateLabel: true |
|
1614 |
isVisible: false |
|
1615 |
) |
|
1616 |
(MenuItem |
|
1617 |
enabled: hasColormap |
|
1618 |
label: 'Copy Color' |
|
1619 |
itemValue: copyColorFromColormap |
|
1620 |
translateLabel: true |
|
1621 |
) |
|
1622 |
(MenuItem |
|
1623 |
enabled: hasColormap |
|
1933 | 1624 |
label: 'Pick and Paste Color' |
1625 |
itemValue: pickAndPasteColor |
|
1852 | 1626 |
translateLabel: true |
1627 |
) |
|
1628 |
(MenuItem |
|
1629 |
enabled: hasColormap |
|
1630 |
label: 'Paste Color' |
|
1631 |
itemValue: pasteColorIntoColormap |
|
1632 |
translateLabel: true |
|
1633 |
) |
|
1634 |
(MenuItem |
|
1635 |
label: '-' |
|
1636 |
) |
|
1637 |
(MenuItem |
|
1638 |
enabled: hasColormap |
|
1931 | 1639 |
label: 'Edit Color' |
1640 |
itemValue: editSelectedColor |
|
1641 |
translateLabel: true |
|
1642 |
) |
|
1643 |
(MenuItem |
|
1644 |
enabled: hasColormap |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1645 |
label: 'Brighter' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1646 |
itemValue: makeSelectedColorBrighter |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1647 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1648 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1649 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1650 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1651 |
label: 'Darker' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1652 |
itemValue: makeSelectedColorDarker |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1653 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1654 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1655 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1656 |
enabled: hasColormap |
1884 | 1657 |
label: 'Make Gray' |
1658 |
itemValue: makeSelectedColorGray |
|
1659 |
translateLabel: true |
|
1660 |
) |
|
1661 |
(MenuItem |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1662 |
label: '-' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1663 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1664 |
(MenuItem |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1665 |
enabled: hasColormap |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1666 |
label: 'Inspect Color' |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1667 |
itemValue: inspectColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1668 |
translateLabel: true |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1669 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1670 |
) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1671 |
nil |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
1672 |
nil |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1673 |
) |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1674 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
1675 |
|
400 | 1676 |
menu |
737 | 1677 |
"This resource specification was automatically generated |
1678 |
by the MenuEditor of ST/X." |
|
400 | 1679 |
|
737 | 1680 |
"Do not manually edit this!! If it is corrupted, |
1681 |
the MenuEditor may not be able to read the specification." |
|
400 | 1682 |
|
1683 |
" |
|
1684 |
MenuEditor new openOnClass:ImageEditor andSelector:#menu |
|
1685 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menu)) startUp |
|
1686 |
" |
|
1687 |
||
1688 |
<resource: #menu> |
|
1689 |
||
1124 | 1690 |
^ |
1882 | 1691 |
#(Menu |
1692 |
( |
|
1693 |
(MenuItem |
|
1694 |
label: '&File' |
|
1695 |
translateLabel: true |
|
1696 |
submenu: |
|
1697 |
(Menu |
|
1698 |
( |
|
1699 |
(MenuItem |
|
1700 |
activeHelpKey: fileNewImage |
|
1701 |
label: 'New...' |
|
1702 |
itemValue: doNewImage |
|
1703 |
translateLabel: true |
|
1124 | 1704 |
) |
1882 | 1705 |
(MenuItem |
1706 |
activeHelpKey: fileNewImage |
|
1707 |
label: 'New from ClipBoard' |
|
1708 |
itemValue: doNewImageFromClipboard |
|
1709 |
translateLabel: true |
|
1682 | 1710 |
) |
1882 | 1711 |
(MenuItem |
1712 |
label: '-' |
|
1124 | 1713 |
) |
1882 | 1714 |
(MenuItem |
1715 |
activeHelpKey: fileLoadFromClass |
|
1716 |
label: 'Load...' |
|
1717 |
itemValue: doLoadFromClass |
|
1718 |
translateLabel: true |
|
1124 | 1719 |
) |
1882 | 1720 |
(MenuItem |
1721 |
activeHelpKey: fileLoadFromFile |
|
1722 |
label: 'Load from File...' |
|
1723 |
itemValue: doLoadFromFile |
|
1724 |
translateLabel: true |
|
1124 | 1725 |
) |
1882 | 1726 |
(MenuItem |
1727 |
activeHelpKey: fileGrabImage |
|
1728 |
label: 'Grab from Screen...' |
|
1729 |
itemValue: grabScreenImage |
|
1730 |
translateLabel: true |
|
1124 | 1731 |
) |
1882 | 1732 |
(MenuItem |
1733 |
enabled: imageHasNextImage |
|
1734 |
label: 'Next in Sequence' |
|
1735 |
itemValue: nextImageInSequence |
|
1736 |
translateLabel: true |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
1737 |
) |
1882 | 1738 |
(MenuItem |
1739 |
label: '-' |
|
1124 | 1740 |
) |
1882 | 1741 |
(MenuItem |
1742 |
activeHelpKey: fileSaveMethod |
|
1743 |
enabled: imageIsLoadedAndClassDefined |
|
1744 |
label: 'Save' |
|
1745 |
itemValue: doSaveMethod |
|
1746 |
translateLabel: true |
|
1124 | 1747 |
) |
1882 | 1748 |
(MenuItem |
1749 |
activeHelpKey: fileSaveMethodAs |
|
1750 |
enabled: imageIsLoaded |
|
1751 |
label: 'Save As...' |
|
1752 |
itemValue: doSaveMethodAs |
|
1753 |
translateLabel: true |
|
1124 | 1754 |
) |
1882 | 1755 |
(MenuItem |
1756 |
activeHelpKey: fileSaveAs |
|
1757 |
enabled: imageIsLoaded |
|
1758 |
label: 'Save to File...' |
|
1759 |
itemValue: doSaveImageFileAs |
|
1760 |
translateLabel: true |
|
1124 | 1761 |
) |
1882 | 1762 |
(MenuItem |
1763 |
activeHelpKey: fileSaveMaskAs |
|
1764 |
enabled: imageIsLoaded |
|
1765 |
label: 'Save Mask to File...' |
|
1766 |
itemValue: doSaveImageMaskFileAs |
|
1767 |
translateLabel: true |
|
1124 | 1768 |
) |
1882 | 1769 |
(MenuItem |
1770 |
activeHelpKey: fileSaveButtonImageAs |
|
1771 |
enabled: imageIsLoaded |
|
1772 |
label: 'Save as Button to File...' |
|
1773 |
itemValue: doSaveButtonImageToFileAs |
|
1774 |
translateLabel: true |
|
1613 | 1775 |
) |
1882 | 1776 |
(MenuItem |
1777 |
enabled: imageIsLoaded |
|
1778 |
label: 'Copy to Clipboard' |
|
1779 |
itemValue: doCopyImageToClipboard |
|
1780 |
translateLabel: true |
|
1703 | 1781 |
) |
1882 | 1782 |
(MenuItem |
1783 |
label: '-' |
|
1124 | 1784 |
) |
1882 | 1785 |
(MenuItem |
1786 |
activeHelpKey: fileShowStoreString |
|
1787 |
enabled: imageIsLoaded |
|
1788 |
label: 'Show storeString' |
|
1789 |
itemValue: doShowStoreString |
|
1790 |
translateLabel: true |
|
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1791 |
) |
1882 | 1792 |
(MenuItem |
1793 |
activeHelpKey: fileEditMask |
|
1794 |
enabled: imageIsLoaded |
|
1795 |
label: 'Edit Mask' |
|
1796 |
itemValue: doEditMask |
|
1797 |
translateLabel: true |
|
1433 | 1798 |
) |
1882 | 1799 |
(MenuItem |
1800 |
label: '-' |
|
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
1801 |
) |
1882 | 1802 |
(MenuItem |
1803 |
activeHelpKey: filePrint |
|
1804 |
enabled: imageIsLoaded |
|
1805 |
label: 'Print' |
|
1806 |
itemValue: doPrint |
|
1807 |
translateLabel: true |
|
1124 | 1808 |
) |
1882 | 1809 |
(MenuItem |
1810 |
label: '-' |
|
1124 | 1811 |
) |
1882 | 1812 |
(MenuItem |
1813 |
activeHelpKey: fileBrowseClass |
|
1814 |
enabled: hasClassDefined |
|
1815 |
label: 'Browse Class' |
|
1816 |
itemValue: doBrowseClass |
|
1817 |
translateLabel: true |
|
1124 | 1818 |
) |
1882 | 1819 |
(MenuItem |
1896 | 1820 |
label: 'Inspect Image' |
1821 |
itemValue: doInspectImage |
|
1822 |
translateLabel: true |
|
1823 |
) |
|
1824 |
(MenuItem |
|
1882 | 1825 |
label: '-' |
1124 | 1826 |
) |
1882 | 1827 |
(MenuItem |
1828 |
activeHelpKey: fileExit |
|
1829 |
label: 'Exit' |
|
1830 |
itemValue: closeRequest |
|
1831 |
translateLabel: true |
|
1124 | 1832 |
) |
1833 |
) |
|
1834 |
nil |
|
1835 |
nil |
|
400 | 1836 |
) |
1124 | 1837 |
) |
1882 | 1838 |
(MenuItem |
1839 |
enabled: imageIsLoaded |
|
1840 |
label: 'Edit' |
|
1841 |
translateLabel: true |
|
1842 |
submenu: |
|
1843 |
(Menu |
|
1844 |
( |
|
1845 |
(MenuItem |
|
1846 |
activeHelpKey: editUndo |
|
1847 |
enabled: valueOfCanUndo |
|
1848 |
label: 'Undo' |
|
1849 |
itemValue: doUndo |
|
1850 |
translateLabel: true |
|
1124 | 1851 |
) |
1882 | 1852 |
(MenuItem |
1853 |
label: '-' |
|
1124 | 1854 |
) |
1882 | 1855 |
(MenuItem |
1856 |
activeHelpKey: editFlipVertical |
|
1857 |
label: 'Flip - Vertical' |
|
1858 |
itemValue: doFlipVertical |
|
1859 |
translateLabel: true |
|
1860 |
) |
|
1861 |
(MenuItem |
|
1862 |
activeHelpKey: editFlipHorizontal |
|
1863 |
label: 'Flip - Horizontal' |
|
1864 |
itemValue: doFlipHorizontal |
|
1865 |
translateLabel: true |
|
1124 | 1866 |
) |
1882 | 1867 |
(MenuItem |
1868 |
label: '-' |
|
1124 | 1869 |
) |
1882 | 1870 |
(MenuItem |
1871 |
activeHelpKey: editResize |
|
1872 |
label: 'Resize...' |
|
1873 |
itemValue: doResizeImage |
|
1874 |
translateLabel: true |
|
1124 | 1875 |
) |
1882 | 1876 |
(MenuItem |
1877 |
activeHelpKey: editMagnifyImage |
|
1878 |
label: 'Magnify...' |
|
1879 |
itemValue: doMagnifyImage |
|
1880 |
translateLabel: true |
|
1124 | 1881 |
) |
1882 | 1882 |
(MenuItem |
1883 |
activeHelpKey: editMagnifyImage |
|
1884 |
label: 'Magnify By...' |
|
1885 |
itemValue: doMagnifyImageBy |
|
1886 |
translateLabel: true |
|
1124 | 1887 |
) |
1882 | 1888 |
(MenuItem |
1889 |
activeHelpKey: editRotate |
|
1890 |
label: 'Rotate...' |
|
1891 |
itemValue: doRotateImage |
|
1892 |
translateLabel: true |
|
1479 | 1893 |
) |
1882 | 1894 |
(MenuItem |
1895 |
label: '-' |
|
1124 | 1896 |
) |
1882 | 1897 |
(MenuItem |
1898 |
label: 'Invert' |
|
1899 |
itemValue: doNegativeImage |
|
1900 |
translateLabel: true |
|
1124 | 1901 |
) |
1882 | 1902 |
(MenuItem |
1903 |
label: 'Brighten' |
|
1904 |
itemValue: doBrightenImage |
|
1905 |
translateLabel: true |
|
1146 | 1906 |
) |
1882 | 1907 |
(MenuItem |
1908 |
label: 'Darken' |
|
1909 |
itemValue: doDarkenImage |
|
1910 |
translateLabel: true |
|
1146 | 1911 |
) |
1882 | 1912 |
(MenuItem |
1913 |
label: '-' |
|
1914 |
) |
|
1915 |
(MenuItem |
|
1916 |
label: 'Crop' |
|
1917 |
translateLabel: true |
|
1918 |
submenu: |
|
1919 |
(Menu |
|
1920 |
( |
|
1921 |
(MenuItem |
|
1888 | 1922 |
activeHelpKey: cropManual |
1923 |
label: 'Manual...' |
|
1924 |
itemValue: doCropManual |
|
1925 |
translateLabel: true |
|
1926 |
) |
|
1927 |
(MenuItem |
|
1928 |
label: '-' |
|
1929 |
) |
|
1930 |
(MenuItem |
|
1882 | 1931 |
activeHelpKey: cropAll |
1932 |
label: 'All' |
|
1933 |
itemValue: doCropAll |
|
1934 |
translateLabel: true |
|
400 | 1935 |
) |
1882 | 1936 |
(MenuItem |
1937 |
label: '-' |
|
986 | 1938 |
) |
1882 | 1939 |
(MenuItem |
1940 |
activeHelpKey: cropLeft |
|
1941 |
label: 'Left' |
|
1942 |
itemValue: doCropLeft |
|
1943 |
translateLabel: true |
|
1124 | 1944 |
) |
1882 | 1945 |
(MenuItem |
1946 |
activeHelpKey: cropRight |
|
1947 |
label: 'Right' |
|
1948 |
itemValue: doCropRight |
|
1949 |
translateLabel: true |
|
986 | 1950 |
) |
1882 | 1951 |
(MenuItem |
1952 |
activeHelpKey: cropTop |
|
1953 |
label: 'Top' |
|
1954 |
itemValue: doCropTop |
|
1955 |
translateLabel: true |
|
672 | 1956 |
) |
1882 | 1957 |
(MenuItem |
1958 |
activeHelpKey: cropBottom |
|
1959 |
label: 'Bottom' |
|
1960 |
itemValue: doCropBottom |
|
1961 |
translateLabel: true |
|
400 | 1962 |
) |
1124 | 1963 |
) |
1964 |
nil |
|
400 | 1965 |
nil |
1124 | 1966 |
) |
400 | 1967 |
) |
1882 | 1968 |
(MenuItem |
1969 |
activeHelpKey: uncropManual |
|
1970 |
label: 'Uncrop (Add Border)...' |
|
1971 |
itemValue: doUnCropManual |
|
1972 |
translateLabel: true |
|
1713 | 1973 |
) |
1882 | 1974 |
(MenuItem |
1975 |
activeHelpKey: shiftManual |
|
1976 |
label: 'Shift...' |
|
1977 |
itemValue: doShiftManual |
|
1978 |
translateLabel: true |
|
1557 | 1979 |
) |
1124 | 1980 |
) |
1981 |
nil |
|
1982 |
nil |
|
400 | 1983 |
) |
1124 | 1984 |
) |
1882 | 1985 |
(MenuItem |
1986 |
enabled: imageIsLoaded |
|
1987 |
label: 'Mode' |
|
1988 |
translateLabel: true |
|
1989 |
submenuChannel: modeMenu |
|
1637 | 1990 |
) |
1882 | 1991 |
(MenuItem |
1992 |
enabled: imageIsLoaded |
|
1924 | 1993 |
label: 'Colors' |
1882 | 1994 |
translateLabel: true |
1995 |
submenu: |
|
1996 |
(Menu |
|
1997 |
( |
|
1998 |
(MenuItem |
|
1999 |
label: 'Depth' |
|
2000 |
translateLabel: true |
|
2001 |
submenu: |
|
2002 |
(Menu |
|
2003 |
( |
|
2004 |
(MenuItem |
|
1936 | 2005 |
activeHelpKey: colorMap1 |
2006 |
label: '1-Plane' |
|
1934 | 2007 |
itemValue: colorMapMode: |
2008 |
translateLabel: true |
|
1936 | 2009 |
argument: depth1 |
1934 | 2010 |
choice: colorMapMode |
1936 | 2011 |
choiceValue: depth1 |
1934 | 2012 |
) |
2013 |
(MenuItem |
|
1936 | 2014 |
activeHelpKey: colorMap1M |
2015 |
label: '1-Plane + Mask' |
|
1882 | 2016 |
itemValue: colorMapMode: |
2017 |
translateLabel: true |
|
1936 | 2018 |
argument: masked1 |
1882 | 2019 |
choice: colorMapMode |
1936 | 2020 |
choiceValue: masked1 |
1649 | 2021 |
) |
1882 | 2022 |
(MenuItem |
1936 | 2023 |
label: '-' |
1649 | 2024 |
) |
1882 | 2025 |
(MenuItem |
2026 |
activeHelpKey: colorMap2 |
|
2027 |
label: '2-Plane' |
|
2028 |
itemValue: colorMapMode: |
|
2029 |
translateLabel: true |
|
2030 |
argument: depth2 |
|
2031 |
choice: colorMapMode |
|
2032 |
choiceValue: depth2 |
|
1649 | 2033 |
) |
1882 | 2034 |
(MenuItem |
1936 | 2035 |
activeHelpKey: colorMap2M |
2036 |
label: '2-Plane + Mask' |
|
1882 | 2037 |
itemValue: colorMapMode: |
2038 |
translateLabel: true |
|
1936 | 2039 |
argument: masked2 |
1882 | 2040 |
choice: colorMapMode |
1936 | 2041 |
choiceValue: masked2 |
1649 | 2042 |
) |
1882 | 2043 |
(MenuItem |
2044 |
label: '-' |
|
1649 | 2045 |
) |
1882 | 2046 |
(MenuItem |
1936 | 2047 |
activeHelpKey: colorMap4 |
2048 |
label: '4-Plane' |
|
2049 |
itemValue: colorMapMode: |
|
2050 |
translateLabel: true |
|
2051 |
argument: depth4 |
|
2052 |
choice: colorMapMode |
|
2053 |
choiceValue: depth4 |
|
2054 |
) |
|
2055 |
(MenuItem |
|
2056 |
activeHelpKey: colorMap4M |
|
2057 |
label: '4-Plane + Mask' |
|
2058 |
itemValue: colorMapMode: |
|
2059 |
translateLabel: true |
|
2060 |
argument: masked4 |
|
2061 |
choice: colorMapMode |
|
2062 |
choiceValue: masked4 |
|
2063 |
) |
|
2064 |
(MenuItem |
|
2065 |
label: '-' |
|
2066 |
) |
|
2067 |
(MenuItem |
|
2068 |
activeHelpKey: colorMap8 |
|
2069 |
label: '8-Plane' |
|
1934 | 2070 |
itemValue: colorMapMode: |
2071 |
translateLabel: true |
|
1936 | 2072 |
argument: depth8 |
2073 |
choice: colorMapMode |
|
2074 |
choiceValue: depth8 |
|
2075 |
) |
|
2076 |
(MenuItem |
|
2077 |
activeHelpKey: colorMap8M |
|
2078 |
label: '8-Plane + Mask' |
|
2079 |
itemValue: colorMapMode: |
|
2080 |
translateLabel: true |
|
2081 |
argument: masked8 |
|
1934 | 2082 |
choice: colorMapMode |
1936 | 2083 |
choiceValue: masked8 |
2084 |
) |
|
2085 |
(MenuItem |
|
2086 |
label: '-' |
|
2087 |
) |
|
2088 |
(MenuItem |
|
2089 |
activeHelpKey: colorMap16 |
|
2090 |
label: '16-Plane' |
|
2091 |
itemValue: colorMapMode: |
|
2092 |
translateLabel: true |
|
2093 |
argument: depth16 |
|
2094 |
choice: colorMapMode |
|
2095 |
choiceValue: depth16 |
|
1934 | 2096 |
) |
2097 |
(MenuItem |
|
2098 |
activeHelpKey: colorMap16M |
|
2099 |
label: '16-Plane + Mask' |
|
2100 |
itemValue: colorMapMode: |
|
2101 |
translateLabel: true |
|
2102 |
argument: masked16 |
|
2103 |
choice: colorMapMode |
|
2104 |
choiceValue: masked16 |
|
2105 |
) |
|
2106 |
(MenuItem |
|
1936 | 2107 |
label: '-' |
1649 | 2108 |
) |
1882 | 2109 |
(MenuItem |
1936 | 2110 |
activeHelpKey: colorMap24 |
2111 |
label: '24-Plane' |
|
1882 | 2112 |
itemValue: colorMapMode: |
2113 |
translateLabel: true |
|
1936 | 2114 |
argument: depth24 |
1882 | 2115 |
choice: colorMapMode |
1936 | 2116 |
choiceValue: depth24 |
1649 | 2117 |
) |
1882 | 2118 |
(MenuItem |
1936 | 2119 |
activeHelpKey: colorMap24M |
2120 |
label: '24-Plane + Mask' |
|
1882 | 2121 |
itemValue: colorMapMode: |
2122 |
translateLabel: true |
|
1936 | 2123 |
argument: masked24 |
1882 | 2124 |
choice: colorMapMode |
1936 | 2125 |
choiceValue: masked24 |
1649 | 2126 |
) |
2127 |
) |
|
2128 |
nil |
|
2129 |
nil |
|
2130 |
) |
|
1124 | 2131 |
) |
1882 | 2132 |
(MenuItem |
1924 | 2133 |
label: 'ColorMap' |
1882 | 2134 |
translateLabel: true |
2135 |
submenu: |
|
2136 |
(Menu |
|
2137 |
( |
|
2138 |
(MenuItem |
|
2139 |
activeHelpKey: compressColormap |
|
2140 |
enabled: hasColormap |
|
2141 |
label: 'Compress Colormap' |
|
2142 |
itemValue: compressColorMap |
|
2143 |
translateLabel: true |
|
1649 | 2144 |
) |
1882 | 2145 |
(MenuItem |
2146 |
enabled: hasColormap |
|
2147 |
label: 'Sort Colormap' |
|
2148 |
itemValue: sortColorMap |
|
2149 |
translateLabel: true |
|
1649 | 2150 |
) |
1882 | 2151 |
(MenuItem |
1934 | 2152 |
label: 'Reduce Number of Colors by Rounding...' |
2153 |
itemValue: reduceNumberOfColors2 |
|
2154 |
translateLabel: true |
|
2155 |
) |
|
2156 |
(MenuItem |
|
2157 |
label: 'Reduce Number of Colors by Masking Bits...' |
|
1882 | 2158 |
itemValue: reduceNumberOfColors |
2159 |
translateLabel: true |
|
1649 | 2160 |
) |
2161 |
) |
|
2162 |
nil |
|
2163 |
nil |
|
2164 |
) |
|
1124 | 2165 |
) |
1882 | 2166 |
(MenuItem |
2167 |
label: 'Process' |
|
2168 |
translateLabel: true |
|
2169 |
submenu: |
|
2170 |
(Menu |
|
2171 |
( |
|
2172 |
(MenuItem |
|
2173 |
label: 'Make GrayScale' |
|
1924 | 2174 |
itemValue: makeGrayScaleImage |
1882 | 2175 |
translateLabel: true |
1649 | 2176 |
) |
1882 | 2177 |
(MenuItem |
1924 | 2178 |
enabled: hasNoColormap |
2179 |
label: 'Make dithered 8Bit Palette' |
|
2180 |
itemValue: makeDitheredPaletteImage |
|
2181 |
translateLabel: true |
|
2182 |
isVisible: false |
|
2183 |
) |
|
2184 |
(MenuItem |
|
1882 | 2185 |
label: 'Make Brighter' |
2186 |
itemValue: makeBrighter |
|
2187 |
translateLabel: true |
|
1649 | 2188 |
) |
1882 | 2189 |
(MenuItem |
2190 |
label: 'Make Darker' |
|
2191 |
itemValue: makeDarker |
|
2192 |
translateLabel: true |
|
1649 | 2193 |
) |
1882 | 2194 |
(MenuItem |
2195 |
label: 'Make Inverse' |
|
2196 |
itemValue: makeInverse |
|
2197 |
translateLabel: true |
|
1649 | 2198 |
) |
1882 | 2199 |
(MenuItem |
2200 |
label: '-' |
|
1649 | 2201 |
) |
1882 | 2202 |
(MenuItem |
2203 |
label: 'Change HLS...' |
|
2204 |
itemValue: changeHLS |
|
2205 |
translateLabel: true |
|
1649 | 2206 |
) |
2207 |
) |
|
2208 |
nil |
|
2209 |
nil |
|
2210 |
) |
|
1436 | 2211 |
) |
1882 | 2212 |
(MenuItem |
2213 |
label: 'Mask' |
|
2214 |
translateLabel: true |
|
2215 |
submenu: |
|
2216 |
(Menu |
|
2217 |
( |
|
2218 |
(MenuItem |
|
2219 |
activeHelpKey: copyMask |
|
2220 |
enabled: hasMask |
|
2221 |
label: 'Copy Mask' |
|
2222 |
itemValue: copyMask |
|
2223 |
translateLabel: true |
|
1649 | 2224 |
) |
1882 | 2225 |
(MenuItem |
2226 |
activeHelpKey: pasteMask |
|
2227 |
enabled: hasMask |
|
2228 |
label: 'Paste Mask' |
|
2229 |
itemValue: pasteMask |
|
2230 |
translateLabel: true |
|
1649 | 2231 |
) |
1882 | 2232 |
(MenuItem |
1924 | 2233 |
enabled: hasMask |
1882 | 2234 |
label: 'Clear Masked Pixels' |
2235 |
itemValue: clearMaskedPixels |
|
2236 |
translateLabel: true |
|
1649 | 2237 |
) |
2238 |
) |
|
2239 |
nil |
|
2240 |
nil |
|
2241 |
) |
|
1598 | 2242 |
) |
1124 | 2243 |
) |
2244 |
nil |
|
2245 |
nil |
|
756 | 2246 |
) |
1124 | 2247 |
) |
1882 | 2248 |
(MenuItem |
2249 |
label: 'Settings' |
|
2250 |
translateLabel: true |
|
2251 |
submenu: |
|
2252 |
(Menu |
|
2253 |
( |
|
2254 |
(MenuItem |
|
2255 |
activeHelpKey: settingsGridMagnification |
|
2256 |
label: 'Grid Magnification Limit...' |
|
2257 |
itemValue: doChangeGridMagnification |
|
2258 |
translateLabel: true |
|
1124 | 2259 |
) |
2260 |
) |
|
2261 |
nil |
|
2262 |
nil |
|
400 | 2263 |
) |
1124 | 2264 |
) |
1882 | 2265 |
(MenuItem |
2266 |
label: 'History' |
|
2267 |
translateLabel: true |
|
2268 |
submenuChannel: menuHistory |
|
1124 | 2269 |
) |
1882 | 2270 |
(MenuItem |
2271 |
label: 'Help' |
|
2272 |
translateLabel: true |
|
2273 |
startGroup: right |
|
2274 |
submenuChannel: menuHelp |
|
1124 | 2275 |
) |
2276 |
) |
|
2277 |
nil |
|
2278 |
nil |
|
400 | 2279 |
) |
2280 |
! |
|
2281 |
||
679 | 2282 |
menuMouseButtonColors |
737 | 2283 |
"This resource specification was automatically generated |
2284 |
by the MenuEditor of ST/X." |
|
679 | 2285 |
|
737 | 2286 |
"Do not manually edit this!! If it is corrupted, |
2287 |
the MenuEditor may not be able to read the specification." |
|
679 | 2288 |
|
2289 |
" |
|
2290 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors |
|
2291 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp |
|
2292 |
" |
|
2293 |
||
2294 |
<resource: #menu> |
|
2295 |
||
2296 |
^ |
|
2297 |
||
2298 |
#(#Menu |
|
2299 |
||
2300 |
#( |
|
2301 |
#(#MenuItem |
|
2302 |
#label: 'Left Mouse Button' |
|
2303 |
#nameKey: #leftMouseKeyButton |
|
2304 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 2305 |
#enabled: #imageIsLoaded |
679 | 2306 |
#labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) |
975 | 2307 |
#choice: #mouseKeyColorMode |
2308 |
#choiceValue: 1 |
|
679 | 2309 |
) |
2310 |
#(#MenuItem |
|
2311 |
#label: 'Right Mouse Button' |
|
2312 |
#nameKey: #rightMouseKeyButton |
|
2313 |
#activeHelpKey: #mouseKeyColorMode |
|
975 | 2314 |
#enabled: #imageIsLoaded |
679 | 2315 |
#labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) |
975 | 2316 |
#choice: #mouseKeyColorMode |
2317 |
#choiceValue: 2 |
|
679 | 2318 |
) |
2319 |
) nil |
|
2320 |
nil |
|
2321 |
) |
|
2322 |
! |
|
2323 |
||
400 | 2324 |
menuToolbar |
737 | 2325 |
"This resource specification was automatically generated |
2326 |
by the MenuEditor of ST/X." |
|
400 | 2327 |
|
737 | 2328 |
"Do not manually edit this!! If it is corrupted, |
2329 |
the MenuEditor may not be able to read the specification." |
|
400 | 2330 |
|
2331 |
" |
|
2332 |
MenuEditor new openOnClass:ImageEditor andSelector:#menuToolbar |
|
2333 |
(Menu new fromLiteralArrayEncoding:(ImageEditor menuToolbar)) startUp |
|
2334 |
" |
|
2335 |
||
2336 |
<resource: #menu> |
|
2337 |
||
1196 | 2338 |
^ |
1820 | 2339 |
#(Menu |
2340 |
( |
|
2341 |
(MenuItem |
|
2342 |
activeHelpKey: fileNewImage |
|
2343 |
label: 'newImage' |
|
2344 |
itemValue: doNewImage |
|
2345 |
translateLabel: true |
|
2346 |
isButton: true |
|
1883 | 2347 |
labelImage: (ResourceRetriever ToolbarIconLibrary newImageIcon) |
1196 | 2348 |
) |
1820 | 2349 |
(MenuItem |
1949 | 2350 |
label: '-' |
2351 |
) |
|
2352 |
(MenuItem |
|
1820 | 2353 |
activeHelpKey: fileLoadFromFile |
2354 |
label: 'loadFromFile' |
|
2355 |
itemValue: doLoadFromFile |
|
2356 |
translateLabel: true |
|
2357 |
isButton: true |
|
1884 | 2358 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromFileIcon) |
1820 | 2359 |
) |
2360 |
(MenuItem |
|
2361 |
activeHelpKey: fileSaveAs |
|
2362 |
enabled: imageIsLoaded |
|
2363 |
label: 'saveAsFile' |
|
2364 |
itemValue: doSaveImageFileAs |
|
2365 |
translateLabel: true |
|
2366 |
isButton: true |
|
1885 | 2367 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageToFileAsIcon) |
1820 | 2368 |
) |
2369 |
(MenuItem |
|
1949 | 2370 |
label: '-' |
1196 | 2371 |
) |
1820 | 2372 |
(MenuItem |
2373 |
activeHelpKey: fileLoadFromClass |
|
2374 |
label: 'loadFromClass' |
|
2375 |
itemValue: doLoadFromClass |
|
2376 |
translateLabel: true |
|
2377 |
isButton: true |
|
1949 | 2378 |
submenuChannel: menuHistory |
1885 | 2379 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadImageFromMethodIcon) |
1820 | 2380 |
keepLinkedMenu: true |
1748
a62052c6ee71
toolBar: icons and added a saveToFile button
Claus Gittinger <cg@exept.de>
parents:
1741
diff
changeset
|
2381 |
) |
1820 | 2382 |
(MenuItem |
2383 |
activeHelpKey: fileSaveMethodAs |
|
2384 |
enabled: imageIsLoaded |
|
2385 |
label: 'saveAsMethod' |
|
2386 |
itemValue: doSaveMethodAs |
|
2387 |
translateLabel: true |
|
2388 |
isButton: true |
|
1889 | 2389 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveImageAsMethodAsIcon) |
1820 | 2390 |
) |
2391 |
(MenuItem |
|
1949 | 2392 |
label: '-' |
1196 | 2393 |
) |
1820 | 2394 |
(MenuItem |
2395 |
activeHelpKey: editUndo |
|
2396 |
enabled: valueOfCanUndo |
|
2397 |
label: 'Undo' |
|
2398 |
itemValue: doUndo |
|
2399 |
translateLabel: true |
|
2400 |
isButton: true |
|
1883 | 2401 |
labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
1196 | 2402 |
) |
1637 | 2403 |
) |
2404 |
nil |
|
2405 |
nil |
|
2406 |
) |
|
2407 |
! |
|
2408 |
||
2409 |
modeMenu |
|
2410 |
"This resource specification was automatically generated |
|
2411 |
by the MenuEditor of ST/X." |
|
2412 |
||
2413 |
"Do not manually edit this!! If it is corrupted, |
|
2414 |
the MenuEditor may not be able to read the specification." |
|
2415 |
||
2416 |
" |
|
2417 |
MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu |
|
2418 |
(Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp |
|
2419 |
" |
|
2420 |
||
2421 |
<resource: #menu> |
|
2422 |
||
2423 |
^ |
|
2424 |
#(#Menu |
|
2425 |
#( |
|
1196 | 2426 |
#(#MenuItem |
2427 |
#activeHelpKey: #drawModePoint |
|
2428 |
#enabled: #imageIsLoaded |
|
1637 | 2429 |
#label: 'Point' |
2430 |
#translateLabel: true |
|
1196 | 2431 |
#choice: #editMode |
2432 |
#choiceValue: #point |
|
2433 |
) |
|
2434 |
#(#MenuItem |
|
2435 |
#activeHelpKey: #drawModeBox |
|
2436 |
#enabled: #imageIsLoaded |
|
1637 | 2437 |
#label: 'Rect' |
2438 |
#translateLabel: true |
|
1196 | 2439 |
#choice: #editMode |
2440 |
#choiceValue: #box |
|
2441 |
) |
|
2442 |
#(#MenuItem |
|
2443 |
#activeHelpKey: #drawModeFilledBox |
|
2444 |
#enabled: #imageIsLoaded |
|
1656 | 2445 |
#label: 'Filled Rectangle' |
1637 | 2446 |
#translateLabel: true |
1196 | 2447 |
#choice: #editMode |
2448 |
#choiceValue: #filledBox |
|
2449 |
) |
|
2450 |
#(#MenuItem |
|
2451 |
#activeHelpKey: #drawModeFill |
|
2452 |
#enabled: #imageIsLoaded |
|
1637 | 2453 |
#label: 'Fill' |
2454 |
#translateLabel: true |
|
1196 | 2455 |
#choice: #editMode |
2456 |
#choiceValue: #fill |
|
2457 |
) |
|
2458 |
#(#MenuItem |
|
2459 |
#activeHelpKey: #drawModeCopy |
|
2460 |
#enabled: #imageIsLoaded |
|
1637 | 2461 |
#label: 'Copy' |
2462 |
#translateLabel: true |
|
1196 | 2463 |
#choice: #editMode |
2464 |
#choiceValue: #copy |
|
2465 |
) |
|
2466 |
#(#MenuItem |
|
2467 |
#activeHelpKey: #drawModePaste |
|
2468 |
#enabled: #imageIsLoaded |
|
1637 | 2469 |
#label: 'Paste' |
2470 |
#translateLabel: true |
|
1196 | 2471 |
#choice: #editMode |
2472 |
#choiceValue: #paste |
|
2473 |
) |
|
2474 |
#(#MenuItem |
|
2475 |
#activeHelpKey: #drawModePasteUnder |
|
2476 |
#enabled: #imageIsLoaded |
|
1637 | 2477 |
#label: 'Paste Under' |
2478 |
#translateLabel: true |
|
1196 | 2479 |
#choice: #editMode |
2480 |
#choiceValue: #pasteUnder |
|
2481 |
) |
|
1411 | 2482 |
#(#MenuItem |
1579 | 2483 |
#activeHelpKey: #drawModePasteWithMask |
2484 |
#enabled: #imageIsLoaded |
|
1656 | 2485 |
#label: 'Paste with Mask' |
1637 | 2486 |
#translateLabel: true |
1579 | 2487 |
#choice: #editMode |
2488 |
#choiceValue: #pasteWithMask |
|
2489 |
) |
|
2490 |
#(#MenuItem |
|
1411 | 2491 |
#activeHelpKey: #drawModeSpecial |
2492 |
#enabled: #imageIsLoaded |
|
1637 | 2493 |
#label: 'Special' |
2494 |
#translateLabel: true |
|
1411 | 2495 |
#choice: #editMode |
2496 |
#choiceValue: #specialOperation |
|
2497 |
) |
|
1196 | 2498 |
) |
2499 |
nil |
|
2500 |
nil |
|
400 | 2501 |
) |
1558 | 2502 |
! |
2503 |
||
2504 |
previewMenu |
|
2505 |
"This resource specification was automatically generated |
|
2506 |
by the MenuEditor of ST/X." |
|
2507 |
||
2508 |
"Do not manually edit this!! If it is corrupted, |
|
2509 |
the MenuEditor may not be able to read the specification." |
|
2510 |
||
2511 |
" |
|
2512 |
MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu |
|
2513 |
(Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp |
|
2514 |
" |
|
2515 |
||
2516 |
<resource: #menu> |
|
2517 |
||
2518 |
^ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2519 |
#(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2520 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2521 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2522 |
label: 'TileMode' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2523 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2524 |
indication: tileModeHolder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2525 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2526 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2527 |
label: '-' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2528 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2529 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2530 |
label: 'Background Color' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2531 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2532 |
submenu: |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2533 |
(Menu |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2534 |
( |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2535 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2536 |
label: 'Gray' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2537 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2538 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2539 |
choiceValue: nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2540 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2541 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2542 |
label: 'Black' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2543 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2544 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2545 |
choiceValue: black |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2546 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2547 |
(MenuItem |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2548 |
label: 'White' |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2549 |
translateLabel: true |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2550 |
choice: previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2551 |
choiceValue: white |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2552 |
) |
1774 | 2553 |
(MenuItem |
2554 |
label: '-' |
|
2555 |
) |
|
2556 |
(MenuItem |
|
2557 |
label: 'Red' |
|
2558 |
translateLabel: true |
|
2559 |
choice: previewBackgroundColor |
|
2560 |
choiceValue: red |
|
2561 |
) |
|
2562 |
(MenuItem |
|
2563 |
label: 'Green' |
|
2564 |
translateLabel: true |
|
2565 |
choice: previewBackgroundColor |
|
2566 |
choiceValue: green |
|
2567 |
) |
|
2568 |
(MenuItem |
|
2569 |
label: 'Blue' |
|
2570 |
translateLabel: true |
|
2571 |
choice: previewBackgroundColor |
|
2572 |
choiceValue: blue |
|
2573 |
) |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2574 |
) |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2575 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2576 |
nil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2577 |
) |
1558 | 2578 |
) |
2579 |
) |
|
2580 |
nil |
|
2581 |
nil |
|
2582 |
) |
|
1637 | 2583 |
! |
2584 |
||
2585 |
toolsMenuToolbar |
|
2586 |
"This resource specification was automatically generated |
|
2587 |
by the MenuEditor of ST/X." |
|
2588 |
||
2589 |
"Do not manually edit this!! If it is corrupted, |
|
2590 |
the MenuEditor may not be able to read the specification." |
|
2591 |
||
2592 |
" |
|
2593 |
MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar |
|
2594 |
(Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp |
|
2595 |
" |
|
2596 |
||
2597 |
<resource: #menu> |
|
2598 |
||
2599 |
^ |
|
2600 |
#(#Menu |
|
2601 |
#( |
|
2602 |
#(#MenuItem |
|
2603 |
#activeHelpKey: #drawModePoint |
|
2604 |
#enabled: #imageIsLoaded |
|
2605 |
#label: 'Point' |
|
2606 |
#translateLabel: true |
|
2607 |
#isButton: true |
|
2608 |
#labelImage: #(#ResourceRetriever #ImageEditor #pointIcon) |
|
2609 |
#choice: #editMode |
|
2610 |
#choiceValue: #point |
|
2611 |
) |
|
2612 |
#(#MenuItem |
|
2613 |
#activeHelpKey: #drawModeBox |
|
2614 |
#enabled: #imageIsLoaded |
|
2615 |
#label: 'Rect' |
|
2616 |
#translateLabel: true |
|
2617 |
#isButton: true |
|
2618 |
#labelImage: #(#ResourceRetriever #ImageEditor #rectIcon) |
|
2619 |
#choice: #editMode |
|
2620 |
#choiceValue: #box |
|
2621 |
) |
|
2622 |
#(#MenuItem |
|
2623 |
#activeHelpKey: #drawModeFilledBox |
|
2624 |
#enabled: #imageIsLoaded |
|
2625 |
#label: 'FillRect' |
|
2626 |
#translateLabel: true |
|
2627 |
#isButton: true |
|
2628 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillRectIcon) |
|
2629 |
#choice: #editMode |
|
2630 |
#choiceValue: #filledBox |
|
2631 |
) |
|
2632 |
#(#MenuItem |
|
2633 |
#activeHelpKey: #drawModeFill |
|
2634 |
#enabled: #imageIsLoaded |
|
2635 |
#label: 'Fill' |
|
2636 |
#translateLabel: true |
|
2637 |
#isButton: true |
|
2638 |
#labelImage: #(#ResourceRetriever #ImageEditor #fillIcon) |
|
2639 |
#choice: #editMode |
|
2640 |
#choiceValue: #fill |
|
2641 |
) |
|
2642 |
#(#MenuItem |
|
2643 |
#activeHelpKey: #drawModeCopy |
|
2644 |
#enabled: #imageIsLoaded |
|
2645 |
#label: 'Copy' |
|
2646 |
#translateLabel: true |
|
2647 |
#isButton: true |
|
2648 |
#labelImage: #(#ResourceRetriever #ImageEditor #copyIcon) |
|
2649 |
#choice: #editMode |
|
2650 |
#choiceValue: #copy |
|
2651 |
) |
|
2652 |
#(#MenuItem |
|
2653 |
#activeHelpKey: #drawModePaste |
|
2654 |
#enabled: #imageIsLoaded |
|
2655 |
#label: 'Paste' |
|
2656 |
#translateLabel: true |
|
2657 |
#isButton: true |
|
2658 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteIcon) |
|
2659 |
#choice: #editMode |
|
2660 |
#choiceValue: #paste |
|
2661 |
) |
|
2662 |
#(#MenuItem |
|
2663 |
#activeHelpKey: #drawModePasteUnder |
|
2664 |
#enabled: #imageIsLoaded |
|
2665 |
#label: 'Paste Under' |
|
2666 |
#translateLabel: true |
|
2667 |
#isButton: true |
|
2668 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteUnderIcon) |
|
2669 |
#choice: #editMode |
|
2670 |
#choiceValue: #pasteUnder |
|
2671 |
) |
|
2672 |
#(#MenuItem |
|
2673 |
#activeHelpKey: #drawModePasteWithMask |
|
2674 |
#enabled: #imageIsLoaded |
|
2675 |
#label: 'Paste With Mask' |
|
2676 |
#translateLabel: true |
|
2677 |
#isButton: true |
|
2678 |
#labelImage: #(#ResourceRetriever #ImageEditor #pasteWithMaskIcon) |
|
2679 |
#choice: #editMode |
|
2680 |
#choiceValue: #pasteWithMask |
|
2681 |
) |
|
2682 |
#(#MenuItem |
|
2683 |
#activeHelpKey: #drawModeSpecial |
|
2684 |
#enabled: #imageIsLoaded |
|
2685 |
#label: 'Special' |
|
2686 |
#translateLabel: true |
|
2687 |
#isButton: true |
|
2688 |
#labelImage: #(#ResourceRetriever #ImageEditor #specialIcon) |
|
2689 |
#choice: #editMode |
|
2690 |
#choiceValue: #specialOperation |
|
2691 |
) |
|
2692 |
) |
|
2693 |
nil |
|
2694 |
nil |
|
2695 |
) |
|
400 | 2696 |
! ! |
2697 |
||
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2698 |
!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
|
2699 |
|
1900 | 2700 |
colorTableColumns |
1842
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2701 |
"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
|
2702 |
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
|
2703 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2704 |
"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
|
2705 |
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
|
2706 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2707 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2708 |
DataSetBuilder new openOnClass:ImageEditor andSelector:#tableColumns |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2709 |
" |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2710 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2711 |
<resource: #tableColumns> |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2712 |
|
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2713 |
^#( |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2714 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2715 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2716 |
rendererType: rowSelector |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2717 |
backgroundSelector: theColorItSelf: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2718 |
selectedBackgroundSelector: theColorItSelf: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2719 |
isResizeable: false |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2720 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2721 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2722 |
label: 'R' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2723 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2724 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2725 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2726 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2727 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2728 |
model: redFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2729 |
writeSelector: redAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2730 |
selectSelector: canSelectRedInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2731 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2732 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2733 |
label: 'G' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2734 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2735 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2736 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2737 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2738 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2739 |
model: greenFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2740 |
writeSelector: greenAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2741 |
selectSelector: canSelectGreenInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2742 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2743 |
(DataSetColumnSpec |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2744 |
label: 'B' |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2745 |
labelAlignment: left |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2746 |
labelButtonType: Button |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2747 |
columnAlignment: right |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2748 |
editorType: InputField |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2749 |
type: number |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2750 |
model: blueFromColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2751 |
writeSelector: blueAtColor:put: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2752 |
selectSelector: canSelectBlueInColor: |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2753 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2754 |
) |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2755 |
! ! |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
2756 |
|
400 | 2757 |
!ImageEditor methodsFor:'accessing'! |
2758 |
||
2759 |
image |
|
767 | 2760 |
"returns the current editing image" |
400 | 2761 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2762 |
^ imageEditView image |
400 | 2763 |
! |
2764 |
||
2765 |
postOpenAction: anAction |
|
767 | 2766 |
"sets an action which is evaluated after opening" |
400 | 2767 |
|
2768 |
postOpenAction := anAction |
|
1381 | 2769 |
! |
2770 |
||
2771 |
resourceClass:aClass |
|
2772 |
imageEditView resourceClass:aClass |
|
400 | 2773 |
! ! |
2774 |
||
1398 | 2775 |
!ImageEditor methodsFor:'accessing-views'! |
400 | 2776 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2777 |
colorDataSetView |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2778 |
"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
|
2779 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2780 |
^(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
|
2781 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2782 |
"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
|
2783 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2784 |
|
487 | 2785 |
coordLabel |
767 | 2786 |
"returns the view the coord label" |
487 | 2787 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2788 |
^self componentAt: #coordLabel |
487 | 2789 |
! |
2790 |
||
400 | 2791 |
imageEditView |
911 | 2792 |
"returns the view of the image" |
400 | 2793 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2794 |
imageEditView isNil ifTrue:[ |
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2795 |
imageEditView := (self componentAt: #imageEditView) scrolledView. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2796 |
imageEditView addDependent:self. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2797 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
2798 |
^ imageEditView |
1345 | 2799 |
|
2800 |
"Modified: / 10.2.2000 / 23:19:20 / cg" |
|
400 | 2801 |
! |
2802 |
||
2803 |
imagePreView |
|
767 | 2804 |
"returns the preview of the image" |
400 | 2805 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
2806 |
^ (self componentAt: #imagePreView) subViews first |
475 | 2807 |
! ! |
2808 |
||
400 | 2809 |
!ImageEditor methodsFor:'aspects'! |
2810 |
||
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2811 |
activityInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2812 |
^ self valueOfInfoLabel |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2813 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2814 |
"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
|
2815 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2816 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2817 |
colorColumnAdaptor |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2818 |
^ self |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2819 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2820 |
"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
|
2821 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
2822 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2823 |
hasClassAndSelectorDefined |
1054 | 2824 |
^ [ |
2825 |
|clsName| |
|
2826 |
||
2827 |
(clsName := imageEditView resourceClass) size > 0 |
|
2828 |
and:[(Smalltalk at:clsName ifAbsent:nil) notNil |
|
2829 |
and:[imageEditView resourceSelector notNil]] |
|
2830 |
] |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2831 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2832 |
"Created: / 31.7.1998 / 02:02:54 / cg" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2833 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2834 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2835 |
hasClassDefined |
1054 | 2836 |
^ [ |
2837 |
|clsName| |
|
2838 |
||
1443 | 2839 |
(clsName := imageEditView resourceClass) size > 0 |
1054 | 2840 |
and:[(Smalltalk at:clsName ifAbsent:nil) notNil] |
2841 |
] |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2842 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2843 |
"Created: / 31.7.1998 / 02:02:22 / cg" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2844 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2845 |
|
1008 | 2846 |
hasColormap |
2847 |
^ [self image notNil and:[self image colorMap notNil]] |
|
2848 |
||
2849 |
"Created: / 30.9.1998 / 23:53:55 / cg" |
|
2850 |
! |
|
2851 |
||
1924 | 2852 |
hasNoColormap |
2853 |
^ [self image notNil and:[self image colorMap isNil]] |
|
2854 |
||
2855 |
"Created: / 30.9.1998 / 23:53:55 / cg" |
|
2856 |
! |
|
2857 |
||
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2858 |
imageHasNextImage |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2859 |
"returns whether an image is loaded as value holder" |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2860 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2861 |
^ [self image notNil |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2862 |
and:[self image imageSequence notNil]] |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2863 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2864 |
"Created: / 31.7.1998 / 02:04:18 / cg" |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2865 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
2866 |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2867 |
imageInfoHolder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2868 |
|holder| |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2869 |
(holder := builder bindingAt:#imageInfoHolder) isNil ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2870 |
builder aspectAt:#imageInfoHolder put:(holder := '' asValue). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2871 |
]. |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2872 |
^ holder |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2873 |
|
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2874 |
"Modified: / 29.7.1998 / 18:32:08 / cg" |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2875 |
! |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
2876 |
|
400 | 2877 |
imageIsLoaded |
767 | 2878 |
"returns whether an image is loaded as value holder" |
400 | 2879 |
|
2880 |
|holder| |
|
2881 |
(holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
2882 |
builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
2883 |
]. |
|
2884 |
^ holder |
|
2885 |
! |
|
2886 |
||
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2887 |
imageIsLoadedAndClassDefined |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2888 |
"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
|
2889 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2890 |
^ [self hasClassAndSelectorDefined value |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2891 |
and:[self imageIsLoaded value]] |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2892 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2893 |
"Created: / 31.7.1998 / 02:04:18 / cg" |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2894 |
! |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2895 |
|
400 | 2896 |
listOfColors |
1896 | 2897 |
"returns the list of colors" |
2898 |
||
2899 |
|list| |
|
2900 |
||
2901 |
(list := builder bindingAt:#listOfColors) isNil ifTrue:[ |
|
2902 |
builder aspectAt:#listOfColors put:(list := List new). |
|
2903 |
list addDependent:self. |
|
400 | 2904 |
]. |
1896 | 2905 |
^ list |
400 | 2906 |
! |
2907 |
||
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2908 |
previewBackgroundColor |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2909 |
|holder| |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2910 |
(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
|
2911 |
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
|
2912 |
holder addDependent:self. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2913 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2914 |
^ holder |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2915 |
! |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
2916 |
|
400 | 2917 |
selectionOfColor |
1682 | 2918 |
"returns a valueHolder for the current selection of the edit color. |
2919 |
Here, an AspectAdaptor which accesses selectedColorIndex is returned." |
|
400 | 2920 |
|
2921 |
|holder| |
|
1682 | 2922 |
|
400 | 2923 |
(holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[ |
2924 |
builder aspectAt:#selectionOfColor put:( |
|
1682 | 2925 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex ). |
400 | 2926 |
]. |
2927 |
^ holder |
|
2928 |
! |
|
2929 |
||
1558 | 2930 |
tileModeHolder |
2931 |
|holder| |
|
2932 |
(holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[ |
|
2933 |
builder aspectAt:#tileModeHolder put:(holder := false asValue). |
|
2934 |
holder addDependent:self. |
|
2935 |
]. |
|
2936 |
^ holder |
|
2937 |
! |
|
2938 |
||
400 | 2939 |
valueOfMagnification |
767 | 2940 |
"returns current magnification of the image as an AspectAdaptor" |
400 | 2941 |
|
2942 |
|holder| |
|
2943 |
(holder := builder bindingAt:#valueOfMagnification) isNil ifTrue:[ |
|
2944 |
builder aspectAt:#valueOfMagnification put:( |
|
2945 |
holder := AspectAdaptor new subject:self; forAspect:#magnification) |
|
2946 |
]. |
|
2947 |
^ holder |
|
2948 |
! ! |
|
2949 |
||
767 | 2950 |
!ImageEditor methodsFor:'change & update'! |
2951 |
||
2952 |
findColorMapMode |
|
899 | 2953 |
"finds the colorMapMode for a new image" |
767 | 2954 |
|
1927 | 2955 |
|image listOfColors colorMapModeKey drawColor1 drawColor2 someOrAllUsedColors| |
1054 | 2956 |
|
2957 |
image := self image. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2958 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2959 |
image mask notNil ifTrue: [ |
1896 | 2960 |
colorMapModeKey := 'masked'. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2961 |
] ifFalse:[ |
1896 | 2962 |
colorMapModeKey := 'depth'. |
1054 | 2963 |
]. |
1896 | 2964 |
colorMapModeKey := colorMapModeKey , image depth printString. |
2965 |
colorMapMode setValue:colorMapModeKey. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2966 |
|
1904 | 2967 |
listOfColors := self listOfColors. |
1928 | 2968 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2969 |
image depth > 12 ifTrue:[ |
1904 | 2970 |
listOfColors removeAll. |
2971 |
image colorMap isEmptyOrNil ifTrue:[ |
|
1927 | 2972 |
someOrAllUsedColors := image usedColorsMax:10000. |
1928 | 2973 |
someOrAllUsedColors := someOrAllUsedColors asArray. |
1939 | 2974 |
someOrAllUsedColors sort:self sortBlockForColors. |
1927 | 2975 |
listOfColors addAll:someOrAllUsedColors. |
2976 |
"/ listOfColors add:Color black; add:Color white. |
|
1904 | 2977 |
] ifFalse:[ |
2978 |
listOfColors addAll:(image colorMap). |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2979 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2980 |
] ifFalse:[ |
1904 | 2981 |
listOfColors isEmpty ifTrue:[ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2982 |
self colorMapMode: colorMapMode value. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2983 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
2984 |
]. |
767 | 2985 |
]. |
1904 | 2986 |
drawColor1 := listOfColors at:1. |
2987 |
drawColor2 := listOfColors at:2 ifAbsent:drawColor1. |
|
1054 | 2988 |
|
1900 | 2989 |
self hasMask ifTrue: [ |
1896 | 2990 |
(listOfColors contains: [:clr| clr = (Color colorId:0)]) |
2991 |
ifFalse:[ |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
2992 |
listOfColors addFirst:(Color colorId:0). |
1904 | 2993 |
drawColor1 := listOfColors at:2. |
2994 |
drawColor2 := listOfColors at:3 ifAbsent:drawColor1. |
|
898 | 2995 |
] |
767 | 2996 |
]. |
1904 | 2997 |
|
2998 |
imageEditView drawingColors:(Array with: drawColor1 with: drawColor2). |
|
2999 |
||
1054 | 3000 |
self selectionOfColor |
1446 | 3001 |
setValue: 0; |
1904 | 3002 |
value: (listOfColors indexOf: imageEditView selectedColor). |
767 | 3003 |
! |
3004 |
||
942 | 3005 |
update:something with:aParameter from:changedObject |
1928 | 3006 |
|clrIndex img clr changedColor| |
1436 | 3007 |
|
3008 |
img := self image. |
|
1558 | 3009 |
|
3010 |
changedObject == self tileModeHolder ifTrue:[ |
|
1764
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3011 |
self imagePreView |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3012 |
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
|
3013 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3014 |
invalidate. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3015 |
^ self |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3016 |
]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3017 |
changedObject == self previewBackgroundColor ifTrue:[ |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3018 |
clr := changedObject value isNil |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3019 |
ifTrue:[imageEditView viewBackground] |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3020 |
ifFalse:[Color perform:changedObject value]. |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3021 |
self imagePreView |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3022 |
viewBackground:clr; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3023 |
clear; |
7e9b804fd2d9
changeable preview background (to see effect of transpaent pixels)
Claus Gittinger <cg@exept.de>
parents:
1762
diff
changeset
|
3024 |
invalidate. |
1558 | 3025 |
^ self |
3026 |
]. |
|
3027 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3028 |
changedObject == self listOfColors ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3029 |
something == #at: ifTrue:[ |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3030 |
"/ colormap entry changed at aParameter |
960 | 3031 |
|
3032 |
clrIndex := aParameter. |
|
3033 |
(self hasMask) ifTrue:[ |
|
3034 |
clrIndex := clrIndex - 1. |
|
3035 |
]. |
|
1928 | 3036 |
changedColor := changedObject at:aParameter. |
3037 |
img colorMap notNil ifTrue:[ |
|
3038 |
img colorMap at:clrIndex put:changedColor. |
|
3039 |
self colorMapChanged. |
|
3040 |
] ifFalse:[ |
|
3041 |
drawingColormap notNil ifTrue:[ |
|
3042 |
drawingColormap at:clrIndex put:changedColor. |
|
3043 |
]. |
|
3044 |
]. |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3045 |
^ self |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3046 |
]. |
1896 | 3047 |
^ self |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3048 |
]. |
1124 | 3049 |
|
3050 |
changedObject == imageEditView undoImages ifTrue:[ |
|
3051 |
self valueOfCanUndo value:(changedObject notEmpty). |
|
3052 |
^ self. |
|
3053 |
]. |
|
3054 |
||
1345 | 3055 |
changedObject == imageEditView ifTrue:[ |
3056 |
something == #imageColors ifTrue:[ |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3057 |
self updateListOfColorsAndColormapMode. |
1345 | 3058 |
^ self. |
3059 |
]. |
|
3060 |
something == #image ifTrue:[ |
|
1436 | 3061 |
self imagePreView image:img. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3062 |
self updateListOfColorsAndColormapMode. |
1558 | 3063 |
self tileModeHolder value ifTrue:[ |
3064 |
self imagePreView tileMode:true tileOffset:(img extent). |
|
3065 |
]. |
|
1345 | 3066 |
^ self. |
3067 |
]. |
|
3068 |
something == #subImageIn ifTrue:[ |
|
1436 | 3069 |
self imagePreView image ~~ img ifTrue:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
3070 |
self error:'internal error' mayProceed:true. |
1406 | 3071 |
]. |
1558 | 3072 |
self tileModeHolder value ifTrue:[ |
3073 |
self imagePreView invalidate. |
|
3074 |
] ifFalse:[ |
|
3075 |
self imagePreView invalidate:aParameter. |
|
3076 |
]. |
|
1345 | 3077 |
^ self. |
3078 |
]. |
|
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3079 |
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
|
3080 |
(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
|
3081 |
"/ no color/mask */ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3082 |
"/ self halt. |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3083 |
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
|
3084 |
] ifFalse:[ |
f04fe34d10ac
do not cover selected color (by arrow-image) in colorMap-DSV
Claus Gittinger <cg@exept.de>
parents:
1820
diff
changeset
|
3085 |
clrIndex := self listOfColors indexOf:aParameter. |
1491
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3086 |
]. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3087 |
self selectionOfColor value:clrIndex. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3088 |
^ self. |
4249a6a1b252
pick with SHIFT-click in the mag-view
Claus Gittinger <cg@exept.de>
parents:
1490
diff
changeset
|
3089 |
]. |
1345 | 3090 |
^ self. |
3091 |
]. |
|
3092 |
||
1880 | 3093 |
changedObject == imageEditView modifiedHolder ifTrue:[ |
3094 |
"/ self halt:'to be implemented'. |
|
3095 |
^ self |
|
3096 |
]. |
|
3097 |
||
1345 | 3098 |
changedObject == imageEditView image ifTrue:[ |
1377 | 3099 |
self halt:'to be implemented'. |
1345 | 3100 |
^ self. |
3101 |
]. |
|
3102 |
||
942 | 3103 |
super update:something with:aParameter from:changedObject |
3104 |
||
1345 | 3105 |
"Modified: / 10.2.2000 / 23:36:49 / cg" |
942 | 3106 |
! |
3107 |
||
1900 | 3108 |
updateColorsFromImage:image |
3109 |
|colors| |
|
3110 |
||
1904 | 3111 |
colors := image colorMap. |
3112 |
colors isNil ifTrue:[ |
|
1906 | 3113 |
Error handle:[:ex | |
3114 |
colors := OrderedCollection new. |
|
3115 |
] do:[ |
|
3116 |
colors := image usedColors asSet. |
|
3117 |
] |
|
1900 | 3118 |
]. |
1904 | 3119 |
self listOfColors contents:(colors asOrderedCollection). |
1900 | 3120 |
! |
3121 |
||
1054 | 3122 |
updateForNoImage |
767 | 3123 |
"updates channels and view, if image is loaded" |
3124 |
||
3125 |
self imageIsLoaded value: false. |
|
3126 |
self listOfColors removeAll. |
|
3127 |
self imagePreView image: nil |
|
3128 |
||
3129 |
||
3130 |
||
3131 |
||
3132 |
! |
|
3133 |
||
3134 |
updateLabelsAndHistory |
|
3135 |
"updates labels and history, if something has changed" |
|
3136 |
||
1910 | 3137 |
|image| |
3138 |
||
3139 |
image := self image. |
|
3140 |
||
3141 |
self imageIsLoaded value: image notNil. |
|
3142 |
image isNil ifTrue: [^nil]. |
|
767 | 3143 |
|
3144 |
self updateInfoLabel. |
|
3145 |
||
911 | 3146 |
imageEditView resourceMessage asCollectionOfWords size = 2 |
3147 |
ifTrue: [self addToHistory: imageEditView resourceMessage -> #loadFromMessage:]. |
|
767 | 3148 |
|
1910 | 3149 |
image fileName notNil |
3150 |
ifTrue: [self addToHistory: image fileName -> #loadFromFile:]. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3151 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3152 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3153 |
updateListOfColorsAndColormapMode |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3154 |
|colorMap image| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3155 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3156 |
image := self image. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3157 |
colorMap := image colorMap. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3158 |
colorMap size <= 4096 ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3159 |
self listOfColors contents:colorMap. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3160 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3161 |
self listOfColors removeAll. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3162 |
colorMap isFixedPalette ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3163 |
image colorMap:nil. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3164 |
image photometric:#rgb. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3165 |
image samplesPerPixel:3. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3166 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3167 |
image bitsPerSample:(Array |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3168 |
with:(colorMap bitsRed) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3169 |
with:(colorMap bitsGreen) |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3170 |
with:(colorMap bitsBlue)). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3171 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3172 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3173 |
self findColorMapMode. |
767 | 3174 |
! ! |
3175 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3176 |
!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
|
3177 |
|
1951 | 3178 |
atColor:anOldColor put:newColor |
1952 | 3179 |
"a color changed to a new color" |
3180 |
||
1930 | 3181 |
|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
|
3182 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3183 |
list := self listOfColors. |
1951 | 3184 |
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
|
3185 |
|
1930 | 3186 |
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
|
3187 |
index ~~ 0 ifTrue:[ |
1928 | 3188 |
oldColor := list at:index. |
3189 |
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
|
3190 |
] ifFalse:[ |
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
3191 |
self error:'internal error' mayProceed:true. |
1928 | 3192 |
list add:newColor |
3193 |
]. |
|
3194 |
||
3195 |
image := self image. |
|
3196 |
(image colorMap isNil |
|
3197 |
and:[drawingColormap isNil]) ifTrue:[ |
|
3198 |
oldColor notNil ifTrue:[ |
|
3199 |
imageEditView makeUndo. |
|
3200 |
newImage := image copy. |
|
3201 |
newImage |
|
3202 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
3203 |
do:[:x :y :clr | |
|
3204 |
|newClr| |
|
3205 |
||
1951 | 3206 |
newClr := (clr = oldColor) ifTrue:[newColor] ifFalse:[clr]. |
1928 | 3207 |
newImage colorAtX:x y:y put:newClr |
3208 |
]. |
|
3209 |
imageEditView image:newImage. |
|
3210 |
imageEditView setModified. |
|
3211 |
self updateImage. |
|
3212 |
self updateImagePreView. |
|
1930 | 3213 |
|
3214 |
self selectionOfColor value:oldSel. |
|
3215 |
imageEditView selectedColorIndex:oldSel. |
|
3216 |
imageEditView selectedColor:(self listOfColors at:oldSel). |
|
1928 | 3217 |
] |
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3218 |
]. |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3219 |
! |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3220 |
|
942 | 3221 |
blueAtColor:aColor put:newBlue |
3222 |
"helper used to return a new row element, when blue is changed" |
|
3223 |
||
3224 |
|byte| |
|
3225 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3226 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3227 |
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
|
3228 |
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
|
3229 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3230 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3231 |
put:(Color redByte:(aColor redByte) greenByte:(aColor greenByte) blueByte:byte). |
942 | 3232 |
! |
3233 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3234 |
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
|
3235 |
"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
|
3236 |
|
930 | 3237 |
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
|
3238 |
^ 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
|
3239 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3240 |
"Created: / 26.7.1998 / 12:30:35 / cg" |
930 | 3241 |
"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
|
3242 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3243 |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3244 |
canSelectBlueInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3245 |
^ aColor blueByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3246 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3247 |
"Created: / 7.8.1998 / 22:50:34 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3248 |
"Modified: / 7.8.1998 / 22:52:57 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3249 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3250 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3251 |
canSelectGreenInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3252 |
^ aColor greenByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3253 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3254 |
"Created: / 7.8.1998 / 22:50:22 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3255 |
"Modified: / 7.8.1998 / 22:52:46 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3256 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3257 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3258 |
canSelectRedInColor:aColor |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3259 |
^ aColor redByte notNil |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3260 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3261 |
"Created: / 7.8.1998 / 22:50:00 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3262 |
"Modified: / 7.8.1998 / 22:51:03 / cg" |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3263 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3264 |
|
942 | 3265 |
greenAtColor:aColor put:newGreen |
3266 |
"helper used to return a new row element, when green is changed" |
|
3267 |
||
3268 |
|byte| |
|
3269 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3270 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3271 |
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
|
3272 |
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
|
3273 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3274 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3275 |
put:(Color redByte:(aColor redByte) greenByte:byte blueByte:(aColor blueByte)). |
942 | 3276 |
! |
3277 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3278 |
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
|
3279 |
"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
|
3280 |
|
930 | 3281 |
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
|
3282 |
^ 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
|
3283 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3284 |
"Created: / 26.7.1998 / 12:30:29 / cg" |
930 | 3285 |
"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
|
3286 |
! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3287 |
|
942 | 3288 |
redAtColor:aColor put:newRed |
3289 |
"helper used to return a new row element, when red is changed" |
|
3290 |
||
3291 |
|byte| |
|
3292 |
||
1611
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3293 |
aColor isNil ifTrue:[^ self]. "/ mask cannot be changed |
942 | 3294 |
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
|
3295 |
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
|
3296 |
|
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3297 |
self atColor:aColor |
2f23751929d6
behavior of dataset changed if a write operation is invoked by a column adaptor
ca
parents:
1603
diff
changeset
|
3298 |
put:(Color redByte:byte greenByte:(aColor greenByte) blueByte:(aColor blueByte)). |
942 | 3299 |
! |
3300 |
||
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3301 |
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
|
3302 |
"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
|
3303 |
|
930 | 3304 |
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
|
3305 |
^ 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
|
3306 |
|
930 | 3307 |
"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
|
3308 |
! |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3309 |
|
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3310 |
theColorItSelf:aColor |
49ad9f552d64
oops - fixed bg-color access in dataset
Claus Gittinger <cg@exept.de>
parents:
1446
diff
changeset
|
3311 |
^ 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
|
3312 |
! ! |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3313 |
|
672 | 3314 |
!ImageEditor methodsFor:'help'! |
3315 |
||
3316 |
defaultInfoLabel |
|
767 | 3317 |
"returns the default info label" |
672 | 3318 |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3319 |
|resourceClass| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3320 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3321 |
resourceClass := imageEditView resourceClass. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3322 |
(resourceClass isSymbol and: [(Smalltalk at:resourceClass) isClass]) |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3323 |
ifTrue:[ |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3324 |
^ resourceClass, ' >> ', imageEditView resourceSelector |
672 | 3325 |
]. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3326 |
^ 'No class and selector defined.' |
674 | 3327 |
! |
3328 |
||
702 | 3329 |
openDocumentation |
767 | 3330 |
"opens the documentation file of the Image Editor" |
674 | 3331 |
|
763 | 3332 |
self openHTMLDocument: 'tools/uipainter/ImageEditor.html' |
3333 |
||
672 | 3334 |
! ! |
3335 |
||
767 | 3336 |
!ImageEditor methodsFor:'loading'! |
3337 |
||
3338 |
loadFromFile: aFileName |
|
3339 |
"loads an image from aFileName and sets up color map list and other info labels" |
|
3340 |
||
960 | 3341 |
|img| |
3342 |
||
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3343 |
self withCursor:Cursor wait do:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3344 |
(imageEditView loadFromFile: aFileName) notNil ifTrue:[ |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3345 |
(img := self image) notNil ifTrue:[ |
1900 | 3346 |
self updateColorsFromImage:img. |
980
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3347 |
self findColorMapMode. |
bd21079f40e1
show waitCursor while loading from file.
Claus Gittinger <cg@exept.de>
parents:
976
diff
changeset
|
3348 |
self updateLabelsAndHistory. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3349 |
img := img onDevice:device. |
1057 | 3350 |
imageEditView image:img. |
960 | 3351 |
] ifFalse:[ |
1054 | 3352 |
self updateForNoImage |
1057 | 3353 |
]. |
767 | 3354 |
] |
3355 |
] |
|
960 | 3356 |
|
1057 | 3357 |
"Modified: / 16.3.1999 / 21:44:26 / cg" |
767 | 3358 |
! |
3359 |
||
960 | 3360 |
loadFromImage:anImage |
767 | 3361 |
"loads an image from anImage and sets up color map list and other info labels" |
3362 |
||
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3363 |
|img| |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3364 |
|
1057 | 3365 |
anImage notNil ifTrue:[ |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3366 |
img := anImage onDevice:device. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3367 |
]. |
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3368 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3369 |
imageEditView image:img. |
1799
e605f0af928a
clear modified flag when an image is loaded
Claus Gittinger <cg@exept.de>
parents:
1796
diff
changeset
|
3370 |
imageEditView clearModified. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3371 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3372 |
img notNil ifTrue:[ |
1900 | 3373 |
self updateColorsFromImage:img. |
767 | 3374 |
self findColorMapMode. |
3375 |
self updateLabelsAndHistory. |
|
960 | 3376 |
] ifFalse:[ |
1054 | 3377 |
self updateForNoImage |
767 | 3378 |
] |
960 | 3379 |
|
1057 | 3380 |
"Modified: / 16.3.1999 / 21:43:56 / cg" |
767 | 3381 |
! |
3382 |
||
3383 |
loadFromMessage: aMessage |
|
3384 |
"loads an image by evaluating aMessage and sets up color map list and other info labels" |
|
3385 |
||
960 | 3386 |
|img| |
3387 |
||
3388 |
(imageEditView loadFromMessage: aMessage) notNil ifTrue:[ |
|
3389 |
(img := self image) notNil ifTrue:[ |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3390 |
img := img onDevice:device. |
1900 | 3391 |
self updateColorsFromImage:img. |
1904 | 3392 |
self findColorMapMode. |
767 | 3393 |
self updateLabelsAndHistory. |
960 | 3394 |
] ifFalse:[ |
1054 | 3395 |
self updateForNoImage |
767 | 3396 |
] |
3397 |
] |
|
960 | 3398 |
|
1057 | 3399 |
"Modified: / 16.3.1999 / 21:44:41 / cg" |
767 | 3400 |
! |
3401 |
||
3402 |
loadFromOrPrepareForMessage: aMessage |
|
3403 |
"loads an image by evaluating aMessage; |
|
3404 |
if no image could extract from aMessage; do set the class and the selector from |
|
3405 |
the aMessage for a saving at the end of editing" |
|
3406 |
||
1900 | 3407 |
(imageEditView loadFromMessage: aMessage) notNil ifTrue: [ |
3408 |
self updateColorsFromImage:self image. |
|
767 | 3409 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3410 |
] ifFalse: [ |
911 | 3411 |
imageEditView resourceMessage: aMessage. |
767 | 3412 |
]. |
3413 |
self updateLabelsAndHistory. |
|
1057 | 3414 |
|
3415 |
"Modified: / 16.3.1999 / 21:45:07 / cg" |
|
767 | 3416 |
! ! |
3417 |
||
400 | 3418 |
!ImageEditor methodsFor:'menu modes'! |
3419 |
||
975 | 3420 |
colorMapMode |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3421 |
"returns the colorMapMode" |
400 | 3422 |
|
975 | 3423 |
colorMapMode isNil ifTrue: [colorMapMode := '' asValue]. |
400 | 3424 |
|
975 | 3425 |
^colorMapMode |
400 | 3426 |
! |
3427 |
||
975 | 3428 |
editMode |
3429 |
"returns editMode" |
|
400 | 3430 |
|
1054 | 3431 |
editMode isNil ifTrue: [ |
975 | 3432 |
editMode := #point asValue. |
1329 | 3433 |
editMode onChangeEvaluate:[imageEditView editMode:(editMode value)] |
975 | 3434 |
]. |
3435 |
||
3436 |
^editMode |
|
400 | 3437 |
! |
3438 |
||
975 | 3439 |
mouseKeyColorMode |
3440 |
"returns mouseKeyColorMode" |
|
400 | 3441 |
|
1345 | 3442 |
mouseKeyColorMode isNil ifTrue:[ |
975 | 3443 |
mouseKeyColorMode := 1 asValue. |
1345 | 3444 |
mouseKeyColorMode onChangeEvaluate: [ |
3445 |
imageEditView mouseKeyColorMode:mouseKeyColorMode value. |
|
3446 |
self selectionOfColor value: (self listOfColors indexOf:imageEditView selectedColor). |
|
3447 |
] |
|
956 | 3448 |
]. |
400 | 3449 |
|
975 | 3450 |
^mouseKeyColorMode |
1345 | 3451 |
|
3452 |
"Modified: / 10.2.2000 / 23:16:42 / cg" |
|
400 | 3453 |
! ! |
3454 |
||
1558 | 3455 |
!ImageEditor methodsFor:'private'! |
3456 |
||
1939 | 3457 |
sortBlockForColors |
3458 |
^ [:a :b | |
|
3459 |
a redByte == b redByte ifTrue:[ |
|
3460 |
a greenByte == b greenByte ifTrue:[ |
|
3461 |
a blueByte < b blueByte |
|
3462 |
] ifFalse:[ |
|
3463 |
a greenByte < b greenByte |
|
3464 |
] |
|
3465 |
] ifFalse:[ |
|
3466 |
a redByte < b redByte |
|
3467 |
] |
|
3468 |
] |
|
3469 |
! |
|
3470 |
||
1598 | 3471 |
updateImage |
3472 |
|img| |
|
3473 |
||
3474 |
img := imageEditView image. |
|
3475 |
imageEditView image:img. |
|
3476 |
self fetchImageData. |
|
3477 |
! |
|
3478 |
||
1558 | 3479 |
updateImagePreView |
3480 |
self tileModeHolder value ifTrue:[ |
|
3481 |
self imagePreView tileMode:true tileOffset:(self image extent). |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3482 |
]. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3483 |
self imagePreView image:self image. |
1558 | 3484 |
! ! |
3485 |
||
535 | 3486 |
!ImageEditor methodsFor:'queries'! |
3487 |
||
960 | 3488 |
hasMask |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3489 |
^ colorMapMode value notNil and:[colorMapMode value startsWith:'mask'] |
960 | 3490 |
|
3491 |
"Created: / 18.8.1998 / 17:17:38 / cg" |
|
3492 |
! |
|
3493 |
||
535 | 3494 |
preferredExtent |
767 | 3495 |
"returns the preferred extent" |
535 | 3496 |
|
3497 |
^super preferredExtent max: (Screen current width//3)@(Screen current height//3.5) |
|
3498 |
||
3499 |
||
3500 |
! ! |
|
3501 |
||
400 | 3502 |
!ImageEditor methodsFor:'selection'! |
3503 |
||
3504 |
magnification |
|
767 | 3505 |
"returns the magnification of the image" |
400 | 3506 |
|
911 | 3507 |
self imageEditView isNil ifTrue: [^1]. |
3508 |
^imageEditView magnification x |
|
400 | 3509 |
! |
3510 |
||
3511 |
magnification: aValue |
|
767 | 3512 |
"sets the magnification of the image" |
400 | 3513 |
|
905 | 3514 |
|magnification| |
3515 |
magnification := (aValue ? 1) asPoint. |
|
911 | 3516 |
(magnification = imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil]. |
3517 |
imageEditView magnification: magnification |
|
400 | 3518 |
! |
3519 |
||
3520 |
selectedColorIndex |
|
767 | 3521 |
"returns the index of the selected color" |
400 | 3522 |
|
3523 |
^selectedColorIndex |
|
3524 |
! |
|
3525 |
||
3526 |
selectedColorIndex: anIndex |
|
767 | 3527 |
"sets the index of the selected color" |
400 | 3528 |
|
1054 | 3529 |
|clr pixel| |
3530 |
||
3531 |
selectedColorIndex := anIndex. |
|
3532 |
clr := self listOfColors at:anIndex ifAbsent:nil. |
|
3533 |
clr isNil ifTrue:[^ self]. |
|
3534 |
||
1075 | 3535 |
pixel := anIndex - 1. |
1054 | 3536 |
(self listOfColors at:1) = Color noColor ifTrue:[ |
3537 |
anIndex == 1 ifTrue:[ |
|
3538 |
pixel := nil. "/ mask |
|
3539 |
] ifFalse:[ |
|
1075 | 3540 |
pixel := pixel - 1 |
1054 | 3541 |
] |
3542 |
]. |
|
3543 |
imageEditView selectedColorIndex:pixel. |
|
3544 |
imageEditView selectedColor:clr. |
|
400 | 3545 |
|
3546 |
! ! |
|
3547 |
||
1716 | 3548 |
!ImageEditor methodsFor:'startup & release'! |
400 | 3549 |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3550 |
closeDownViews |
1644 | 3551 |
builder notNil ifTrue:[ |
3552 |
DefaultRelativeSizes := |
|
3553 |
Array |
|
3554 |
with:(builder componentAt:#horizontalPanel) relativeCorners |
|
3555 |
with:(builder componentAt:#verticalPanel) relativeCorners. |
|
3556 |
]. |
|
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3557 |
super closeDownViews |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3558 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3559 |
|
400 | 3560 |
closeRequest |
767 | 3561 |
"close request" |
400 | 3562 |
|
911 | 3563 |
imageEditView checkModified ifTrue:[super closeRequest] |
400 | 3564 |
|
3565 |
! |
|
3566 |
||
3567 |
open |
|
767 | 3568 |
"after opening, sets the masterApplication of the imageEditView to self" |
400 | 3569 |
|
3570 |
super open. |
|
444 | 3571 |
|
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3572 |
imageEditView := (self componentAt: #imageEditView) subViews first. |
400 | 3573 |
! |
3574 |
||
1640
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3575 |
postBuildWith:aBuilder |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3576 |
super postBuildWith:aBuilder. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3577 |
|
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3578 |
DefaultRelativeSizes notNil ifTrue:[ |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3579 |
(aBuilder componentAt:#horizontalPanel) relativeCorners:DefaultRelativeSizes first. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3580 |
(aBuilder componentAt:#verticalPanel) relativeCorners:DefaultRelativeSizes second. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3581 |
]. |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3582 |
! |
87ce36f48fbc
remember previous relative sizes and
Claus Gittinger <cg@exept.de>
parents:
1639
diff
changeset
|
3583 |
|
400 | 3584 |
postOpenWith:aBuilder |
767 | 3585 |
"after opening, sets the masterApplication of the imageEditView to self; |
3586 |
evaluate the postOpenAction" |
|
400 | 3587 |
|
1124 | 3588 |
imageEditView undoImages addDependent:self. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3589 |
imageEditView imageInfoHolder:(self imageInfoHolder). |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3590 |
imageEditView activityInfoHolder:(self activityInfoHolder). |
1345 | 3591 |
imageEditView clickInfoCallBack:[:button :point | |
3592 |
|mouseButtonColorToolBar| |
|
3593 |
||
1597
b670ad8c30e1
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
1583
diff
changeset
|
3594 |
mouseButtonColorToolBar := self componentAt:#MouseButtonColorToolBar. |
1345 | 3595 |
(mouseButtonColorToolBar itemAt:button) toggleIndication. |
3596 |
mouseButtonColorToolBar do: [:i| i updateIndicators]. |
|
3597 |
]. |
|
3598 |
imageEditView addDependent:self. |
|
1880 | 3599 |
imageEditView modifiedHolder addDependent:self. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3600 |
|
1921 | 3601 |
postOpenAction value. |
400 | 3602 |
|
1250 | 3603 |
super postOpenWith:aBuilder. |
3604 |
||
3605 |
aBuilder keyboardProcessor menuBar:nil. |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
3606 |
|
1345 | 3607 |
"Modified: / 10.2.2000 / 23:17:43 / cg" |
400 | 3608 |
! ! |
3609 |
||
1715 | 3610 |
!ImageEditor methodsFor:'user actions-colormap'! |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3611 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3612 |
addColorToColormap |
1682 | 3613 |
self addColorToColormap:(Color black) |
3614 |
! |
|
3615 |
||
3616 |
addColorToColormap:newColor |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3617 |
|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
|
3618 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3619 |
img := self image. |
1499
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3620 |
img isNil ifTrue:[ |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3621 |
self warn:'No Image.'. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3622 |
^ self |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3623 |
]. |
0c57ab09156b
about menu items moved into the Help-menu
Claus Gittinger <cg@exept.de>
parents:
1496
diff
changeset
|
3624 |
|
1054 | 3625 |
depth := img depth. |
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3626 |
cMap := img colorMap. |
1054 | 3627 |
cMap isNil ifTrue:[ |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3628 |
drawingColormap isNil ifTrue:[ |
1916 | 3629 |
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
|
3630 |
drawingColormap := OrderedCollection new. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3631 |
]. |
1682 | 3632 |
drawingColormap add:newColor. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3633 |
self listOfColors contents:drawingColormap. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3634 |
self selectionOfColor value:(drawingColormap size). |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3635 |
|
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3636 |
"/ self warn:'Image has no colormap.\Change colorMap mode first.' withCRs. |
1054 | 3637 |
^ self |
3638 |
]. |
|
3639 |
||
1583 | 3640 |
("(depth == 1)" false |
1054 | 3641 |
or:[cMap size == (1 bitShift:depth)]) ifTrue:[ |
3642 |
depth >= 8 ifTrue:[ |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3643 |
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
|
3644 |
^ self |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3645 |
]. |
1916 | 3646 |
(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
|
3647 |
ifFalse:[ |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3648 |
^ self |
1057 | 3649 |
]. |
3650 |
||
3651 |
imageEditView makeUndo. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3652 |
img mask notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3653 |
newMode := 'masked' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3654 |
] ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3655 |
newMode := 'depth' , (depth*2) printString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3656 |
]. |
1057 | 3657 |
self colorMapMode:newMode. |
3658 |
] ifFalse:[ |
|
3659 |
imageEditView makeUndo. |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3660 |
]. |
1054 | 3661 |
|
3662 |
cMap := cMap asArray. |
|
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3663 |
listOfColors := self listOfColors. |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3664 |
oldCListSize := listOfColors size. |
1054 | 3665 |
|
1682 | 3666 |
newColorMap := cMap copyWith:newColor. |
1054 | 3667 |
|
3668 |
newImage := img species new |
|
3669 |
width:img width |
|
3670 |
height:img height |
|
3671 |
depth:depth |
|
3672 |
fromArray:img bits. |
|
3673 |
||
3674 |
newImage colorMap:newColorMap. |
|
3675 |
newImage fileName:img fileName. |
|
3676 |
newImage mask:(img mask copy). |
|
3677 |
||
3678 |
(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
|
3679 |
listOfColors contents: newImage colorMap. |
1054 | 3680 |
self findColorMapMode. |
3681 |
"/ 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
|
3682 |
listOfColors size > (oldCListSize + 1) ifTrue:[ |
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3683 |
listOfColors removeLast |
1054 | 3684 |
]. |
1643
91b7ea254a3b
some changes to support drawing into 24-bit images
Claus Gittinger <cg@exept.de>
parents:
1640
diff
changeset
|
3685 |
self selectionOfColor value:(listOfColors size). |
1054 | 3686 |
self updateLabelsAndHistory. |
3687 |
] |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3688 |
|
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3689 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
1057 | 3690 |
"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
|
3691 |
! |
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3692 |
|
1650 | 3693 |
changeHLS |
3694 |
"interactive Hue/Light/Saturation editing" |
|
3695 |
||
3696 |
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3697 |
shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3698 |
originalPixels p| |
1652 | 3699 |
|
1741 | 3700 |
"/ compute the averageColor in the background (while asking user) |
1652 | 3701 |
readySema := Semaphore new. |
3702 |
[ |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3703 |
|image| |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3704 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3705 |
image := imageEditView image. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3706 |
originalColormap := image colorMap copy. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3707 |
avgColor := image averageColor. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3708 |
originalPixels := image bits. |
1652 | 3709 |
readySema signal. |
3710 |
] forkAt:7. |
|
1649 | 3711 |
|
3712 |
acceptChannel := TriggerValue new. |
|
1652 | 3713 |
avgColorHolder := avgColor asValue. |
1649 | 3714 |
|
3715 |
firstChange := true. |
|
3716 |
||
1651 | 3717 |
shiftedColor := [:clr :hShift :lFactor :sFactor | |
3718 |
Color |
|
3719 |
hue:((clr hue) ? 0 + hShift) |
|
1925 | 3720 |
light:((clr light * lFactor / 100) "min:100") |
3721 |
saturation:((clr saturation * sFactor / 100) "min:100")]. |
|
1652 | 3722 |
|
1649 | 3723 |
shiftAction := |
3724 |
[ |
|
1650 | 3725 |
|hShift lFactor sFactor| |
3726 |
||
1649 | 3727 |
acceptChannel value:true. |
3728 |
||
3729 |
firstChange ifTrue:[ |
|
3730 |
imageEditView makeUndo. |
|
3731 |
firstChange := false. |
|
3732 |
]. |
|
1652 | 3733 |
readySema notNil ifTrue:[readySema wait. readySema := nil]. |
1650 | 3734 |
|
3735 |
hShift := hueShift value. |
|
3736 |
lFactor := lightValue value. |
|
3737 |
sFactor := saturationValue value. |
|
3738 |
||
1652 | 3739 |
avgColorHolder value:(shiftedColor value:avgColor value:hShift value:lFactor value:sFactor). |
3740 |
||
3741 |
shiftProcess notNil ifTrue:[ |
|
3742 |
shiftProcess terminate. |
|
3743 |
shiftProcess waitUntilTerminated. |
|
3744 |
shiftProcess := nil. |
|
3745 |
]. |
|
3746 |
shiftProcess := |
|
3747 |
[ |
|
3748 |
[ |
|
1656 | 3749 |
imageEditView image |
3750 |
colorMap:originalColormap copy; |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3751 |
bits:originalPixels copy; |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3752 |
release; |
1656 | 3753 |
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor]. |
1652 | 3754 |
self updateImage. |
3755 |
self updateInfoLabel. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3756 |
self updateImagePreView. |
1652 | 3757 |
] ensure:[ shiftProcess := nil ]. |
3758 |
] forkAt:7. |
|
1649 | 3759 |
]. |
3760 |
||
3761 |
bindings := IdentityDictionary new. |
|
1650 | 3762 |
bindings at:#hueShiftAmount put:(hueShift := 0 asValue). |
1656 | 3763 |
hueShift onChangeEvaluate:shiftAction. |
1650 | 3764 |
|
3765 |
bindings at:#lightAmount put:(lightValue := 100 asValue). |
|
1656 | 3766 |
lightValue onChangeEvaluate:shiftAction. |
1650 | 3767 |
|
3768 |
bindings at:#saturationAmount put:(saturationValue := 100 asValue). |
|
1656 | 3769 |
saturationValue onChangeEvaluate:shiftAction. |
1650 | 3770 |
|
1649 | 3771 |
bindings at:#acceptChannel put:acceptChannel. |
1652 | 3772 |
bindings at:#hlsColor put:avgColorHolder. |
1650 | 3773 |
|
3774 |
(self openDialogInterface:#changeHLSDialogSpec withBindings:bindings) |
|
1649 | 3775 |
ifFalse:[ |
3776 |
firstChange ~~ true ifTrue:[ |
|
3777 |
imageEditView undo |
|
3778 |
] |
|
3779 |
]. |
|
1923
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3780 |
|
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3781 |
(p := shiftProcess) notNil ifTrue:[ |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3782 |
p waitUntilTerminated. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3783 |
]. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3784 |
self updateImage. |
b73340bcc215
changeHLS fixed dfor depth24-images;
Claus Gittinger <cg@exept.de>
parents:
1922
diff
changeset
|
3785 |
self updateImagePreView. |
1649 | 3786 |
! |
3787 |
||
1403 | 3788 |
clearMaskedPixels |
3789 |
"clear all masked pixels (to pixelValue 0)" |
|
3790 |
||
1460 | 3791 |
|newImage oldImage| |
1403 | 3792 |
|
3793 |
oldImage := self image. |
|
3794 |
||
3795 |
imageEditView makeUndo. |
|
3796 |
||
3797 |
self withExecuteCursorDo:[ |
|
3798 |
newImage := oldImage clearMaskedPixels. |
|
1460 | 3799 |
0 to:newImage height - 1 do:[:y | |
3800 |
0 to:newImage width - 1 do:[:x | |
|
3801 |
(newImage maskAtX:x y:y) == 0 ifTrue:[ |
|
3802 |
newImage pixelAtX:x y:y put:0 |
|
3803 |
] |
|
3804 |
] |
|
3805 |
]. |
|
3806 |
||
1403 | 3807 |
(imageEditView image:newImage) notNil ifTrue:[ |
1446 | 3808 |
self fetchImageData. |
1403 | 3809 |
] |
3810 |
] |
|
3811 |
! |
|
3812 |
||
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3813 |
colorMapChanged |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3814 |
|img| |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3815 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3816 |
img := self image. |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3817 |
img release. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3818 |
|
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
3819 |
self imageEditView invalidate. |
960 | 3820 |
self imagePreView invalidate. |
3821 |
||
3822 |
"/ (imageEditView image:img) notNil ifTrue:[ |
|
3823 |
"/ self updateLabelsAndHistory. |
|
3824 |
"/ self imagePreView image:img |
|
3825 |
"/ ] |
|
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3826 |
|
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3827 |
"Created: / 7.8.1998 / 22:26:10 / cg" |
960 | 3828 |
"Modified: / 18.8.1998 / 17:08:55 / cg" |
945
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3829 |
! |
cb689f3971ab
allow editing of color values;
Claus Gittinger <cg@exept.de>
parents:
942
diff
changeset
|
3830 |
|
975 | 3831 |
colorMapMode:aMode |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3832 |
"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
|
3833 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3834 |
|depth numColors newColorMap newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3835 |
oldImage image newColors realColorMap oldFileName |
1008 | 3836 |
usedColors useNearest usageCounts tmpBits tmpMap quest |
3837 |
prevMode maskThreshold maskImage| |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3838 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3839 |
self withExecuteCursorDo:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3840 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3841 |
|
1053
31097504a15a
fixed startup (modal box in calling thread, instead of
Claus Gittinger <cg@exept.de>
parents:
1047
diff
changeset
|
3842 |
prevMode := colorMapMode value. |
1008 | 3843 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3844 |
newColorMap := self class listOfColorMaps at:aMode. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3845 |
depth := (newColorMap size log:2) asInteger. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3846 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3847 |
useNearest := false. |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3848 |
depth == 1 ifTrue:[ |
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3849 |
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
|
3850 |
] ifFalse:[ |
1008 | 3851 |
prevMode isNil ifTrue:[ |
3852 |
quest := 'Compute colormap (or use standard)' |
|
3853 |
] ifFalse:[ |
|
3854 |
quest := 'Keep colormap (or use standard)' |
|
3855 |
] |
|
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3856 |
]. |
1008 | 3857 |
((prevMode = aMode) |
1057 | 3858 |
or:[depth > oldImage depth |
3859 |
or:[self confirm:(resources string:quest)]]) ifTrue:[ |
|
1937 | 3860 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 3861 |
|
3862 |
"/ keep the colormap |
|
3863 |
newColorMap atAllPut:Color black. |
|
3864 |
depth > oldImage depth ifTrue:[ |
|
3865 |
"/ easy - simply copy the part |
|
3866 |
numColors := 1 bitShift:oldImage depth. |
|
3867 |
0 to:numColors-1 do:[:pixel | |
|
3868 |
newColorMap at:(pixel+1) put:(oldImage colorFromValue:pixel) |
|
1008 | 3869 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3870 |
] ifFalse:[ |
1935 | 3871 |
"/ see if all used color fit the new colormap |
3872 |
usedColors := oldImage usedColorsMax:(1 bitShift:depth). |
|
3873 |
(usedColors notNil and:[usedColors size > (1 bitShift:depth)]) ifTrue:[ |
|
3874 |
usedColors := oldImage realUsedColors |
|
3875 |
]. |
|
3876 |
(usedColors notNil and:[usedColors size <= (1 bitShift:depth)]) ifTrue:[ |
|
3877 |
"/ yea - just install them |
|
3878 |
usedColors asArray keysAndValuesDo:[:idx :clr | |
|
3879 |
newColorMap at:idx put:clr |
|
3880 |
]. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3881 |
] ifFalse:[ |
1935 | 3882 |
"/ copy over those that are most often used. |
3883 |
oldImage depth < 8 ifTrue:[ |
|
3884 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
3885 |
oldImage bits |
|
3886 |
expandPixels:(oldImage depth) |
|
3887 |
width:oldImage width |
|
3888 |
height:oldImage height |
|
3889 |
into:tmpBits |
|
3890 |
mapping:nil. |
|
986 | 3891 |
] ifFalse:[ |
1935 | 3892 |
oldImage depth == 8 ifTrue:[ |
3893 |
tmpBits := oldImage bits |
|
3894 |
] ifFalse:[ |
|
3895 |
colorMapMode value:prevMode. |
|
3896 |
self findColorMapMode. |
|
3897 |
self warn:('Too many used colors in image (', oldImage usedColors size printString , ').'). |
|
3898 |
^ self |
|
3899 |
"/ (self confirm:('Too many used colors in image (', oldImage usedColors size printString , ').\\Dither ?' withCRs)) |
|
3900 |
"/ ifFalse:[. |
|
3901 |
"/ ^ self |
|
3902 |
"/ ]. |
|
3903 |
"/ self image: (Image newForDepth:depth) fromImage:oldImage. |
|
3904 |
"/ ^ self. |
|
3905 |
] |
|
3906 |
]. |
|
3907 |
usageCounts := tmpBits usageCounts. |
|
3908 |
tmpMap := Array new:usageCounts size. |
|
3909 |
oldImage colorMap asArray keysAndValuesDo:[:i :clr | |
|
3910 |
tmpMap at:i put:clr |
|
3911 |
]. |
|
3912 |
usageCounts sort:[:a :b | a > b] with:tmpMap. |
|
3913 |
||
3914 |
1 to:(1 bitShift:depth) do:[:idx | |
|
3915 |
newColorMap at:idx put:(tmpMap at:idx) |
|
3916 |
]. |
|
3917 |
||
3918 |
useNearest := Dialog |
|
3919 |
confirmWithCancel:(resources |
|
3920 |
stringWithCRs:'Image requires %1 colors.\ColorMap has only space for %2\\Use nearest (or map to first color) ?' |
|
3921 |
with:usedColors size |
|
3922 |
with:(1 bitShift:depth)) |
|
3923 |
labels:(resources array:#('Cancel' 'First' 'Nearest')). |
|
3924 |
useNearest isNil ifTrue:[ |
|
1124 | 3925 |
colorMapMode value:prevMode. |
1935 | 3926 |
^ self "/ cancel |
3927 |
]. |
|
3928 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3929 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3930 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3931 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3932 |
"/ standard colormap |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3933 |
usedColors := oldImage usedColors. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3934 |
(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
|
3935 |
useNearest := Dialog |
928
89bd2304da33
cleaned up imageEitViews interface to my infoPanel
Claus Gittinger <cg@exept.de>
parents:
927
diff
changeset
|
3936 |
confirmWithCancel:(resources |
1916 | 3937 |
stringWithCRs:'Not all colors are present in the new colormap.\\Map missing ones to nearest (or map to first color) ?' |
3938 |
) |
|
1542 | 3939 |
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
|
3940 |
useNearest isNil ifTrue:[ |
1542 | 3941 |
colorMapMode value:prevMode. |
921
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3942 |
^ self "/ cancel |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3943 |
]. |
a5aca21ea803
also allow nearest-color mode for standard colormap.
Claus Gittinger <cg@exept.de>
parents:
920
diff
changeset
|
3944 |
]. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3945 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3946 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3947 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3948 |
|
1424
d7367ae7f85e
fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
3949 |
newImage := Image newForDepth:depth. |
d7367ae7f85e
fixed conversion of 3-3-2 8-bit truecolor images
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
3950 |
newImage depth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3951 |
oldFileName := oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3952 |
|
1008 | 3953 |
Image imageErrorSignal handle:[:ex| |
3954 |
Color colorErrorSignal handle:[:ex| |
|
1542 | 3955 |
colorMapMode value:prevMode. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3956 |
imageEditView undo. |
1008 | 3957 |
^ self warn:(resources string:'Conversion failed !!') |
3958 |
] do:[ |
|
1393 | 3959 |
newImage := Image newForDepth:depth. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3960 |
newImage width:oldImage width height:oldImage height depth:depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3961 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3962 |
newImage photometric:#palette. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3963 |
newImage bits:(ByteArray new:(newImage bytesPerRow * newImage height)). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3964 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3965 |
oldImage colorsFromX:0 y:0 toX:(oldImage width-1) y:(oldImage height-1) do: |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3966 |
[:x :y :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3967 |
|newColor| |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3968 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3969 |
(newColorMap includes:clr) |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3970 |
ifTrue: [newColor := clr] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3971 |
ifFalse: [ |
1008 | 3972 |
newColor := clr nearestIn:newColorMap. |
3973 |
useNearest ifFalse:[ |
|
3974 |
(newColor deltaFrom:clr) > 0.5 ifTrue:[ |
|
3975 |
newColor := oldImage colorFromValue:0 |
|
3976 |
] |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3977 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3978 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3979 |
newImage colorAtX:x y:y put:newColor. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3980 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3981 |
image := newImage |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3982 |
]. |
1008 | 3983 |
] do:[ |
3984 |
image := newImage fromImage:oldImage |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3985 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
3986 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
3987 |
(aMode asString startsWith:'mask') ifTrue:[ |
1008 | 3988 |
image mask isNil ifTrue:[ |
1949 | 3989 |
false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
1008 | 3990 |
maskThreshold := 0.1. |
3991 |
maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
|
3992 |
] ifFalse:[ |
|
3993 |
maskImage := Depth1Image extent:image extent. |
|
1770 | 3994 |
maskImage bits:(ByteArray |
1008 | 3995 |
new:(maskImage bytesPerRow * maskImage height) |
3996 |
withAll:16rFF). |
|
3997 |
||
3998 |
"/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
|
3999 |
]. |
|
4000 |
image mask:maskImage. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4001 |
]. |
1008 | 4002 |
] ifFalse:[ |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4003 |
image mask: nil. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4004 |
]. |
1935 | 4005 |
|
1937 | 4006 |
(newColorMap isOrderedCollection or:[newColorMap isFixedPalette not]) ifTrue:[ |
1935 | 4007 |
realColorMap := OrderedCollection new. |
4008 |
image realColorMap do:[:clr| |
|
4009 |
(realColorMap includes: clr) ifFalse: [realColorMap add: clr] |
|
4010 |
]. |
|
4011 |
newColors := realColorMap copyFrom: 1 to: (newColorMap size min: realColorMap size). |
|
4012 |
newColorMap do:[:clr| |
|
4013 |
((newColors size < newColorMap size) and: [(newColors includes: clr) not]) |
|
4014 |
ifTrue:[ |
|
4015 |
newColors add: clr |
|
4016 |
] |
|
4017 |
]. |
|
4018 |
image colorMap: newColors. |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4019 |
]. |
1446 | 4020 |
image fileName: oldFileName. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4021 |
|
1054 | 4022 |
(imageEditView image: image) notNil ifTrue:[ |
1446 | 4023 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4024 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4025 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4026 |
|
1057 | 4027 |
"Modified: / 16.3.1999 / 21:55:39 / cg" |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4028 |
! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4029 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4030 |
compressColorMap |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4031 |
"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
|
4032 |
|
927 | 4033 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4034 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4035 |
oldImage := self image. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4036 |
depth := oldImage depth. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4037 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4038 |
oldImage photometric ~~ #palette ifTrue:[ |
930 | 4039 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4040 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4041 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4042 |
|
1403 | 4043 |
usedColors := oldImage realUsedColors. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4044 |
usedColors size == (1 bitShift:depth) ifTrue:[ |
930 | 4045 |
self information:'Compress colorMap: All colors are used - no compression.'. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4046 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4047 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4048 |
usedColors size == oldImage colorMap size ifTrue:[ |
930 | 4049 |
self information:'Compress colorMap: Colormap already compressed - no compression.'. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4050 |
^ self |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4051 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4052 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4053 |
imageEditView makeUndo. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4054 |
|
1949 | 4055 |
"/ self information:('Compress colorMap: %1 colors used.' bindWith:usedColors size). |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4056 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4057 |
self withExecuteCursorDo:[ |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
4058 |
"/ newColorMap := Array new:usedColors size. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4059 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4060 |
"/ translation table |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4061 |
oldToNew := ByteArray new:(1 bitShift:depth). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4062 |
newColorMap := usedColors asArray. |
1939 | 4063 |
newColorMap sort:self sortBlockForColors. |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
4064 |
|
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4065 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4066 |
|newPixel| |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4067 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4068 |
(usedColors includes:clr) ifTrue:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4069 |
newPixel := newColorMap indexOf:clr. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4070 |
oldToNew at:oldIdx put:newPixel-1. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4071 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4072 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4073 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4074 |
oldBits := oldImage bits. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4075 |
newBits := ByteArray new:(oldBits size). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4076 |
depth ~~ 8 ifTrue:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4077 |
"/ expand/compress can only handle 8bits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4078 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4079 |
oldBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4080 |
expandPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4081 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4082 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4083 |
into:tmpBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4084 |
mapping:oldToNew. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4085 |
tmpBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4086 |
compressPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4087 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4088 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4089 |
into:newBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4090 |
mapping:nil |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4091 |
] ifFalse:[ |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4092 |
oldBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4093 |
expandPixels:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4094 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4095 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4096 |
into:newBits |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4097 |
mapping:oldToNew. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4098 |
]. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4099 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4100 |
newImage := oldImage species new |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4101 |
width:oldImage width |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4102 |
height:oldImage height |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4103 |
depth:depth |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4104 |
fromArray:newBits. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4105 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4106 |
newImage colorMap:newColorMap. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4107 |
newImage fileName:oldImage fileName. |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4108 |
newImage mask:(oldImage mask copy). |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4109 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4110 |
(imageEditView image:newImage) notNil ifTrue: |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4111 |
[ |
1446 | 4112 |
self fetchImageData. |
919
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4113 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4114 |
] |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4115 |
|
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4116 |
"Created: / 28.7.1998 / 20:03:11 / cg" |
996
9423ae277168
sort colors when compressing the colorMap
Claus Gittinger <cg@exept.de>
parents:
990
diff
changeset
|
4117 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
1008 | 4118 |
! |
4119 |
||
1852 | 4120 |
copyColorFromColormap |
1871 | 4121 |
imageEditView setClipboardObject:(self selectedColorOrNil) |
1852 | 4122 |
! |
4123 |
||
1480 | 4124 |
copyMask |
4125 |
|mask| |
|
4126 |
||
4127 |
mask := self image mask. |
|
4128 |
MaskClipboard := mask subImageIn: (0@0 extent:mask extent). |
|
4129 |
! |
|
4130 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4131 |
editSelectedColor |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4132 |
self processSelectedColorWith:[:clr | |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4133 |
|editor| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4134 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4135 |
editor := ColorEditDialog new. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4136 |
editor color:clr. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4137 |
editor open. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4138 |
editor accepted ifFalse:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4139 |
AbortOperationRequest raise. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4140 |
]. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4141 |
editor color |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4142 |
] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4143 |
! |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4144 |
|
1446 | 4145 |
fetchImageData |
1460 | 4146 |
|image| |
4147 |
||
4148 |
(image := imageEditView image) notNil ifTrue:[ |
|
4149 |
self findColorMapMode. |
|
4150 |
self updateLabelsAndHistory. |
|
4151 |
] |
|
1446 | 4152 |
! |
4153 |
||
1544 | 4154 |
inspectColor |
1682 | 4155 |
|clrIndex| |
4156 |
||
4157 |
clrIndex := self selectedColorIndexOrNil. |
|
4158 |
clrIndex isNil ifTrue:[ |
|
1544 | 4159 |
^ self |
4160 |
]. |
|
1682 | 4161 |
(self image colorFromValue:clrIndex-1) inspect |
1544 | 4162 |
! |
4163 |
||
1598 | 4164 |
makeBrighter |
4165 |
| anyChange| |
|
4166 |
||
4167 |
self withExecuteCursorDo:[ |
|
4168 |
anyChange := imageEditView makeBrighter. |
|
4169 |
anyChange ifFalse:[ |
|
4170 |
Dialog warn:'Image unchanged'. |
|
4171 |
] ifTrue:[ |
|
4172 |
self updateImage. |
|
4173 |
] |
|
4174 |
]. |
|
4175 |
! |
|
4176 |
||
4177 |
makeDarker |
|
4178 |
| anyChange| |
|
4179 |
||
4180 |
self withExecuteCursorDo:[ |
|
4181 |
anyChange := imageEditView makeDarker. |
|
4182 |
anyChange ifFalse:[ |
|
4183 |
Dialog warn:'Image unchanged'. |
|
4184 |
] ifTrue:[ |
|
4185 |
self updateImage. |
|
4186 |
] |
|
4187 |
]. |
|
4188 |
! |
|
4189 |
||
1926 | 4190 |
makeGrayScaleImage |
1598 | 4191 |
|anyChange| |
1436 | 4192 |
|
4193 |
self withExecuteCursorDo:[ |
|
1926 | 4194 |
anyChange := imageEditView makeGrayScaleImage. |
1436 | 4195 |
anyChange ifFalse:[ |
4196 |
Dialog warn:'Image unchanged'. |
|
4197 |
] ifTrue:[ |
|
1598 | 4198 |
self updateImage. |
4199 |
] |
|
4200 |
]. |
|
4201 |
! |
|
4202 |
||
4203 |
makeInverse |
|
4204 |
| anyChange| |
|
4205 |
||
4206 |
self withExecuteCursorDo:[ |
|
4207 |
anyChange := imageEditView makeInverse. |
|
4208 |
anyChange ifFalse:[ |
|
4209 |
Dialog warn:'Image unchanged'. |
|
4210 |
] ifTrue:[ |
|
4211 |
self updateImage. |
|
1436 | 4212 |
] |
4213 |
]. |
|
4214 |
! |
|
4215 |
||
1446 | 4216 |
makeSelectedColorBrighter |
1682 | 4217 |
self processSelectedColorWith:[:clr | clr lightened] |
1446 | 4218 |
! |
4219 |
||
4220 |
makeSelectedColorDarker |
|
1682 | 4221 |
self processSelectedColorWith:[:clr | clr darkened] |
1446 | 4222 |
! |
4223 |
||
1884 | 4224 |
makeSelectedColorGray |
4225 |
self processSelectedColorWith:[:clr | Color brightness:(clr brightness)] |
|
4226 |
! |
|
4227 |
||
1852 | 4228 |
pasteColorIntoColormap |
4229 |
|copyBufferColor| |
|
4230 |
||
1873 | 4231 |
copyBufferColor := imageEditView getClipboardObject. |
1852 | 4232 |
copyBufferColor isColor ifFalse:[ |
1879
03581b0d7c8f
Send #beep to window instead of device
Stefan Vogel <sv@exept.de>
parents:
1873
diff
changeset
|
4233 |
self window beep. |
1852 | 4234 |
^ self |
4235 |
]. |
|
4236 |
||
4237 |
self processSelectedColorWith:[:clr | |
|
4238 |
copyBufferColor |
|
4239 |
] |
|
4240 |
! |
|
4241 |
||
1480 | 4242 |
pasteMask |
4243 |
|img mask| |
|
4244 |
||
4245 |
imageEditView makeUndo. |
|
4246 |
||
4247 |
img := self image. |
|
4248 |
mask := img mask. |
|
4249 |
||
4250 |
mask |
|
4251 |
copyFrom:MaskClipboard |
|
4252 |
x:0 y:0 |
|
4253 |
toX:0 y:0 |
|
4254 |
width:(mask width min:MaskClipboard width) |
|
4255 |
height:(mask height min:MaskClipboard height). |
|
4256 |
img mask:mask. |
|
4257 |
(imageEditView image:img copy) notNil ifTrue:[ |
|
4258 |
self fetchImageData. |
|
4259 |
] |
|
4260 |
! |
|
4261 |
||
1682 | 4262 |
pickAndAddColorToColormap |
4263 |
self addColorToColormap:(Color fromUser) |
|
4264 |
! |
|
4265 |
||
1933 | 4266 |
pickAndPasteColor |
4267 |
self pickColor. |
|
4268 |
self pasteColorIntoColormap. |
|
4269 |
! |
|
4270 |
||
1852 | 4271 |
pickColor |
1871 | 4272 |
imageEditView setClipboardObject:(Color fromUser) |
1852 | 4273 |
! |
4274 |
||
1682 | 4275 |
processSelectedColorWith:aBlock |
1852 | 4276 |
"undoable color processing: the selected color will be replaced by the |
4277 |
value of aBlock" |
|
4278 |
||
4279 |
|img cMap modifiedColormap oldColor newImage selectedColorIndex oldSelection newColor| |
|
1682 | 4280 |
|
4281 |
selectedColorIndex := self selectedColorIndexOrNil. |
|
4282 |
selectedColorIndex isNil ifTrue:[^ self]. |
|
4283 |
||
4284 |
img := self image. |
|
4285 |
cMap := img colorMap. |
|
4286 |
cMap isNil ifTrue:[ |
|
1916 | 4287 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1682 | 4288 |
^ self |
4289 |
]. |
|
1852 | 4290 |
|
4291 |
oldColor := cMap at:selectedColorIndex. |
|
1682 | 4292 |
imageEditView makeUndo. |
4293 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4294 |
modifiedColormap := cMap asArray copy. |
1852 | 4295 |
|
4296 |
newColor := aBlock value:oldColor. |
|
1859 | 4297 |
modifiedColormap at:selectedColorIndex put:newColor. |
1682 | 4298 |
|
4299 |
newImage := img species new |
|
4300 |
width:img width |
|
4301 |
height:img height |
|
1843 | 4302 |
depth:img depth |
1682 | 4303 |
fromArray:img bits. |
4304 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4305 |
newImage colorMap:modifiedColormap. |
1682 | 4306 |
newImage fileName:img fileName. |
4307 |
newImage mask:(img mask copy). |
|
4308 |
||
4309 |
oldSelection := self selectionOfColor value. |
|
4310 |
||
4311 |
(imageEditView image:newImage) notNil ifTrue:[ |
|
4312 |
self fetchImageData. |
|
4313 |
]. |
|
4314 |
self selectionOfColor value:oldSelection. |
|
4315 |
||
4316 |
"Created: / 12.3.1999 / 00:20:28 / cg" |
|
4317 |
"Modified: / 16.3.1999 / 21:57:26 / cg" |
|
4318 |
! |
|
4319 |
||
1124 | 4320 |
reduceNumberOfColors |
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4321 |
|s n anyChange img usedColors| |
1124 | 4322 |
|
4323 |
s := Dialog request:'Number of color bits to strip (1-7) ?'. |
|
1435 | 4324 |
s size == 0 ifTrue:[^ self]. |
1934 | 4325 |
|
1124 | 4326 |
n := Integer readFrom:s onError:0. |
4327 |
(n between:1 and:7) ifFalse:[ |
|
4328 |
Dialog warn:'Image unchanged'. |
|
4329 |
^ self |
|
4330 |
]. |
|
4331 |
||
4332 |
self withExecuteCursorDo:[ |
|
4333 |
anyChange := imageEditView reduceColorResolutionBy:n. |
|
4334 |
anyChange ifFalse:[ |
|
4335 |
Dialog warn:'Image unchanged'. |
|
4336 |
] ifTrue:[ |
|
4337 |
img := imageEditView image. |
|
4338 |
imageEditView image:img. |
|
1446 | 4339 |
|
4340 |
self fetchImageData. |
|
1727
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4341 |
usedColors := img usedColorsMax:10000. |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4342 |
usedColors size == 10000 ifTrue:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4343 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4344 |
] ifFalse:[ |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4345 |
Dialog information:(usedColors size printString , ' colors used.') |
8c626d784494
color reduction algorithm fixed
Claus Gittinger <cg@exept.de>
parents:
1716
diff
changeset
|
4346 |
] |
1124 | 4347 |
] |
4348 |
]. |
|
4349 |
! |
|
4350 |
||
1930 | 4351 |
reduceNumberOfColors2 |
1938 | 4352 |
|s rndR rndG rndB usedColors image newImage| |
4353 |
||
4354 |
s := Dialog request:'Rounding Interval red (2..) ?' initialAnswer:4. |
|
1934 | 4355 |
s size == 0 ifTrue:[^ self]. |
1938 | 4356 |
rndR := Integer readFrom:s onError:0. |
1939 | 4357 |
|
1938 | 4358 |
s := Dialog request:'Rounding Interval green (2..) ?' initialAnswer:2. |
4359 |
s size == 0 ifTrue:[^ self]. |
|
4360 |
rndG := Integer readFrom:s onError:0. |
|
1939 | 4361 |
|
1938 | 4362 |
s := Dialog request:'Rounding Interval blue (2..) ?' initialAnswer:10. |
4363 |
s size == 0 ifTrue:[^ self]. |
|
4364 |
rndB := Integer readFrom:s onError:0. |
|
1939 | 4365 |
|
4366 |
((rndR > 1) or:[(rndG > 1) or:[(rndB > 1)]]) ifFalse:[ |
|
1930 | 4367 |
Dialog warn:'Image unchanged'. |
4368 |
^ self |
|
4369 |
]. |
|
4370 |
||
4371 |
self withExecuteCursorDo:[ |
|
1934 | 4372 |
image := self image. |
4373 |
usedColors := image usedColors. |
|
4374 |
imageEditView makeUndo. |
|
4375 |
||
4376 |
newImage := image copy. |
|
4377 |
image |
|
4378 |
colorsFromX:0 y:0 toX:(image width-1) y:(image height-1) |
|
4379 |
do:[:x :y :clr | |
|
4380 |
|r g b nr ng nb newClr| |
|
4381 |
||
4382 |
r := clr redByte. |
|
4383 |
g := clr greenByte. |
|
4384 |
b := clr blueByte. |
|
1938 | 4385 |
nr := (r roundTo:rndR) min:255. |
4386 |
ng := (g roundTo:rndG) min:255. |
|
4387 |
nb := (b roundTo:rndB) min:255. |
|
1934 | 4388 |
|
4389 |
newClr := Color redByte:nr greenByte:ng blueByte:nb. |
|
4390 |
newImage colorAtX:x y:y put:newClr |
|
4391 |
]. |
|
4392 |
||
4393 |
imageEditView image:newImage. |
|
4394 |
imageEditView setModified. |
|
4395 |
self updateImage. |
|
4396 |
self updateImagePreView. |
|
4397 |
||
4398 |
self fetchImageData. |
|
4399 |
usedColors := newImage usedColorsMax:10000. |
|
4400 |
usedColors size == 10000 ifTrue:[ |
|
4401 |
Dialog information:('>= ' , usedColors size printString , ' colors used.') |
|
4402 |
] ifFalse:[ |
|
4403 |
Dialog information:(usedColors size printString , ' colors used.') |
|
4404 |
] |
|
1930 | 4405 |
]. |
4406 |
! |
|
4407 |
||
1682 | 4408 |
selectedColorIndexOrNil |
4409 |
| img clrIndex| |
|
4410 |
||
4411 |
img := self image. |
|
4412 |
img isNil ifTrue:[ |
|
4413 |
self warn:'No Image.'. |
|
4414 |
^ nil |
|
4415 |
]. |
|
4416 |
clrIndex := self selectionOfColor value. |
|
1896 | 4417 |
self hasMask "img mask notNil" ifTrue: [ |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4418 |
clrIndex == 1 ifTrue:[^ nil]. |
1904 | 4419 |
clrIndex == 0 ifTrue:[^ nil]. |
1896 | 4420 |
^ clrIndex - 1 |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4421 |
]. |
1682 | 4422 |
^ clrIndex |
4423 |
! |
|
4424 |
||
1852 | 4425 |
selectedColorOrNil |
1896 | 4426 |
|cmapIndex img cMap| |
4427 |
||
4428 |
cmapIndex := self selectedColorIndexOrNil. |
|
1900 | 4429 |
cmapIndex isNil ifTrue:[^ nil]. |
1852 | 4430 |
|
4431 |
img := self image. |
|
4432 |
cMap := img colorMap. |
|
4433 |
cMap isNil ifTrue:[ |
|
1916 | 4434 |
self warn:(resources stringWithCRs:'Image has no colormap.\Please change the colorMap mode first.'). |
1900 | 4435 |
^ nil |
1852 | 4436 |
]. |
1896 | 4437 |
^ cMap at:cmapIndex. |
1852 | 4438 |
! |
4439 |
||
1008 | 4440 |
sortColorMap |
4441 |
"calculates a new color map for the image, sorting colors" |
|
4442 |
||
1939 | 4443 |
self |
4444 |
sortColorMapWith:self sortBlockForColors |
|
4445 |
! |
|
4446 |
||
4447 |
sortColorMapWith:sortBlock |
|
4448 |
"calculates a new color map for the image, sorting colors" |
|
4449 |
||
1008 | 4450 |
|depth newColorMap newImage oldImage usedColors oldToNew oldBits newBits tmpBits| |
4451 |
||
4452 |
oldImage := self image. |
|
4453 |
depth := oldImage depth. |
|
4454 |
||
4455 |
oldImage photometric ~~ #palette ifTrue:[ |
|
4456 |
self information:'Compress colorMap: Only palette images have colormaps.'. |
|
4457 |
^ self |
|
4458 |
]. |
|
4459 |
||
4460 |
usedColors := oldImage realColorMap. |
|
4461 |
||
4462 |
imageEditView makeUndo. |
|
4463 |
||
4464 |
self withExecuteCursorDo:[ |
|
4465 |
"/ newColorMap := Array new:usedColors size. |
|
4466 |
||
4467 |
"/ translation table |
|
4468 |
oldToNew := ByteArray new:(1 bitShift:depth). |
|
4469 |
newColorMap := usedColors asArray. |
|
1939 | 4470 |
newColorMap sort:sortBlock. |
1008 | 4471 |
|
4472 |
oldImage colorMap asArray keysAndValuesDo:[:oldIdx :clr | |
|
4473 |
|newPixel| |
|
4474 |
||
4475 |
(usedColors includes:clr) ifTrue:[ |
|
4476 |
newPixel := newColorMap indexOf:clr. |
|
4477 |
oldToNew at:oldIdx put:newPixel-1. |
|
4478 |
] |
|
4479 |
]. |
|
4480 |
||
4481 |
oldBits := oldImage bits. |
|
4482 |
newBits := ByteArray new:(oldBits size). |
|
4483 |
depth ~~ 8 ifTrue:[ |
|
4484 |
"/ expand/compress can only handle 8bits |
|
4485 |
tmpBits := ByteArray uninitializedNew:(oldImage width*oldImage height). |
|
4486 |
oldBits |
|
4487 |
expandPixels:depth |
|
4488 |
width:oldImage width |
|
4489 |
height:oldImage height |
|
4490 |
into:tmpBits |
|
4491 |
mapping:oldToNew. |
|
4492 |
tmpBits |
|
4493 |
compressPixels:depth |
|
4494 |
width:oldImage width |
|
4495 |
height:oldImage height |
|
4496 |
into:newBits |
|
4497 |
mapping:nil |
|
4498 |
] ifFalse:[ |
|
4499 |
oldBits |
|
4500 |
expandPixels:depth |
|
4501 |
width:oldImage width |
|
4502 |
height:oldImage height |
|
4503 |
into:newBits |
|
4504 |
mapping:oldToNew. |
|
4505 |
]. |
|
4506 |
||
4507 |
newImage := oldImage species new |
|
4508 |
width:oldImage width |
|
4509 |
height:oldImage height |
|
4510 |
depth:depth |
|
4511 |
fromArray:newBits. |
|
4512 |
||
4513 |
newImage colorMap:newColorMap. |
|
4514 |
newImage fileName:oldImage fileName. |
|
4515 |
newImage mask:(oldImage mask copy). |
|
4516 |
||
1054 | 4517 |
(imageEditView image:newImage) notNil ifTrue:[ |
1446 | 4518 |
self fetchImageData. |
1008 | 4519 |
] |
4520 |
] |
|
4521 |
||
4522 |
"Modified: / 15.9.1998 / 17:53:32 / cg" |
|
4523 |
"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
|
4524 |
! ! |
4e50c3164625
more options (preserving colorMap) when changing the colorMapMode;
Claus Gittinger <cg@exept.de>
parents:
917
diff
changeset
|
4525 |
|
1715 | 4526 |
!ImageEditor methodsFor:'user actions-editing'! |
400 | 4527 |
|
1882 | 4528 |
doBrightenImage |
4529 |
imageEditView brightenImage. |
|
4530 |
self listOfColors removeAll. |
|
4531 |
self findColorMapMode. |
|
4532 |
imageEditView undoImages removeLast |
|
4533 |
! |
|
4534 |
||
767 | 4535 |
doBrowseClass |
4536 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
400 | 4537 |
|
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4538 |
|cls| |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4539 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4540 |
cls := Smalltalk at:(imageEditView resourceClass) ifAbsent:nil. |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4541 |
cls isNil ifTrue:[^ self warn:'No Class specified']. |
1488 | 4542 |
UserPreferences systemBrowserClass |
933
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4543 |
openInClass:cls class |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4544 |
selector:(imageEditView resourceSelector) |
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4545 |
|
f090206aadff
disable some menu items if no class/selector is defined
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
4546 |
"Modified: / 31.7.1998 / 02:01:15 / cg" |
400 | 4547 |
! |
4548 |
||
1703 | 4549 |
doCopyImageToClipboard |
4550 |
imageEditView copyImageToClipboard. |
|
4551 |
! |
|
4552 |
||
1045 | 4553 |
doCropAll |
986 | 4554 |
"find all borders and cut them off" |
4555 |
||
1045 | 4556 |
imageEditView cropLeft:true right:true top:true bottom:true. |
986 | 4557 |
self updateInfoLabel |
4558 |
||
4559 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
4560 |
"Created: / 7.9.1998 / 16:33:43 / cg" |
|
4561 |
! |
|
4562 |
||
1045 | 4563 |
doCropBottom |
986 | 4564 |
"find a bottom border and cut it off" |
4565 |
||
1045 | 4566 |
imageEditView cropLeft:false right:false top:false bottom:true. |
986 | 4567 |
self updateInfoLabel |
4568 |
||
4569 |
"Created: / 7.9.1998 / 13:00:20 / cg" |
|
4570 |
"Modified: / 7.9.1998 / 14:26:23 / cg" |
|
4571 |
! |
|
4572 |
||
1045 | 4573 |
doCropLeft |
986 | 4574 |
"find a left border and cut it off" |
4575 |
||
1045 | 4576 |
imageEditView cropLeft:true right:false top:false bottom:false. |
986 | 4577 |
self updateInfoLabel |
4578 |
||
4579 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
4580 |
"Modified: / 7.9.1998 / 14:26:34 / cg" |
|
4581 |
! |
|
4582 |
||
1045 | 4583 |
doCropManual |
986 | 4584 |
"let user specify borders and cut them off" |
4585 |
||
1502 | 4586 |
|bindings left top right bottom img firstChange gropAction acceptChannel| |
4587 |
||
4588 |
acceptChannel := TriggerValue new. |
|
1490 | 4589 |
|
4590 |
firstChange := true. |
|
4591 |
||
1502 | 4592 |
gropAction := |
4593 |
[:lV :rV :tV :bV | |l r t b| |
|
4594 |
acceptChannel value:true. |
|
4595 |
||
4596 |
l := lV value. |
|
4597 |
r := rV value. |
|
4598 |
t := tV value. |
|
4599 |
b := bV value. |
|
4600 |
(l + r + t + b) == 0 ifTrue:[ |
|
1879
03581b0d7c8f
Send #beep to window instead of device
Stefan Vogel <sv@exept.de>
parents:
1873
diff
changeset
|
4601 |
self window beep |
1502 | 4602 |
] ifFalse:[ |
4603 |
img := imageEditView image. |
|
4604 |
firstChange ifTrue:[ |
|
4605 |
imageEditView makeUndo. |
|
4606 |
firstChange := false. |
|
4607 |
]. |
|
4608 |
imageEditView |
|
4609 |
makeSubImageX:l y:t |
|
4610 |
width:(img width - l - r) |
|
4611 |
height:(img height - t - b). |
|
4612 |
self updateInfoLabel |
|
4613 |
]. |
|
1490 | 4614 |
]. |
986 | 4615 |
|
4616 |
bindings := IdentityDictionary new. |
|
1507 | 4617 |
bindings at:#left put:(left := 1 asValue). |
4618 |
bindings at:#right put:(right := 1 asValue). |
|
4619 |
bindings at:#top put:(top := 1 asValue). |
|
4620 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1502 | 4621 |
bindings at:#acceptChannel put:acceptChannel. |
4622 |
||
4623 |
bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
|
4624 |
bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
|
4625 |
bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
|
4626 |
bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
|
4627 |
||
4628 |
bindings at:#applyAction put:[ gropAction value:left value:right value:top value:bottom ]. |
|
1490 | 4629 |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4630 |
(self openDialogInterface:#cropDialogSpec withBindings:bindings) |
1507 | 4631 |
ifFalse:[ |
4632 |
firstChange ~~ true ifTrue:[ |
|
1558 | 4633 |
imageEditView undo. |
4634 |
self updateImagePreView. |
|
1507 | 4635 |
] |
4636 |
]. |
|
986 | 4637 |
|
4638 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4639 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
4640 |
! |
|
4641 |
||
1045 | 4642 |
doCropRight |
986 | 4643 |
"find a right border and cut it off" |
4644 |
||
1045 | 4645 |
imageEditView cropLeft:false right:true top:false bottom:false. |
986 | 4646 |
self updateInfoLabel |
4647 |
||
4648 |
"Created: / 7.9.1998 / 13:00:14 / cg" |
|
4649 |
"Modified: / 7.9.1998 / 14:26:44 / cg" |
|
4650 |
! |
|
4651 |
||
1045 | 4652 |
doCropTop |
986 | 4653 |
"find a top border and cut it off" |
4654 |
||
1045 | 4655 |
imageEditView cropLeft:false right:false top:true bottom:false. |
986 | 4656 |
self updateInfoLabel |
4657 |
||
4658 |
"Created: / 7.9.1998 / 13:00:19 / cg" |
|
4659 |
"Modified: / 7.9.1998 / 14:26:52 / cg" |
|
4660 |
! |
|
4661 |
||
1882 | 4662 |
doDarkenImage |
4663 |
imageEditView darkenImage. |
|
4664 |
self listOfColors removeAll. |
|
4665 |
self findColorMapMode. |
|
4666 |
imageEditView undoImages removeLast |
|
4667 |
! |
|
4668 |
||
1433 | 4669 |
doEditMask |
4670 |
"" |
|
4671 |
||
4672 |
self image mask edit |
|
4673 |
! |
|
4674 |
||
767 | 4675 |
doFlipHorizontal |
4676 |
"flips horizontally current image" |
|
400 | 4677 |
|
911 | 4678 |
imageEditView flipHorizontal |
400 | 4679 |
! |
4680 |
||
767 | 4681 |
doFlipVertical |
4682 |
"flips vertically current image" |
|
400 | 4683 |
|
911 | 4684 |
imageEditView flipVertical |
400 | 4685 |
! |
4686 |
||
1896 | 4687 |
doInspectImage |
4688 |
"opens a System Browser on the resourceClass and the resourceSelector" |
|
4689 |
||
4690 |
self image inspect |
|
4691 |
! |
|
4692 |
||
767 | 4693 |
doMagnifyDown |
4694 |
"magnifies current image one step down" |
|
400 | 4695 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4696 |
|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
|
4697 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4698 |
magHolder := self valueOfMagnification. |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4699 |
(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
|
4700 |
magHolder value: mag - 1 |
400 | 4701 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4702 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4703 |
"Modified: / 26.7.1998 / 20:24:08 / cg" |
400 | 4704 |
! |
4705 |
||
767 | 4706 |
doMagnifyImage |
1479 | 4707 |
"magnifies the current image to a new size" |
400 | 4708 |
|
1353 | 4709 |
|box newSize image| |
4710 |
||
4711 |
image := imageEditView image. |
|
4712 |
||
4713 |
box := EnterBox new. |
|
4714 |
box title:(resources string:'Images new size:'). |
|
4715 |
box okText:(resources string:'OK'). |
|
4716 |
box abortText:(resources string:'Cancel'). |
|
4717 |
box initialText:image extent printString. |
|
4718 |
box showAtPointer. |
|
4719 |
(box accepted |
|
4720 |
and: [(newSize := Object readFromString:(box contents) onError:nil) notNil]) |
|
4721 |
ifTrue:[ |
|
1479 | 4722 |
newSize isPoint ifFalse:[ |
4723 |
self warn:'please enter the new size as ''x @ y''.'. |
|
4724 |
^ self. |
|
4725 |
]. |
|
4726 |
imageEditView magnifyImageTo:newSize. |
|
4727 |
]. |
|
4728 |
||
4729 |
self updateInfoLabel |
|
4730 |
! |
|
4731 |
||
4732 |
doMagnifyImageBy |
|
4733 |
"magnifies the current image (by a scale)" |
|
4734 |
||
4735 |
|box oldSize newSize scale image| |
|
4736 |
||
4737 |
image := imageEditView image. |
|
4738 |
oldSize := image extent. |
|
4739 |
||
4740 |
box := EnterBox new. |
|
4741 |
box title:(resources string:'Scale factor (<1 to shrink; >1 to magnify):'). |
|
4742 |
box okText:(resources string:'OK'). |
|
4743 |
box abortText:(resources string:'Cancel'). |
|
4744 |
box initialText:1 printString. |
|
4745 |
box showAtPointer. |
|
4746 |
||
4747 |
(box accepted |
|
4748 |
and: [(scale := Object readFromString:(box contents) onError:nil) notNil]) |
|
4749 |
ifTrue:[ |
|
4750 |
scale isNumber ifFalse:[ |
|
4751 |
self warn:'please enter a scale factor (<1 to shrink; >1 to magnify).'. |
|
4752 |
^ self. |
|
4753 |
]. |
|
4754 |
newSize := oldSize * scale. |
|
1353 | 4755 |
imageEditView magnifyImageTo:newSize. |
4756 |
]. |
|
4757 |
||
400 | 4758 |
self updateInfoLabel |
4759 |
! |
|
4760 |
||
767 | 4761 |
doMagnifyUp |
4762 |
"magnifies current image one step up" |
|
400 | 4763 |
|
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4764 |
|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
|
4765 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4766 |
magHolder := self valueOfMagnification. |
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4767 |
(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
|
4768 |
magHolder value: mag + 1 |
400 | 4769 |
] |
915
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4770 |
|
99f8e19aab3a
better use a columnAdaptor to fetch r/g/b values from a color.
Claus Gittinger <cg@exept.de>
parents:
914
diff
changeset
|
4771 |
"Modified: / 26.7.1998 / 20:23:52 / cg" |
400 | 4772 |
! |
4773 |
||
767 | 4774 |
doNegativeImage |
4775 |
"negates current image by negating the color map" |
|
400 | 4776 |
|
1598 | 4777 |
self image depth ~~ 1 ifTrue:[ |
4778 |
Dialog warn:'Only useful for depth 1 images'. |
|
4779 |
^ self |
|
4780 |
]. |
|
911 | 4781 |
imageEditView negativeImage. |
400 | 4782 |
self listOfColors removeAll. |
901 | 4783 |
self findColorMapMode. |
911 | 4784 |
imageEditView undoImages removeLast |
400 | 4785 |
! |
4786 |
||
767 | 4787 |
doResizeImage |
1353 | 4788 |
"resizes the current image" |
4789 |
||
4790 |
|box newSize image| |
|
4791 |
||
4792 |
image := imageEditView image. |
|
4793 |
||
4794 |
box := EnterBox new. |
|
4795 |
box title:(resources string:'Images new size:'). |
|
4796 |
box okText:(resources string:'OK'). |
|
4797 |
box abortText:(resources string:'Cancel'). |
|
4798 |
box initialText:image extent printString. |
|
4799 |
box showAtPointer. |
|
4800 |
(box accepted |
|
4801 |
and: [(newSize := Object readFromString:(box contents) onError:nil) notNil]) |
|
4802 |
ifTrue:[ |
|
4803 |
imageEditView resizeImageTo:newSize. |
|
4804 |
]. |
|
400 | 4805 |
! |
4806 |
||
767 | 4807 |
doRotateImage |
4808 |
"rotates current image" |
|
400 | 4809 |
|
1353 | 4810 |
|box rotation| |
4811 |
||
4812 |
box := EnterBox new. |
|
4813 |
box title:(resources string:'Rotate by (degrees, clockwise):'). |
|
4814 |
box okText:(resources string:'OK'). |
|
4815 |
box abortText:(resources string:'Cancel'). |
|
4816 |
box initialText: '0'. |
|
4817 |
box showAtPointer. |
|
4818 |
(box accepted and: [(rotation := Object readFromString: box contents onError:nil) notNil]) |
|
4819 |
ifTrue:[ |
|
4820 |
imageEditView rotateImageBy:rotation. |
|
1558 | 4821 |
self updateInfoLabel. |
1353 | 4822 |
]. |
400 | 4823 |
! |
4824 |
||
1557 | 4825 |
doShiftManual |
4826 |
"let user specify amount and shift" |
|
4827 |
||
1713 | 4828 |
|bindings amount img firstChange shiftAction acceptChannel wrapHolder| |
1557 | 4829 |
|
4830 |
acceptChannel := TriggerValue new. |
|
1713 | 4831 |
wrapHolder := false asValue. |
1557 | 4832 |
|
4833 |
firstChange := true. |
|
4834 |
||
4835 |
shiftAction := |
|
4836 |
[:shiftH :shiftV | |
|
4837 |
acceptChannel value:true. |
|
4838 |
||
4839 |
img := imageEditView image. |
|
4840 |
firstChange ifTrue:[ |
|
4841 |
imageEditView makeUndo. |
|
4842 |
firstChange := false. |
|
4843 |
]. |
|
1713 | 4844 |
imageEditView shiftImageHorizontal:(shiftH value) vertical:(shiftV value) wrap:(wrapHolder value). |
1557 | 4845 |
self updateInfoLabel |
4846 |
]. |
|
4847 |
||
4848 |
bindings := IdentityDictionary new. |
|
4849 |
bindings at:#shiftAmount put:(amount := 1 asValue). |
|
1713 | 4850 |
bindings at:#wrap put:wrapHolder. |
1557 | 4851 |
bindings at:#acceptChannel put:acceptChannel. |
4852 |
||
4853 |
bindings at:#shiftLeftNow put:[ shiftAction value:(-1*amount value) value:0 ]. |
|
4854 |
bindings at:#shiftRightNow put:[ shiftAction value:amount value value:0 ]. |
|
4855 |
bindings at:#shiftUpNow put:[ shiftAction value:0 value:(-1*amount value) ]. |
|
4856 |
bindings at:#shiftDownNow put:[ shiftAction value:0 value:amount value ]. |
|
4857 |
||
4858 |
(self openDialogInterface:#shiftDialogSpec withBindings:bindings) |
|
4859 |
ifFalse:[ |
|
4860 |
firstChange ~~ true ifTrue:[ |
|
4861 |
imageEditView undo |
|
4862 |
] |
|
4863 |
]. |
|
4864 |
||
4865 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4866 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
4867 |
! |
|
4868 |
||
1480 | 4869 |
doUnCropManual |
4870 |
"let user specify borders and add them" |
|
4871 |
||
4872 |
|bindings left top right bottom img| |
|
4873 |
||
4874 |
bindings := IdentityDictionary new. |
|
1704 | 4875 |
bindings at:#left put:(left := 1 asValue). |
4876 |
bindings at:#right put:(right := 1 asValue). |
|
4877 |
bindings at:#top put:(top := 1 asValue). |
|
4878 |
bindings at:#bottom put:(bottom := 1 asValue). |
|
1740
5c0b60e76676
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1734
diff
changeset
|
4879 |
(self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
1480 | 4880 |
ifTrue:[ |
4881 |
left := left value. |
|
4882 |
right := right value. |
|
4883 |
top := top value. |
|
4884 |
bottom := bottom value. |
|
4885 |
img := imageEditView image. |
|
4886 |
||
4887 |
imageEditView |
|
4888 |
makeBorderedImageX:left y:top |
|
4889 |
width:(img width + left + right) |
|
4890 |
height:(img height + top + bottom). |
|
4891 |
self updateInfoLabel |
|
4892 |
]. |
|
4893 |
||
4894 |
"Created: / 7.9.1998 / 18:16:07 / cg" |
|
4895 |
"Modified: / 7.9.1998 / 18:20:42 / cg" |
|
4896 |
! |
|
4897 |
||
767 | 4898 |
doUndo |
4899 |
"reverses last edit action" |
|
400 | 4900 |
|
1436 | 4901 |
imageEditView undo. |
400 | 4902 |
! ! |
4903 |
||
1715 | 4904 |
!ImageEditor methodsFor:'user actions-loading'! |
400 | 4905 |
|
767 | 4906 |
doLoadFromClass |
4907 |
"opens a dialog for loading an image from class and a (resource-) selector" |
|
400 | 4908 |
|
1122 | 4909 |
|img| |
4910 |
||
1054 | 4911 |
(imageEditView loadFromClass) notNil ifTrue:[ |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4912 |
imageSeqNr := nil. |
1122 | 4913 |
(img := self image) notNil ifTrue: [ |
1900 | 4914 |
self updateColorsFromImage:img. |
574 | 4915 |
self findColorMapMode. |
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4916 |
self updateLabelsAndHistory. |
1054 | 4917 |
] ifFalse: [ |
4918 |
self updateForNoImage |
|
1376
ce3cf26e201e
change & updates fixed (monochrome bitmaps)
Claus Gittinger <cg@exept.de>
parents:
1353
diff
changeset
|
4919 |
]. |
449 | 4920 |
] |
400 | 4921 |
! |
4922 |
||
767 | 4923 |
doLoadFromFile |
4924 |
"opens a dialog for loading an image from a file" |
|
400 | 4925 |
|
1922 | 4926 |
|img file filters| |
1353 | 4927 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
4928 |
imageSeqNr := nil. |
1353 | 4929 |
img := self image. |
4930 |
img notNil ifTrue: [ |
|
4931 |
file := img fileName |
|
4932 |
]. |
|
4933 |
||
4934 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
4935 |
||
4936 |
file notNil ifTrue:[ |
|
4937 |
file := FileSelectionBrowser |
|
4938 |
request:'Load Image From' |
|
4939 |
fileName:file |
|
4940 |
withFileFilters:filters. |
|
4941 |
] ifFalse:[ |
|
4942 |
file := FileSelectionBrowser |
|
4943 |
request:'Load Image From' |
|
1922 | 4944 |
inDirectory:LastDirectory |
1353 | 4945 |
withFileFilters:filters. |
4946 |
]. |
|
4947 |
file notNil ifTrue:[ |
|
4948 |
LastDirectory := file asFilename directoryName. |
|
4949 |
self loadFromFile:file |
|
4950 |
] |
|
400 | 4951 |
! |
4952 |
||
767 | 4953 |
doNewImage |
4954 |
"opens a dialog with choices of size and color map for creating a new image" |
|
400 | 4955 |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4956 |
|aspects width height cMapString cMapMode cMap imageClass image szString defaultSize| |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4957 |
|
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4958 |
defaultSize := (self class listOfDefaultSizes includes:'32x32') |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4959 |
ifTrue:['32x32'] |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4960 |
ifFalse:[self class listOfDefaultSizes first]. |
767 | 4961 |
|
400 | 4962 |
aspects := IdentityDictionary new |
767 | 4963 |
at:#listOfSizes put: self class listOfDefaultSizes asValue; |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4964 |
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
|
4965 |
at:#selectionOfSize put: (LastSizeString ? defaultSize) asValue; |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4966 |
at:#selectionOfColorMap put: (LastColormapMode ? self class namesOfColorMaps values asSortedCollection first) asValue; |
400 | 4967 |
yourself. |
4968 |
||
767 | 4969 |
(self openDialogInterface:#dialogSpecForNewImage withBindings:aspects) |
1383 | 4970 |
ifTrue:[ |
4971 |
szString := (aspects at:#selectionOfSize) value. |
|
1929 | 4972 |
width := "128 min: "(Integer readFromString: (szString upTo: $x) onError:[32]). |
4973 |
height := "128 min: " (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[32]). |
|
400 | 4974 |
|
1637 | 4975 |
cMapString := (aspects at:#selectionOfColorMap) value. |
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4976 |
cMapMode := self class namesOfColorMaps keyAtEqualValue:cMapString. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4977 |
cMap := self class listOfColorMaps at:cMapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4978 |
imageClass := Image implementorForDepth:(cMap size highBit-1). |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4979 |
image := imageClass width: width height: height. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4980 |
image bits:(ByteArray new:(image bytesPerRow*height)). |
400 | 4981 |
|
1637 | 4982 |
LastSizeString := szString. |
4983 |
LastColormapMode := cMapString. |
|
4984 |
||
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4985 |
(cMapMode startsWith: 'mask') ifTrue:[ |
767 | 4986 |
image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels |
400 | 4987 |
]. |
4988 |
image colorMap: cMap. |
|
1847
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4989 |
(imageEditView image: image) notNil ifTrue:[ |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4990 |
self updateListOfColorsAndColormapMode. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4991 |
self updateLabelsAndHistory. |
d7e8ec4f3696
partial support for depth>8 images;
Claus Gittinger <cg@exept.de>
parents:
1843
diff
changeset
|
4992 |
]. |
400 | 4993 |
image fillRectangleX:0 y:0 width:width height:height with:Color white. |
767 | 4994 |
] |
929 | 4995 |
! |
4996 |
||
1682 | 4997 |
doNewImageFromClipboard |
4998 |
|image| |
|
4999 |
||
5000 |
image := imageEditView clipBoard. |
|
5001 |
||
5002 |
(imageEditView image:image) notNil |
|
5003 |
ifTrue:[ |
|
1900 | 5004 |
self updateColorsFromImage:image. |
1682 | 5005 |
self findColorMapMode. |
5006 |
self updateLabelsAndHistory. |
|
5007 |
] |
|
5008 |
! |
|
5009 |
||
929 | 5010 |
grabScreenImage |
5011 |
"let user choose an area and grab that are for editing" |
|
5012 |
||
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5013 |
Processor |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5014 |
addTimedBlock:[ |
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5015 |
|image d8image img| |
929 | 5016 |
|
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5017 |
imageSeqNr := nil. |
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5018 |
image := Image fromUser. |
1121 | 5019 |
image isNil ifFalse:[ |
5020 |
image depth > 8 ifTrue:[ |
|
1687
f4543a556b89
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1682
diff
changeset
|
5021 |
Error handle:[:ex | |sig| |
1537
e86a686eeba2
class based exceptions - no longer need to send #haltSÃgnal
Claus Gittinger <cg@exept.de>
parents:
1507
diff
changeset
|
5022 |
(sig := ex signal) == HaltInterrupt ifTrue:[ex reject]. |
1122 | 5023 |
sig == Signal noHandlerSignal ifTrue:[ex reject]. |
1121 | 5024 |
|
5025 |
self warn:'Could not convert to depth8 image (too many colors)'. |
|
5026 |
d8image := nil. |
|
5027 |
] do:[ |
|
5028 |
d8image := Depth8Image new. |
|
5029 |
d8image fromImage:image. |
|
5030 |
]. |
|
5031 |
d8image notNil ifTrue:[ |
|
5032 |
image := d8image |
|
5033 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5034 |
]. |
1121 | 5035 |
(imageEditView image:image) notNil ifTrue:[ |
5036 |
self listOfColors contents:(image colorMap). |
|
5037 |
self findColorMapMode. |
|
5038 |
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
|
5039 |
] |
1121 | 5040 |
] |
5041 |
] |
|
990
4303f0064410
delay a second before grabbing screen image (to allow for redraws to happen)
Claus Gittinger <cg@exept.de>
parents:
986
diff
changeset
|
5042 |
afterSeconds:1 |
929 | 5043 |
|
5044 |
"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
|
5045 |
"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
|
5046 |
! |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5047 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5048 |
nextImageInSequence |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5049 |
"display the next image in the image sequence" |
1383 | 5050 |
|img seq frame listOfColors| |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5051 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5052 |
imageEditView releaseUndos. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5053 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5054 |
seq := self image imageSequence. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5055 |
imageSeqNr isNil ifTrue:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5056 |
imageSeqNr := 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5057 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5058 |
imageSeqNr := imageSeqNr + 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5059 |
imageSeqNr > seq size ifTrue:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5060 |
self information:'Back to first image in sequence'. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5061 |
imageSeqNr := 1. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5062 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5063 |
frame := seq at:imageSeqNr. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5064 |
imageEditView image:(frame image). |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5065 |
|
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5066 |
(img := self image) notNil ifTrue:[ |
1383 | 5067 |
listOfColors := self listOfColors. |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5068 |
img colorMap notNil ifTrue:[ |
1383 | 5069 |
listOfColors contents:(img usedColors asSet asOrderedCollection). |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5070 |
] ifFalse:[ |
1383 | 5071 |
listOfColors removeAll. |
1380
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5072 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5073 |
self findColorMapMode. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5074 |
self updateLabelsAndHistory. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5075 |
img := img onDevice:device. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5076 |
imageEditView image:img. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5077 |
] ifFalse:[ |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5078 |
self updateForNoImage |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5079 |
]. |
9787c42843c2
allow display and extract from image sequences (gif anims)
Claus Gittinger <cg@exept.de>
parents:
1377
diff
changeset
|
5080 |
|
400 | 5081 |
! ! |
5082 |
||
1715 | 5083 |
!ImageEditor methodsFor:'user actions-saving'! |
400 | 5084 |
|
767 | 5085 |
doPrint |
5086 |
"prints current image on the current printer" |
|
400 | 5087 |
|
1734 | 5088 |
self withWaitCursorDo:[ |
5089 |
imageEditView print |
|
5090 |
] |
|
400 | 5091 |
! |
5092 |
||
1613 | 5093 |
doSaveButtonImageToFileAs |
5094 |
"opens a dialog for saving current image to a file" |
|
5095 |
||
5096 |
imageEditView saveButtonImageToFileAs. |
|
5097 |
self updateLabelsAndHistory. |
|
5098 |
! |
|
5099 |
||
767 | 5100 |
doSaveImageFile |
5101 |
"saves current image to current file" |
|
400 | 5102 |
|
1481 | 5103 |
imageEditView save. |
400 | 5104 |
! |
5105 |
||
767 | 5106 |
doSaveImageFileAs |
1922 | 5107 |
"opens a dialog for saving an image to a file" |
5108 |
||
5109 |
|img file filters| |
|
5110 |
||
5111 |
img := self image. |
|
5112 |
img notNil ifTrue: [ |
|
5113 |
file := img fileName |
|
5114 |
]. |
|
5115 |
||
5116 |
filters := FileSelectionBrowser loadImageFileNameFilters. |
|
5117 |
||
5118 |
file notNil ifTrue:[ |
|
5119 |
file := FileSelectionBrowser |
|
5120 |
request:'Save Image To' |
|
5121 |
fileName:file |
|
5122 |
withFileFilters:filters. |
|
5123 |
] ifFalse:[ |
|
5124 |
file := FileSelectionBrowser |
|
5125 |
request:'Save Image To' |
|
5126 |
inDirectory:LastDirectory |
|
5127 |
withFileFilters:filters. |
|
5128 |
]. |
|
5129 |
file notNil ifTrue:[ |
|
5130 |
imageEditView saveImageFileAs:file. |
|
5131 |
LastDirectory := file asFilename directoryName. |
|
5132 |
self updateLabelsAndHistory. |
|
5133 |
] |
|
400 | 5134 |
! |
5135 |
||
767 | 5136 |
doSaveImageMaskFileAs |
5137 |
"opens a dialog for saving mask of current image to a file" |
|
400 | 5138 |
|
1481 | 5139 |
imageEditView saveImageMaskFileAs. |
400 | 5140 |
! |
5141 |
||
767 | 5142 |
doSaveMethod |
5143 |
"saves current image on current class and selector" |
|
400 | 5144 |
|
911 | 5145 |
imageEditView saveMethod notNil |
400 | 5146 |
ifTrue: |
5147 |
[ |
|
694 | 5148 |
self updateLabelsAndHistory |
400 | 5149 |
] |
5150 |
! |
|
5151 |
||
767 | 5152 |
doSaveMethodAs |
5153 |
"opens a dialog for saving current image on a class and a selector" |
|
400 | 5154 |
|
911 | 5155 |
imageEditView saveMethodAs notNil |
400 | 5156 |
ifTrue: |
5157 |
[ |
|
694 | 5158 |
self updateLabelsAndHistory |
400 | 5159 |
] |
1309
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5160 |
! |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5161 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5162 |
doShowStoreString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5163 |
"opens a dialog showing the storeString |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5164 |
(sometimes useful to embed an image into source code)" |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5165 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5166 |
|img| |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5167 |
|
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5168 |
img := imageEditView image. |
0a45ef81b47e
added showStoreString menu function
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
5169 |
TextBox openOn:img storeString |
400 | 5170 |
! ! |
5171 |
||
1715 | 5172 |
!ImageEditor methodsFor:'user actions-settings'! |
1353 | 5173 |
|
5174 |
doChangeGridMagnification |
|
5175 |
"change grid magnification" |
|
5176 |
||
5177 |
|box oldGridLimit newGridLimit| |
|
5178 |
||
5179 |
oldGridLimit := imageEditView class gridMagnificationLimit asPoint. |
|
5180 |
||
5181 |
box := EnterBox new. |
|
5182 |
box title:(resources string:'Grid Magnification Limit:'). |
|
5183 |
box okText:(resources string:'OK'). |
|
5184 |
box abortText:(resources string:'Cancel'). |
|
5185 |
box initialText:(oldGridLimit x printString). |
|
5186 |
box showAtPointer. |
|
5187 |
||
5188 |
(box accepted |
|
5189 |
and: [(newGridLimit := Number readFromString:(box contents) onError:[2]) notNil] |
|
5190 |
) ifTrue:[ |
|
5191 |
newGridLimit := (99 min: (2 max:newGridLimit)) asPoint. |
|
5192 |
imageEditView class gridMagnificationLimit:newGridLimit. |
|
5193 |
imageEditView invalidate |
|
5194 |
] |
|
5195 |
||
5196 |
! ! |
|
5197 |
||
400 | 5198 |
!ImageEditor class methodsFor:'documentation'! |
5199 |
||
5200 |
version |
|
5201 |
^ '$Header$' |
|
5202 |
! ! |