checkin from browser
authorClaus Gittinger <cg@exept.de>
Tue, 21 May 1996 21:20:36 +0200
changeset 705 e8acdd90a071
parent 704 fc3711e83946
child 706 cec782b4edfe
checkin from browser
SimpleView.st
WTrans.st
WindowingTransformation.st
--- a/SimpleView.st	Tue May 21 21:09:26 1996 +0200
+++ b/SimpleView.st	Tue May 21 21:20:36 1996 +0200
@@ -5637,16 +5637,15 @@
      ih    "{ Class:SmallInteger }"
      orgX  
      orgY  "{ Class:SmallInteger }"
-     newOrigin t|
+     newOrigin|
 
     hCont := self heightOfContents.
     transformation isNil ifTrue:[
         orgY := orgX := 0
     ] ifFalse:[
         hCont := (transformation applyScaleY:hCont) rounded.
-        t := transformation translation.
-        orgY := t y negated.
-        orgX := t x negated.
+        orgY := transformation translationY negated.
+        orgX := transformation translationX negated.
     ].
 
     count := nPixels.
@@ -5687,7 +5686,7 @@
     ].
     self originChanged:(0 @ count).
 
-    "Modified: 21.5.1996 / 21:07:06 / cg"
+    "Modified: 21.5.1996 / 21:18:24 / cg"
 !
 
 scrollLeft:nPixels
@@ -5696,14 +5695,13 @@
     |count "{ Class:SmallInteger }"
      m2    "{ Class:SmallInteger }"
      h     "{ Class:SmallInteger }"
-     orgX orgY newOrigin t|
+     orgX orgY newOrigin|
 
     transformation isNil ifTrue:[
         orgY := orgX := 0
     ] ifFalse:[
-        t := transformation translation.
-        orgY := t y negated.
-        orgX := t x negated.
+        orgY := transformation translationY negated.
+        orgX := transformation translationX negated.
     ].
 
     count := nPixels.
@@ -5743,7 +5741,7 @@
     ].
     self originChanged:(count negated @ 0).
 
-    "Modified: 21.5.1996 / 21:07:37 / cg"
+    "Modified: 21.5.1996 / 21:18:38 / cg"
 !
 
 scrollRight:nPixels
@@ -5754,16 +5752,15 @@
      h     "{ Class:SmallInteger }" 
      wCont 
      iw    "{ Class:SmallInteger }"
-     orgX orgY newOrigin t|
+     orgX orgY newOrigin|
 
     wCont := self widthOfContents.
     transformation isNil ifTrue:[
         orgY := orgX := 0
     ] ifFalse:[
         wCont := (transformation applyScaleX:wCont) rounded.
-        t := transformation translation.
-        orgY := t y negated.
-        orgX := t x negated.
+        orgY := transformation translationY negated.
+        orgX := transformation translationX negated.
     ].
 
     count := nPixels.
@@ -5806,7 +5803,7 @@
     ].
     self originChanged:(count @ 0).
 
-    "Modified: 21.5.1996 / 21:07:52 / cg"
+    "Modified: 21.5.1996 / 21:18:46 / cg"
 !
 
 scrollTo:newOrigin 
@@ -5823,15 +5820,13 @@
      dY   "{ Class:SmallInteger }"
      m2   "{ Class:SmallInteger }"
      orgX "{ Class:SmallInteger }"
-     orgY "{ Class:SmallInteger }" 
-     t|
+     orgY "{ Class:SmallInteger }" |
 
     transformation isNil ifTrue:[
         orgY := orgX := 0
     ] ifFalse:[
-        t := transformation translation.
-        orgY := t y negated.
-        orgX := t x negated.
+        orgY := transformation translationY negated.
+        orgX := transformation translationX negated.
     ].
     dX := newOrigin x - orgX.
     dY := newOrigin y - orgY.
@@ -5863,7 +5858,7 @@
     ].
     self originChanged:(dX @ dY).
 
-    "Modified: 21.5.1996 / 21:08:05 / cg"
+    "Modified: 21.5.1996 / 21:18:58 / cg"
 !
 
 scrollUp:nPixels
@@ -5875,14 +5870,13 @@
      h     "{ Class:SmallInteger }"
      orgX
      orgY  "{ Class:SmallInteger }"
-     newOrigin t|
+     newOrigin|
 
     transformation isNil ifTrue:[
         orgY := orgX := 0
     ] ifFalse:[
-        t := transformation translation.
-        orgY := t y negated.
-        orgX := t x negated.
+        orgY := transformation translationY negated.
+        orgX := transformation translationX negated.
     ].
 
     count := nPixels.
