Next: Rectangle-testing, Previous: Rectangle-printing, Up: Rectangle [Index]
Answer a Point so that if aRectangle is translated by that point, its origin lies within the receiver’s.
Answer the receiver’s area. The area is the width times the height, so it is possible for it to be negative if the rectangle is not normalized.
Answer a collection of rectangles containing the parts of the receiver outside of aRectangle. For all points in the receiver, but outside aRectangle, exactly one rectangle in the collection will contain that point.
Answer a new rectangle that is the receiver expanded by aValue: if aValue is a rectangle, calculate origin=origin-aValue origin, corner=corner+aValue corner; else calculate origin=origin-aValue, corner=corner+aValue.
Answer a new rectangle that is the receiver inset by aValue: if aValue is a rectangle, calculate origin=origin+aValue origin, corner=corner-aValue corner; else calculate origin=origin+aValue, corner=corner-aValue.
Answer a new rectangle that is the receiver inset so that origin=origin+originDelta, corner=corner-cornerDelta. The deltas can be points or numbers
Answers the rectangle (if any) created by the overlap of rectangles A and B. Answers nil if the rectangles do not overlap
Answer a new rectangle which is the smallest rectangle containing both the receiver and aRectangle.
Answer a copy of the receiver that does not extend beyond aRectangle.