--- a/ImageInspectorView.st Mon Sep 11 09:08:06 2017 +0200
+++ b/ImageInspectorView.st Mon Sep 11 09:11:40 2017 +0200
@@ -255,19 +255,34 @@
!
menuMagnification
- |mag|
+ "ask for and change the magnification (with optional smoothing)"
+
+ |mag smooth magImage|
+
+ smooth := false asValue.
- mag := Dialog
- request:'Magnify by:'
- initialAnswer:1
- list:#('0.5' '1' '2' '4' '8').
+ mag := (imageView image width / inspectedObject width).
+
+ Dialog withCheckBoxFor:smooth labelled:'Smooth' do:[
+ mag := Dialog
+ request:'Magnify by:'
+ initialAnswer:mag
+ list:#('0.25' '0.5' '1' '2' '4' '8').
+ ].
mag := Number readFrom:mag onError:[nil].
mag notNil ifTrue:[
- imageView image:(inspectedObject magnifiedBy:mag).
+ imageView withExecuteCursorDo:[
+ smooth value ifTrue:[
+ magImage := inspectedObject smoothingMagnifiedBy:mag
+ ] ifFalse:[
+ magImage := inspectedObject magnifiedBy:mag
+ ].
+ ].
+ imageView image:magImage.
]
"Created: / 28-05-2007 / 15:14:35 / cg"
- "Modified: / 30-10-2007 / 16:49:16 / cg"
+ "Modified: / 10-09-2017 / 12:30:56 / cg"
!
menuSetBackgroundColor:colorNameSymbol