#UI_ENHANCEMENT by stefan
class: ImageEditView
changed: #cropLeft:right:top:bottom:
fix bad spelling
--- a/ImageEditView.st Tue May 10 10:12:51 2016 +0200
+++ b/ImageEditView.st Tue May 10 11:14:20 2016 +0200
@@ -966,7 +966,7 @@
cropLeft:doLeft right:doRight top:doTop bottom:doBottom
|yMinNew yMaxNew xMinNew xMaxNew
- pix stillCrobbing xMax yMax|
+ pix stillCropping xMax yMax|
xMax := image width - 1.
yMax := image height - 1.
@@ -974,17 +974,17 @@
xMinNew := 0.
doLeft ifTrue:[
pix := image pixelAtX:xMinNew y:0.
- stillCrobbing := true.
- [stillCrobbing] whileTrue:[
+ stillCropping := true.
+ [stillCropping] whileTrue:[
0 to:yMax do:[:y |
(image pixelAtX:xMinNew y:y) ~~ pix ifTrue:[
- stillCrobbing := false
+ stillCropping := false
]
].
- stillCrobbing ifTrue:[
+ stillCropping ifTrue:[
xMinNew := xMinNew + 1.
xMinNew >= image width ifTrue:[
- self warn:(resources string:'Image is all the same color - no crob.').
+ self warn:(resources string:'Image is all the same color - no crop.').
^ self
]
].
@@ -993,15 +993,15 @@
xMaxNew := xMax.
doRight ifTrue:[
- stillCrobbing := true.
+ stillCropping := true.
pix := image pixelAtX:xMaxNew y:0.
- [stillCrobbing] whileTrue:[
+ [stillCropping] whileTrue:[
0 to:yMax do:[:y |
(image pixelAtX:xMaxNew y:y) ~~ pix ifTrue:[
- stillCrobbing := false
+ stillCropping := false
]
].
- stillCrobbing ifTrue:[
+ stillCropping ifTrue:[
xMaxNew := xMaxNew - 1.
].
].
@@ -1010,14 +1010,14 @@
yMinNew := 0.
doTop ifTrue:[
pix := image pixelAtX:xMinNew y:yMinNew.
- stillCrobbing := true.
- [stillCrobbing] whileTrue:[
+ stillCropping := true.
+ [stillCropping] whileTrue:[
xMinNew to:xMaxNew do:[:x |
(image pixelAtX:x y:yMinNew) ~~ pix ifTrue:[
- stillCrobbing := false
+ stillCropping := false
]
].
- stillCrobbing ifTrue:[
+ stillCropping ifTrue:[
yMinNew := yMinNew + 1.
].
].
@@ -1025,15 +1025,15 @@
yMaxNew := yMax.
doRight ifTrue:[
- stillCrobbing := true.
+ stillCropping := true.
pix := image pixelAtX:xMaxNew y:yMaxNew.
- [stillCrobbing] whileTrue:[
+ [stillCropping] whileTrue:[
xMinNew to:xMaxNew do:[:x |
(image pixelAtX:x y:yMaxNew) ~~ pix ifTrue:[
- stillCrobbing := false
+ stillCropping := false
]
].
- stillCrobbing ifTrue:[
+ stillCropping ifTrue:[
yMaxNew := yMaxNew - 1.
].
].