@@ -5922,7 +5916,7 @@
     ].
     self originChanged:(0 @ count negated).
 
-    "Modified: 21.5.1996 / 21:08:19 / cg"
+    "Modified: 21.5.1996 / 21:19:06 / cg"
 ! !
 
 !SimpleView methodsFor:'startup'!
@@ -6336,6 +6330,6 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.91 1996-05-21 19:09:26 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.92 1996-05-21 19:19:58 cg Exp $'
 ! !
 SimpleView initialize!
--- a/WTrans.st	Tue May 21 21:09:26 1996 +0200
+++ b/WTrans.st	Tue May 21 21:20:36 1996 +0200
@@ -239,7 +239,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/WTrans.st,v 1.13 1996-04-27 17:52:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/WTrans.st,v 1.14 1996-05-21 19:20:36 cg Exp $'
 ! !
 
 !WindowingTransformation methodsFor:'accessing'!
@@ -283,6 +283,24 @@
     scale := nil
 !
 
+scaleX
+    "return the current x-scale of the receiver."
+
+    scale isNil ifTrue:[^ 1].
+    ^ scale x
+
+    "Created: 21.5.1996 / 21:13:49 / cg"
+!
+
+scaleY
+    "return the current x-scale of the receiver."
+
+    scale isNil ifTrue:[^ 1].
+    ^ scale y
+
+    "Created: 21.5.1996 / 21:13:59 / cg"
+!
+
 translation
     "return a copy of the receiver's translation."
 
@@ -298,6 +316,24 @@
     ] ifFalse:[
 	translation := aTranslation asPoint
     ]
+!
+
+translationX
+    "return the receiver's x-translation."
+
+    translation isNil ifTrue:[^ 0].
+    ^ translation x
+
+    "Created: 21.5.1996 / 21:13:10 / cg"
+!
+
+translationY
+    "return the receiver's x-translation."
+
+    translation isNil ifTrue:[^ 0].
+    ^ translation y
+
+    "Created: 21.5.1996 / 21:13:21 / cg"
 ! !
 
 !WindowingTransformation methodsFor:'applying transform'!
@@ -511,7 +547,10 @@
     "return true if the identity scale is in effect;
      return false, otherwise."
 
-    ^ scale == nil
+    scale isNil ifTrue:[^ true].
+    ^ scale x = 1 and:[scale y = 1]
+
+    "Modified: 21.5.1996 / 21:15:21 / cg"
 ! !
 
 !WindowingTransformation methodsFor:'transforming'!
--- a/WindowingTransformation.st	Tue May 21 21:09:26 1996 +0200
+++ b/WindowingTransformation.st	Tue May 21 21:20:36 1996 +0200
@@ -239,7 +239,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowingTransformation.st,v 1.13 1996-04-27 17:52:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowingTransformation.st,v 1.14 1996-05-21 19:20:36 cg Exp $'
 ! !
 
 !WindowingTransformation methodsFor:'accessing'!
@@ -283,6 +283,24 @@
     scale := nil
 !
 
+scaleX
+    "return the current x-scale of the receiver."
+
+    scale isNil ifTrue:[^ 1].
+    ^ scale x
+
+    "Created: 21.5.1996 / 21:13:49 / cg"
+!
+
+scaleY
+    "return the current x-scale of the receiver."
+
+    scale isNil ifTrue:[^ 1].
+    ^ scale y
+
+    "Created: 21.5.1996 / 21:13:59 / cg"
+!
+
 translation
     "return a copy of the receiver's translation."
 
@@ -298,6 +316,24 @@
     ] ifFalse:[
 	translation := aTranslation asPoint
     ]
+!
+
+translationX
+    "return the receiver's x-translation."
+
+    translation isNil ifTrue:[^ 0].
+    ^ translation x
+
+    "Created: 21.5.1996 / 21:13:10 / cg"
+!
+
+translationY
+    "return the receiver's x-translation."
+
+    translation isNil ifTrue:[^ 0].
+    ^ translation y
+
+    "Created: 21.5.1996 / 21:13:21 / cg"
 ! !
 
 !WindowingTransformation methodsFor:'applying transform'!
@@ -511,7 +547,10 @@
     "return true if the identity scale is in effect;
      return false, otherwise."
 
-    ^ scale == nil
+    scale isNil ifTrue:[^ true].
+    ^ scale x = 1 and:[scale y = 1]
+
+    "Modified: 21.5.1996 / 21:15:21 / cg"
 ! !
 
 !WindowingTransformation methodsFor:'transforming'!