|
rectangl Specification SheetPortable Object Compiler (c) 1997,98,99. All Rights Reserved.
RectangleInherits from: Object
Class DescriptionRectangle instances are pairs of Point objects. It is mostly Squeak and Stepstone ICpak101 compatible.
Method typesCreationMotionComparingInterrogation
ArithmeticPrintingMethodsnew+newReturns a new rectangle with origin and corner at (0,0).
origin:corner:+origin:pcorner:qReturns a new rectangle with origin and corner set to p and q.
origin:extent:+origin:pextent:q origin::corner::+origin:(int)x1:(int)y1corner:(int)x2:(int)y2 origin::extent::+origin:(int)x:(int)yextent:(int)w:(int)h free-freeFrees the origin and corner of the Point too.
origin:-origin:p corner:-corner:q origin:corner:-origin:pcorner:qSets origin and corner to p and q.
extent::-extent:(int)w:(int)h extent:-extent:q origin::-origin:(int)x1:(int)y1 corner::-corner:(int)x1:(int)y1 contains:- (BOOL)contains:aPointYes if inside, or on a border of, the rectangle.
hash- (unsigned)hash isEqual:- (BOOL)isEqual:aRectangleReturns YES if aRectangle is some kind of rectangle, and if corner and origin are equal.
left- (int)left right- (int)right top- (int)top bottom- (int)bottom width- (int)width height- (int)height origin-origin topLeft-topLeftSame as origin.
topRight-topRightAnswer the point at the top right corner of the receiver's top horizontal.
topCenter-topCenterAnswer the point at the center of the receiver's top horizontal.
corner-corner bottomLeft-bottomLeftReturns the point at the left edge of the bottom horizontal line of the receiver(or bottomLeft for short).
bottomCenter-bottomCenterAnswer the point at the center of the receiver's bottom horizontal.
bottomRight-bottomRightSame as corner.
center-centerReturn the point at the center of the receiver.
leftCenter-leftCenterReturn the point at the center of the receiver's left vertical line.
rightCenter-rightCenterReturn the point at the center of the receiver's left vertical line.
extent-extentReturn a new Point, set to the width and height of the rectangle.
quickMerge:-quickMerge:rectReturn the receiver if it encloses the given rectangle or the merge of the two rectangles if it doesn't. This method is an optimization to reduce extra rectangle creations.
moveBy:-moveBy:aPoint translateBy:-translateBy:pThis method is like moveBy:, but returns a new rectangle instead of modifying the receiver.
align:with:-align:p1with:p2Answer a rectangle that is translated by p2 - p1.
printOn:-printOn:(IOD)aFile |