6174 ! |
6174 ! |
6175 |
6175 |
6176 doRotateImage |
6176 doRotateImage |
6177 "rotates current image" |
6177 "rotates current image" |
6178 |
6178 |
6179 |box rotation| |
6179 |rotationString box rotation| |
6180 |
6180 |
6181 box := EnterBox new. |
6181 rotationString := Dialog |
6182 box title:(resources string:'Rotate by (degrees, clockwise):'). |
6182 request:(resources string:'Rotate by (degrees, clockwise):') |
6183 box okText:(resources string:'OK'). |
6183 list:#( '-90' '90' '180' '45' '-45' '135' '-135' ) |
6184 box abortText:(resources string:'Cancel'). |
6184 initialAnswer:90. |
6185 box initialText: '0'. |
6185 rotationString isEmptyOrNil ifTrue:[^ self]. "/ cancelled |
6186 box showAtPointer. |
6186 rotation := Number readFrom:rotationString onError:[nil]. |
6187 (box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil]) |
6187 rotation isNil ifTrue:[^ self]. |
6188 ifTrue:[ |
6188 |
6189 imageEditView rotateImageBy:rotation. |
6189 "/ box := EnterBox new. |
6190 self updateInfoLabel. |
6190 "/ box title:(resources string:'Rotate by (degrees, clockwise):'). |
6191 ]. |
6191 "/ box okText:(resources string:'OK'). |
6192 |
6192 "/ box abortText:(resources string:'Cancel'). |
6193 "Modified: / 11-11-2007 / 13:21:11 / cg" |
6193 "/ box initialText: '0'. |
|
6194 "/ box showAtPointer. |
|
6195 "/ (box accepted and: [(rotation := Number readFromString: box contents onError:nil) notNil]) |
|
6196 "/ ifFalse:[ ^ self ]. |
|
6197 |
|
6198 imageEditView rotateImageBy:rotation. |
|
6199 self updateInfoLabel. |
|
6200 |
|
6201 "Modified: / 18-03-2012 / 14:41:14 / cg" |
6194 ! |
6202 ! |
6195 |
6203 |
6196 doShiftManual |
6204 doShiftManual |
6197 "let user specify amount and shift" |
6205 "let user specify amount and shift" |
6198 |
6206 |