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