rectangl Specification Sheet
Portable Object Compiler (c) 1997. All Rights Reserved.
Rectangle
Inherits from: Object
Class Description
Rectangle instances are pairs of Point objects. It is mostly Squeak and Stepstone ICpak101 compatible.
Method types
Creation
Motion
Comparing
Interrogation
Arithmetic
Printing
Methods
+new
Returns a new rectangle with origin and corner at (0,0).
+origin:pcorner:q
Returns a new rectangle with origin and corner set to p and q.
+origin:pextent:q
+origin:(int)x1:(int)y1corner:(int)x2:(int)y2
+origin:(int)x:(int)yextent:(int)w:(int)h
-free
Frees the origin and corner of the Point too.
-origin:p
-corner:q
-origin:pcorner:q
Sets origin and corner to p and q.
-extent:(int)w:(int)h
-extent:q
-origin:(int)x1:(int)y1
-corner:(int)x1:(int)y1
- (BOOL)contains:aPoint
Yes if inside, or on a border of, the rectangle.
- (unsigned)hash
- (BOOL)isEqual:aRectangle
Returns YES if aRectangle is some kind of rectangle, and if corner and origin are equal.
- (int)left
- (int)right
- (int)top
- (int)bottom
- (int)width
- (int)height
-origin
-corner
-moveBy:aPoint
-printOn:(IOD)aFile