ImageEditor.st
changeset 1558 3848cbaaf6d9
parent 1557 78409b670c85
child 1559 31c19f47395b
equal deleted inserted replaced
1557:78409b670c85 1558:3848cbaaf6d9
   954      ImageEditor open
   954      ImageEditor open
   955     "
   955     "
   956 
   956 
   957     <resource: #canvas>
   957     <resource: #canvas>
   958 
   958 
   959     ^
   959     ^ 
   960      
   960      #(#FullSpec
   961        #(#FullSpec
   961         #name: #windowSpec
   962           #window: 
   962         #window: 
   963            #(#WindowSpec
   963        #(#WindowSpec
   964               #name: 'Image Editor'
   964           #label: 'Image Editor'
   965               #layout: #(#LayoutFrame 507 0 28 0 1004 0 371 0)
   965           #name: 'Image Editor'
   966               #level: 0
   966           #min: #(#Point 400 320)
   967               #label: 'Image Editor'
   967           #bounds: #(#Rectangle 16 42 514 386)
   968               #min: #(#Point 400 320)
   968           #menu: #menu
   969               #bounds: #(#Rectangle 507 28 1005 372)
   969         )
   970               #menu: #menu
   970         #component: 
   971               #usePreferredExtent: false
   971        #(#SpecCollection
   972               #returnIsOKInDialog: true
   972           #collection: #(
   973               #escapeIsCancelInDialog: true
   973            #(#MenuPanelSpec
   974           )
   974               #name: 'menuToolbarView'
   975           #component: 
   975               #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
   976            #(#SpecCollection
   976               #menu: #menuToolbar
   977               #collection: 
   977               #style: #(#FontDescription #helvetica #medium #roman 10)
   978                #(
   978               #showSeparatingLines: true
   979                  #(#MenuPanelSpec
   979             )
   980                     #name: 'menuToolbarView'
   980            #(#VariableHorizontalPanelSpec
   981                     #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
   981               #name: 'variableHorizontalPanel1'
   982                     #menu: #menuToolbar
   982               #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
   983                     #style: #(#FontDescription #helvetica #medium #roman 10)
   983               #component: 
   984                     #showSeparatingLines: true
   984              #(#SpecCollection
   985                 )
   985                 #collection: #(
   986                  #(#VariableHorizontalPanelSpec
   986                  #(#ViewSpec
   987                     #name: 'variableHorizontalPanel1'
   987                     #name: 'view1'
   988                     #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
       
   989                     #component: 
   988                     #component: 
   990                      #(#SpecCollection
   989                    #(#SpecCollection
   991                         #collection: 
   990                       #collection: #(
   992                          #(
   991                        #(#VariableVerticalPanelSpec
   993                            #(#ViewSpec
   992                           #name: 'VariableVerticalPanel1'
   994                               #name: 'view1'
   993                           #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   995                               #component: 
   994                           #component: 
       
   995                          #(#SpecCollection
       
   996                             #collection: #(
       
   997                              #(#ViewSpec
       
   998                                 #name: 'View1'
       
   999                                 #component: 
   996                                #(#SpecCollection
  1000                                #(#SpecCollection
   997                                   #collection: 
  1001                                   #collection: #(
   998                                    #(
  1002                                    #(#MenuPanelSpec
   999                                      #(#VariableVerticalPanelSpec
  1003                                       #name: 'MouseButtonColorToolBar'
  1000                                         #name: 'VariableVerticalPanel1'
  1004                                       #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
  1001                                         #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
  1005                                       #menu: #menuMouseButtonColors
  1002                                         #component: 
  1006                                     )
  1003                                          #(#SpecCollection
  1007                                    #(#DataSetSpec
  1004                                             #collection: 
  1008                                       #name: 'colorDataSetView'
  1005                                              #(
  1009                                       #layout: #(#LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
  1006                                                #(#ViewSpec
  1010                                       #activeHelpKey: #colorMapTable
  1007                                                   #name: 'View1'
  1011                                       #model: #selectionOfColor
  1008                                                   #component: 
  1012                                       #menu: #colorMapMenu
  1009                                                    #(#SpecCollection
  1013                                       #style: #(#FontDescription #helvetica #medium #roman 10)
  1010                                                       #collection: 
  1014                                       #hasHorizontalScrollBar: true
  1011                                                        #(
  1015                                       #hasVerticalScrollBar: true
  1012                                                          #(#MenuPanelSpec
  1016                                       #miniScrollerHorizontal: true
  1013                                                             #name: 'MouseButtonColorToolBar'
  1017                                       #miniScrollerVertical: true
  1014                                                             #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
  1018                                       #dataList: #listOfColors
  1015                                                             #menu: #menuMouseButtonColors
  1019                                       #has3Dsepartors: true
  1016                                                         )
  1020                                       #has3Dseparators: true
  1017                                                          #(#DataSetSpec
  1021                                       #verticalSpacing: 1
  1018                                                             #name: 'colorDataSetView'
  1022                                       #columns: 
  1019                                                             #layout: #(#LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
  1023                                      #(#OrderedCollection
  1020                                                             #activeHelpKey: #colorMapTable
  1024                                         
  1021                                                             #model: #selectionOfColor
  1025                                        #(#DataSetColumnSpec
  1022                                                             #menu: #colorMapMenu
  1026                                           #labelButtonType: #Button
  1023                                                             #style: #(#FontDescription #helvetica #medium #roman 10)
  1027                                           #rendererType: #rowSelector
  1024                                                             #hasHorizontalScrollBar: true
  1028                                           #backgroundSelector: #theColorItSelf:
  1025                                                             #hasVerticalScrollBar: true
  1029                                         ) 
  1026                                                             #miniScrollerHorizontal: true
  1030                                        #(#DataSetColumnSpec
  1027                                                             #miniScrollerVertical: true
  1031                                           #label: 'R'
  1028                                                             #dataList: #listOfColors
  1032                                           #labelAlignment: #left
  1029                                                             #has3Dsepartors: true
  1033                                           #labelButtonType: #Button
  1030                                                             #has3Dseparators: true
  1034                                           #columnAlignment: #right
  1031                                                             #verticalSpacing: 1
  1035                                           #editorType: #InputField
  1032                                                             #columns: 
  1036                                           #type: #number
  1033                                                              #(
  1037                                           #model: #redFromColor:
  1034                                                                #(#DataSetColumnSpec
  1038                                           #writeSelector: #redAtColor:put:
  1035                                                                   #rendererType: #rowSelector
  1039                                           #selectSelector: #canSelectRedInColor:
  1036                                                                   #backgroundSelector: #theColorItSelf:
       
  1037                                                               )
       
  1038                                                                #(#DataSetColumnSpec
       
  1039                                                                   #label: 'R'
       
  1040                                                                   #labelAlignment: #left
       
  1041                                                                   #columnAlignment: #right
       
  1042                                                                   #editorType: #InputField
       
  1043                                                                   #type: #number
       
  1044                                                                   #model: #redFromColor:
       
  1045                                                                   #writeSelector: #redAtColor:put:
       
  1046                                                                   #selectSelector: #canSelectRedInColor:
       
  1047                                                               )
       
  1048                                                                #(#DataSetColumnSpec
       
  1049                                                                   #label: 'G'
       
  1050                                                                   #labelAlignment: #left
       
  1051                                                                   #columnAlignment: #right
       
  1052                                                                   #editorType: #InputField
       
  1053                                                                   #type: #number
       
  1054                                                                   #model: #greenFromColor:
       
  1055                                                                   #writeSelector: #greenAtColor:put:
       
  1056                                                                   #selectSelector: #canSelectGreenInColor:
       
  1057                                                               )
       
  1058                                                                #(#DataSetColumnSpec
       
  1059                                                                   #label: 'B'
       
  1060                                                                   #labelAlignment: #left
       
  1061                                                                   #columnAlignment: #right
       
  1062                                                                   #editorType: #InputField
       
  1063                                                                   #type: #number
       
  1064                                                                   #model: #blueFromColor:
       
  1065                                                                   #writeSelector: #blueAtColor:put:
       
  1066                                                                   #selectSelector: #canSelectBlueInColor:
       
  1067                                                               )
       
  1068                                                             )
       
  1069                                                             #columnAdaptor: #colorColumnAdaptor
       
  1070                                                         )
       
  1071                                                       )
       
  1072                                                   )
       
  1073                                               )
       
  1074                                                #(#ArbitraryComponentSpec
       
  1075                                                   #name: 'imagePreView'
       
  1076                                                   #activeHelpKey: #previewView
       
  1077                                                   #hasHorizontalScrollBar: true
       
  1078                                                   #hasVerticalScrollBar: true
       
  1079                                                   #miniScrollerHorizontal: true
       
  1080                                                   #miniScrollerVertical: true
       
  1081                                                   #component: #ImageView
       
  1082                                                   #hasBorder: false
       
  1083                                               )
       
  1084                                             )
       
  1085                                         )
  1040                                         )
  1086                                         #handles: #(#Any 0.723776 1.0)
  1041                                         
       
  1042                                        #(#DataSetColumnSpec
       
  1043                                           #label: 'G'
       
  1044                                           #labelAlignment: #left
       
  1045                                           #labelButtonType: #Button
       
  1046                                           #columnAlignment: #right
       
  1047                                           #editorType: #InputField
       
  1048                                           #type: #number
       
  1049                                           #model: #greenFromColor:
       
  1050                                           #writeSelector: #greenAtColor:put:
       
  1051                                           #selectSelector: #canSelectGreenInColor:
       
  1052                                         ) 
       
  1053                                        #(#DataSetColumnSpec
       
  1054                                           #label: 'B'
       
  1055                                           #labelAlignment: #left
       
  1056                                           #labelButtonType: #Button
       
  1057                                           #columnAlignment: #right
       
  1058                                           #editorType: #InputField
       
  1059                                           #type: #number
       
  1060                                           #model: #blueFromColor:
       
  1061                                           #writeSelector: #blueAtColor:put:
       
  1062                                           #selectSelector: #canSelectBlueInColor:
       
  1063                                         )
       
  1064                                       )
       
  1065                                       #columnAdaptor: #colorColumnAdaptor
  1087                                     )
  1066                                     )
  1088                                   )
  1067                                    )
       
  1068                                  
       
  1069                                 )
  1089                               )
  1070                               )
       
  1071                              #(#ArbitraryComponentSpec
       
  1072                                 #name: 'imagePreView'
       
  1073                                 #activeHelpKey: #previewView
       
  1074                                 #menu: #previewMenu
       
  1075                                 #hasHorizontalScrollBar: true
       
  1076                                 #hasVerticalScrollBar: true
       
  1077                                 #miniScrollerHorizontal: true
       
  1078                                 #miniScrollerVertical: true
       
  1079                                 #hasBorder: false
       
  1080                                 #component: #ImageView
       
  1081                               )
       
  1082                              )
       
  1083                            
  1090                           )
  1084                           )
  1091                            #(#ViewSpec
  1085                           #handles: #(#Any 0.723776 1.0)
  1092                               #name: 'view2'
       
  1093                               #level: -1
       
  1094                               #component: 
       
  1095                                #(#SpecCollection
       
  1096                                   #collection: 
       
  1097                                    #(
       
  1098                                      #(#ArbitraryComponentSpec
       
  1099                                         #name: 'imageEditView'
       
  1100                                         #layout: #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
       
  1101                                         #hasHorizontalScrollBar: true
       
  1102                                         #hasVerticalScrollBar: true
       
  1103                                         #component: #ImageEditView
       
  1104                                         #hasBorder: false
       
  1105                                     )
       
  1106                                      #(#LabelSpec
       
  1107                                         #name: 'coordLabel'
       
  1108                                         #layout: #(#LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
       
  1109                                         #level: -1
       
  1110                                         #labelChannel: #imageInfoHolder
       
  1111                                         #resizeForLabel: false
       
  1112                                         #adjust: #left
       
  1113                                     )
       
  1114                                      #(#ArrowButtonSpec
       
  1115                                         #name: 'magnifyDownButton'
       
  1116                                         #layout: #(#LayoutFrame -80 1 -22 1 -58 1 0 1)
       
  1117                                         #activeHelpKey: #magnifyImageDown
       
  1118                                         #model: #doMagnifyDown
       
  1119                                         #enableChannel: #imageIsLoaded
       
  1120                                         #isTriggerOnDown: true
       
  1121                                         #direction: #left
       
  1122                                     )
       
  1123                                      #(#ArrowButtonSpec
       
  1124                                         #name: 'magnifyUpButton'
       
  1125                                         #layout: #(#LayoutFrame -24 1 -22 1 -2 1 0 1)
       
  1126                                         #activeHelpKey: #magnifyImageUp
       
  1127                                         #model: #doMagnifyUp
       
  1128                                         #enableChannel: #imageIsLoaded
       
  1129                                         #isTriggerOnDown: true
       
  1130                                         #direction: #right
       
  1131                                     )
       
  1132                                      #(#InputFieldSpec
       
  1133                                         #name: 'magnificationInputField'
       
  1134                                         #layout: #(#LayoutFrame -57 1 -22 1 -26 1 0 1)
       
  1135                                         #activeHelpKey: #magnificationNumber
       
  1136                                         #enableChannel: #imageIsLoaded
       
  1137                                         #model: #valueOfMagnification
       
  1138                                         #type: #numberInRange
       
  1139                                         #acceptOnReturn: false
       
  1140                                         #acceptOnTab: false
       
  1141                                         #numChars: 2
       
  1142                                         #minValue: 1
       
  1143                                         #maxValue: 99
       
  1144                                     )
       
  1145                                   )
       
  1146                               )
       
  1147                           )
       
  1148                         )
  1086                         )
       
  1087                        )
       
  1088                      
  1149                     )
  1089                     )
  1150                     #handles: #(#Any 0.276 1.0)
  1090                   )
  1151                 )
  1091                  #(#ViewSpec
  1152                  #(#UISubSpecification
  1092                     #name: 'view2'
  1153                     #name: 'infoBarSubSpec'
  1093                     #level: -1
  1154                     #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
  1094                     #component: 
  1155                     #majorKey: #ToolApplicationModel
  1095                    #(#SpecCollection
  1156                     #minorKey: #windowSpecForInfoBar
  1096                       #collection: #(
  1157                 )
  1097                        #(#ArbitraryComponentSpec
       
  1098                           #name: 'imageEditView'
       
  1099                           #layout: #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
       
  1100                           #hasHorizontalScrollBar: true
       
  1101                           #hasVerticalScrollBar: true
       
  1102                           #hasBorder: false
       
  1103                           #component: #ImageEditView
       
  1104                         )
       
  1105                        #(#LabelSpec
       
  1106                           #name: 'coordLabel'
       
  1107                           #layout: #(#LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
       
  1108                           #level: -1
       
  1109                           #labelChannel: #imageInfoHolder
       
  1110                           #resizeForLabel: false
       
  1111                           #adjust: #left
       
  1112                         )
       
  1113                        #(#ArrowButtonSpec
       
  1114                           #name: 'magnifyDownButton'
       
  1115                           #layout: #(#LayoutFrame -80 1 -22 1 -58 1 0 1)
       
  1116                           #activeHelpKey: #magnifyImageDown
       
  1117                           #model: #doMagnifyDown
       
  1118                           #enableChannel: #imageIsLoaded
       
  1119                           #isTriggerOnDown: true
       
  1120                           #direction: #left
       
  1121                         )
       
  1122                        #(#ArrowButtonSpec
       
  1123                           #name: 'magnifyUpButton'
       
  1124                           #layout: #(#LayoutFrame -24 1 -22 1 -2 1 0 1)
       
  1125                           #activeHelpKey: #magnifyImageUp
       
  1126                           #model: #doMagnifyUp
       
  1127                           #enableChannel: #imageIsLoaded
       
  1128                           #isTriggerOnDown: true
       
  1129                           #direction: #right
       
  1130                         )
       
  1131                        #(#InputFieldSpec
       
  1132                           #name: 'magnificationInputField'
       
  1133                           #layout: #(#LayoutFrame -57 1 -22 1 -26 1 0 1)
       
  1134                           #activeHelpKey: #magnificationNumber
       
  1135                           #enableChannel: #imageIsLoaded
       
  1136                           #model: #valueOfMagnification
       
  1137                           #type: #numberInRange
       
  1138                           #acceptOnReturn: false
       
  1139                           #acceptOnTab: false
       
  1140                           #numChars: 2
       
  1141                           #minValue: 1
       
  1142                           #maxValue: 99
       
  1143                           #acceptOnPointerLeave: false
       
  1144                         )
       
  1145                        )
       
  1146                      
       
  1147                     )
       
  1148                   )
       
  1149                  )
       
  1150                
  1158               )
  1151               )
  1159           )
  1152               #handles: #(#Any 0.276 1.0)
       
  1153             )
       
  1154            #(#UISubSpecification
       
  1155               #name: 'infoBarSubSpec'
       
  1156               #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
       
  1157               #majorKey: #ToolApplicationModel
       
  1158               #minorKey: #windowSpecForInfoBar
       
  1159             )
       
  1160            )
       
  1161          
       
  1162         )
  1160       )
  1163       )
  1161 
       
  1162     "Modified: / 12.3.1999 / 00:15:05 / cg"
       
  1163 ! !
  1164 ! !
  1164 
  1165 
  1165 !ImageEditor class methodsFor:'menu specs'!
  1166 !ImageEditor class methodsFor:'menu specs'!
  1166 
  1167 
  1167 colorMapMenu
  1168 colorMapMenu
  1820           )
  1821           )
  1821          )
  1822          )
  1822         nil
  1823         nil
  1823         nil
  1824         nil
  1824       )
  1825       )
       
  1826 !
       
  1827 
       
  1828 previewMenu
       
  1829     "This resource specification was automatically generated
       
  1830      by the MenuEditor of ST/X."
       
  1831 
       
  1832     "Do not manually edit this!! If it is corrupted,
       
  1833      the MenuEditor may not be able to read the specification."
       
  1834 
       
  1835     "
       
  1836      MenuEditor new openOnClass:ImageEditor andSelector:#previewMenu
       
  1837      (Menu new fromLiteralArrayEncoding:(ImageEditor previewMenu)) startUp
       
  1838     "
       
  1839 
       
  1840     <resource: #menu>
       
  1841 
       
  1842     ^ 
       
  1843      #(#Menu
       
  1844         #(
       
  1845          #(#MenuItem
       
  1846             #label: 'TileMode'
       
  1847             #translateLabel: true
       
  1848             #indication: #tileModeHolder
       
  1849           )
       
  1850          )
       
  1851         nil
       
  1852         nil
       
  1853       )
  1825 ! !
  1854 ! !
  1826 
  1855 
  1827 !ImageEditor methodsFor:'accessing'!
  1856 !ImageEditor methodsFor:'accessing'!
  1828 
  1857 
  1829 image
  1858 image
  1973 
  2002 
  1974     |holder|
  2003     |holder|
  1975     (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
  2004     (holder := builder bindingAt:#selectionOfColor) isNil ifTrue:[
  1976         builder aspectAt:#selectionOfColor put:(
  2005         builder aspectAt:#selectionOfColor put:(
  1977         holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex).
  2006         holder := AspectAdaptor new subject:self; forAspect:#selectedColorIndex).
       
  2007     ].
       
  2008     ^ holder
       
  2009 !
       
  2010 
       
  2011 tileModeHolder
       
  2012     |holder|
       
  2013     (holder := builder bindingAt:#tileModeHolder) isNil ifTrue:[
       
  2014         builder aspectAt:#tileModeHolder put:(holder := false asValue).
       
  2015         holder addDependent:self.
  1978     ].
  2016     ].
  1979     ^ holder
  2017     ^ holder
  1980 !
  2018 !
  1981 
  2019 
  1982 valueOfMagnification
  2020 valueOfMagnification
  2033 
  2071 
  2034 update:something with:aParameter from:changedObject
  2072 update:something with:aParameter from:changedObject
  2035     |clrIndex img |
  2073     |clrIndex img |
  2036 
  2074 
  2037     img := self image.
  2075     img := self image.
       
  2076 
       
  2077     changedObject == self tileModeHolder ifTrue:[
       
  2078         self imagePreView tileMode:(changedObject value) tileOffset:(img extent).
       
  2079         self imagePreView clear; invalidate.
       
  2080         ^ self
       
  2081     ].
       
  2082 
  2038     changedObject == self listOfColors ifTrue:[
  2083     changedObject == self listOfColors ifTrue:[
  2039         something == #at: ifTrue:[
  2084         something == #at: ifTrue:[
  2040             "/ colormap entry changed at aParameter
  2085             "/ colormap entry changed at aParameter
  2041 
  2086 
  2042             clrIndex := aParameter.
  2087             clrIndex := aParameter.
  2063         ].
  2108         ].
  2064         something == #image ifTrue:[
  2109         something == #image ifTrue:[
  2065             self imagePreView image:img.
  2110             self imagePreView image:img.
  2066             self listOfColors contents:img colorMap.
  2111             self listOfColors contents:img colorMap.
  2067             self findColorMapMode.
  2112             self findColorMapMode.
       
  2113             self tileModeHolder value ifTrue:[
       
  2114                 self imagePreView tileMode:true tileOffset:(img extent).
       
  2115             ].
  2068             ^ self.
  2116             ^ self.
  2069         ].
  2117         ].
  2070         something == #subImageIn ifTrue:[
  2118         something == #subImageIn ifTrue:[
  2071             self imagePreView image ~~ img ifTrue:[
  2119             self imagePreView image ~~ img ifTrue:[
  2072                 self halt:'should not happen'.
  2120                 self halt:'should not happen'.
  2073             ].
  2121             ].
  2074             self imagePreView redraw:aParameter.
  2122             self tileModeHolder value ifTrue:[
       
  2123                 self imagePreView invalidate.
       
  2124             ] ifFalse:[
       
  2125                 self imagePreView invalidate:aParameter.
       
  2126             ].
  2075             ^ self.
  2127             ^ self.
  2076         ].
  2128         ].
  2077         something == #selectedColor ifTrue:[
  2129         something == #selectedColor ifTrue:[
  2078             (aParameter = (Color colorId:0)) ifTrue:[
  2130             (aParameter = (Color colorId:0)) ifTrue:[
  2079                 self halt.
  2131                 self halt.
  2367     ].
  2419     ].
  2368 
  2420 
  2369     ^mouseKeyColorMode
  2421     ^mouseKeyColorMode
  2370 
  2422 
  2371     "Modified: / 10.2.2000 / 23:16:42 / cg"
  2423     "Modified: / 10.2.2000 / 23:16:42 / cg"
       
  2424 ! !
       
  2425 
       
  2426 !ImageEditor methodsFor:'private'!
       
  2427 
       
  2428 updateImagePreView
       
  2429     self tileModeHolder value ifTrue:[
       
  2430         self imagePreView tileMode:true tileOffset:(self image extent).
       
  2431     ]
  2372 ! !
  2432 ! !
  2373 
  2433 
  2374 !ImageEditor methodsFor:'queries'!
  2434 !ImageEditor methodsFor:'queries'!
  2375 
  2435 
  2376 hasMask
  2436 hasMask
  3248     bindings at:#applyAction   put:[ gropAction value:left value:right value:top value:bottom ].
  3308     bindings at:#applyAction   put:[ gropAction value:left value:right value:top value:bottom ].
  3249 
  3309 
  3250     (self openDialogInterface:#gropDialogSpec withBindings:bindings) 
  3310     (self openDialogInterface:#gropDialogSpec withBindings:bindings) 
  3251     ifFalse:[ 
  3311     ifFalse:[ 
  3252         firstChange ~~ true ifTrue:[
  3312         firstChange ~~ true ifTrue:[
  3253           imageEditView undo
  3313             imageEditView undo.
       
  3314             self updateImagePreView.
  3254         ]
  3315         ]
  3255     ].
  3316     ].
  3256 
  3317 
  3257     "Created: / 7.9.1998 / 18:16:07 / cg"
  3318     "Created: / 7.9.1998 / 18:16:07 / cg"
  3258     "Modified: / 7.9.1998 / 18:20:42 / cg"
  3319     "Modified: / 7.9.1998 / 18:20:42 / cg"
  3402     (box accepted 
  3463     (box accepted 
  3403     and: [(newSize := Object readFromString:(box contents) onError:nil) notNil])
  3464     and: [(newSize := Object readFromString:(box contents) onError:nil) notNil])
  3404     ifTrue:[
  3465     ifTrue:[
  3405         imageEditView resizeImageTo:newSize.
  3466         imageEditView resizeImageTo:newSize.
  3406     ].
  3467     ].
  3407 
       
  3408 !
  3468 !
  3409 
  3469 
  3410 doRotateImage
  3470 doRotateImage
  3411     "rotates current image"
  3471     "rotates current image"
  3412 
  3472 
  3419     box initialText: '0'.
  3479     box initialText: '0'.
  3420     box showAtPointer.
  3480     box showAtPointer.
  3421     (box accepted and: [(rotation := Object readFromString: box contents onError:nil) notNil])
  3481     (box accepted and: [(rotation := Object readFromString: box contents onError:nil) notNil])
  3422     ifTrue:[
  3482     ifTrue:[
  3423         imageEditView rotateImageBy:rotation.
  3483         imageEditView rotateImageBy:rotation.
  3424         self updateInfoLabel
  3484         self updateInfoLabel.
  3425     ].
  3485     ].
  3426 !
  3486 !
  3427 
  3487 
  3428 doShiftManual
  3488 doShiftManual
  3429     "let user specify amount and shift"
  3489     "let user specify amount and shift"