--- a/Rectangle.st Sat Jan 25 17:28:47 1997 +0100
+++ b/Rectangle.st Sat Jan 25 17:30:37 1997 +0100
@@ -919,11 +919,47 @@
|amountPoint|
+ (aPoint isMemberOf:SmallInteger) ifTrue:[
+ "/ this is an stc optimization
+ ^ Rectangle
+ left:(left + amountPoint)
+ top:(top + amountPoint)
+ width:width
+ height:height
+ ].
+
amountPoint := aPoint asPoint.
^ Rectangle left:(left + amountPoint x)
- top:(top + amountPoint y)
- width:width
- height:height
+ top:(top + amountPoint y)
+ width:width
+ height:height
+
+ "Modified: 25.1.1997 / 17:29:53 / cg"
+!
+
+- aPoint
+ "return a new rectangle with same extent as receiver but
+ origin translated by the argument, aPoint"
+
+ |amountPoint|
+
+ (aPoint isMemberOf:SmallInteger) ifTrue:[
+ "/ this is an stc optimization
+ ^ Rectangle
+ left:(left - amountPoint)
+ top:(top - amountPoint)
+ width:width
+ height:height
+ ].
+
+ amountPoint := aPoint asPoint.
+ ^ Rectangle left:(left - amountPoint x)
+ top:(top - amountPoint y)
+ width:width
+ height:height
+
+ "Modified: 25.1.1997 / 17:29:53 / cg"
+ "Created: 25.1.1997 / 17:30:21 / cg"
!
align:offset with:someCoordinate
@@ -1402,5 +1438,5 @@
!Rectangle class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.47 1996-07-01 19:20:31 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.48 1997-01-25 16:30:37 cg Exp $'
! !