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 largely ICpak101 compatible. For concepts such as left, top, bottom etc. it is assumed that the origin has smaller x and y coordinates than corner. Unlike ICpak101, this is not enforced, and negative values for height, width etc. are allowed.
Method types
Creation
Interrogation
Comparing
Arithmetic
Printing
Methods
+new
Returns a new rectangle with origin and corner at (0,0).
-origin:pcorner:q
Sets origin and corner to p and q.
+origin:pcorner:q
Returns a new rectangle with origin and corner set to p and q.
-free
Frees the origin and corner of the Point too.
- (int)left
- (int)right
- (int)top
- (int)bottom
- (int)width
- (int)height
-origin
-corner
- (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.
-moveBy:aPoint
-printOn:(IOD)aFile