--- a/Rectangle.st Wed Oct 06 22:22:28 1999 +0200
+++ b/Rectangle.st Wed Oct 06 22:43:26 1999 +0200
@@ -238,7 +238,7 @@
!
bottom:aNumber
- "set the bottom edge"
+ "set the bottom edge - warning: destructive"
height := aNumber - top
!
@@ -278,7 +278,7 @@
!
corner:aPoint
- "set the bottom-right corner"
+ "set the bottom-right corner - warning: destructive"
width := aPoint x - left.
height := aPoint y - top
@@ -292,7 +292,8 @@
extent:aPoint
"set the extent from the argument, aPoint with width taken from aPoint x
- and height taken from aPoint y"
+ and height taken from aPoint y.
+ warning: destructive"
width := aPoint x.
height := aPoint y
@@ -306,7 +307,8 @@
height:aNumber
"change the height of the rectangle.
- logically, this changes the corner to get the given height."
+ logically, this changes the corner to get the given height.
+ warning: destructive"
height := aNumber
@@ -320,14 +322,15 @@
!
left:aNumber
- "set the left edge"
+ "set the left edge - warning: destructive"
width := width + (left - aNumber).
left := aNumber
!
left:newLeft right:right top:newTop bottom:bottom
- "set the rectangle given left, top, right and bottom coordinates."
+ "set the rectangle given left, top, right and bottom coordinates.
+ warning: destructive"
left := newLeft.
top := newTop.
@@ -336,7 +339,8 @@
!
left:newLeft top:newTop extent:extent
- "set the rectangle given left, top, coordinates and an extent"
+ "set the rectangle given left, top, coordinates and an extent.
+ warning: destructive"
left := newLeft.
top := newTop.
@@ -347,7 +351,8 @@
!
left:newLeft top:newTop right:right bottom:bottom
- "set the rectangle given left, top, right and bottom coordinates"
+ "set the rectangle given left, top, right and bottom coordinates.
+ warning: destructive"
left := newLeft.
top := newTop.
@@ -356,7 +361,8 @@
!
left:newLeft top:newTop width:newWidth height:newHeight
- "set the rectangle given left, top coordinates and width, height"
+ "set the rectangle given left, top coordinates and width, height.
+ warning: destructive"
left := newLeft.
top := newTop.
@@ -379,7 +385,8 @@
!
origin:aPoint
- "set the top-left origin. The corner remains unchanged."
+ "set the top-left origin. The corner remains unchanged.
+ warning: destructive"
|newTop newLeft|
@@ -392,7 +399,7 @@
!
origin:origin corner:corner
- "set both origin and corner"
+ "set both origin and corner - warning: destructive"
left := origin x.
top := origin y.
@@ -401,7 +408,7 @@
!
origin:origin extent:extent
- "set both origin and extent"
+ "set both origin and extent - warning: destructive"
left := origin x.
top := origin y.
@@ -411,7 +418,8 @@
origin:origin width:w height:h
"set both origin and extent;
- the extent is given as individual width and height"
+ the extent is given as individual width and height.
+ warning: destructive"
left := origin x.
top := origin y.
@@ -428,7 +436,7 @@
!
right:aNumber
- "set the right edge"
+ "set the right edge - warning: destructive"
width := aNumber - left
!
@@ -442,7 +450,7 @@
!
setLeft:newLeft
- "set left without adjusting width"
+ "set left without adjusting width - warning: destructive"
left := newLeft.
@@ -450,8 +458,14 @@
"Created: / 3.2.1998 / 19:01:06 / cg"
!
+setOrigin:newOrigin corner:newCorner
+ "set the rectangles dimensions - warning: destructive"
+
+ self origin:newOrigin corner:newCorner
+!
+
setTop:newTop
- "set top without adjusting height"
+ "set top without adjusting height - warning: destructive"
top := newTop.
@@ -466,7 +480,7 @@
!
top:aNumber
- "set the top edge"
+ "set the top edge - warning: destructive"
height := height + (top - aNumber).
top := aNumber
@@ -488,7 +502,8 @@
topLeft:aPoint
"Set the top and left edges.
- The bottom right remains unchanged."
+ The bottom right remains unchanged.
+ warning: destructive"
|newTop|
@@ -506,7 +521,8 @@
topRight:aPoint
"Set the top and right edges.
- The bottom left remains unchanged."
+ The bottom left remains unchanged.
+ warning: destructive"
|newTop|
@@ -524,7 +540,8 @@
width:aNumber
"change the width of the rectangle.
- logically, this changes the corner to get the given width."
+ logically, this changes the corner to get the given width.
+ warning: destructive"
width := aNumber
@@ -1551,5 +1568,5 @@
!Rectangle class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.59 1999-10-06 20:22:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.60 1999-10-06 20:43:26 cg Exp $'
! !