--- a/ImageEditor.st Wed Jul 22 13:10:59 1998 +0200
+++ b/ImageEditor.st Wed Jul 22 13:18:55 1998 +0200
@@ -261,6 +261,9 @@
#previewView
'Shows preview of the image.'
+#settingsGridMagnification
+'Opens a dialog to change the grid magnification of the edit view.'
+
)
! !
@@ -416,11 +419,11 @@
#window:
#(#WindowSpec
#name: 'Image Editor'
- #layout: #(#LayoutFrame 167 0 330 0 666 0 675 0)
+ #layout: #(#LayoutFrame 145 0 147 0 644 0 492 0)
#label: 'Image Editor'
#min: #(#Point 400 320)
#max: #(#Point 1152 900)
- #bounds: #(#Rectangle 167 330 667 676)
+ #bounds: #(#Rectangle 145 147 645 493)
#menu: #menu
#usePreferredExtent: false
)
@@ -479,6 +482,7 @@
#level: -1
#dataList: #listOfColors
#has3Dsepartors: true
+ #has3Dseparators: true
#verticalSpacing: 1
#columns:
#(
@@ -571,10 +575,12 @@
#activeHelpKey: #magnificationNumber
#enableChannel: #imageIsLoaded
#model: #valueOfMagnification
- #type: #number
+ #type: #numberInRange
#acceptOnReturn: false
#acceptOnTab: false
#numChars: 2
+ #minValue: 1
+ #maxValue: 99
)
)
)
@@ -855,6 +861,15 @@
#(
#(#MenuItem
+ #label: 'Grid Magnification...'
+ #translateLabel: true
+ #value: #doChangeGridMagnification
+ #activeHelpKey: #settingsGridMagnification
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
#label: 'Fonts'
#translateLabel: true
#submenuChannel: #menuFont
@@ -1401,8 +1416,8 @@
magnification: aValue
"sets the magnification of the image"
- |magnification|
- magnification := aValue asInteger asPoint.
+ |magnification|
+ magnification := (aValue ? 1) asPoint.
(magnification = self imageEditView magnification or: [magnification = (0@0)]) ifTrue: [^nil].
self imageEditView magnification: magnification
!
@@ -1456,6 +1471,12 @@
SystemBrowser openInClass: (Smalltalk at: self imageEditView resourceClass ifAbsent: [^nil]) class selector: self imageEditView resourceSelector
!
+doChangeGridMagnification
+ "change grid magnification"
+
+ self imageEditView changeGridMagnification
+!
+
doFlipHorizontal
"flips horizontally current image"