90 lines
1.9 KiB
Text
90 lines
1.9 KiB
Text
|
class:: Rect
|
||
|
summary:: Rectangle
|
||
|
categories:: Geometry
|
||
|
|
||
|
ClassMethods::
|
||
|
|
||
|
method::new
|
||
|
Return a new Rect with the given upper left corner and dimensions.
|
||
|
|
||
|
method::newSides
|
||
|
Return a new Rect with the given boundaries.
|
||
|
|
||
|
method::fromPoints
|
||
|
Return a new Rect defined by the given Points.
|
||
|
|
||
|
InstanceMethods::
|
||
|
|
||
|
method::left
|
||
|
Get or set the value of the boundary.
|
||
|
|
||
|
method::top
|
||
|
Get or set the value of the boundary.
|
||
|
|
||
|
method::right
|
||
|
Get the value of the boundary.
|
||
|
|
||
|
method::bottom
|
||
|
Get the value of the boundary.
|
||
|
|
||
|
method::set
|
||
|
Set the boundaries to the given values.
|
||
|
|
||
|
method::setExtent
|
||
|
Set the dimensions.
|
||
|
|
||
|
method::width
|
||
|
Set or get the width.
|
||
|
|
||
|
method::height
|
||
|
Set or get the height.
|
||
|
|
||
|
method::origin
|
||
|
Return the upper left corner as a Point.
|
||
|
|
||
|
method::extent
|
||
|
Return a Point whose x value is the height and whose y value is the width.
|
||
|
|
||
|
method::leftTop
|
||
|
Return the upper left corner as a Point.
|
||
|
|
||
|
method::rightTop
|
||
|
Return the upper right corner as a Point.
|
||
|
|
||
|
method::leftBottom
|
||
|
Return the lower left corner as a Point.
|
||
|
|
||
|
method::rightBottom
|
||
|
Return the lower right corner as a Point.
|
||
|
|
||
|
method::moveBy
|
||
|
Returns a new Rect which is offset by x and y.
|
||
|
|
||
|
method::moveTo
|
||
|
Returns a new Rect whose upper left corner is moved to (x, y).
|
||
|
|
||
|
method::moveToPoint
|
||
|
Returns a new Rect whose upper left corner is moved to aPoint.
|
||
|
|
||
|
method::resizeBy
|
||
|
Returns a new Rect whose dimensions have been changed by (x, y).
|
||
|
|
||
|
method::resizeTo
|
||
|
Returns a new Rect whose dimensions are (x, y).
|
||
|
|
||
|
method::insetBy
|
||
|
Returns a new Rect whose boundaries have been inset by (x, y). If only one argument is supplied, it will be used for both x and y.
|
||
|
|
||
|
method::insetAll
|
||
|
Returns a new Rect whose boundaries have been inset by the given amounts.
|
||
|
|
||
|
method::contains
|
||
|
Answers whether aPoint is in the receiver.
|
||
|
|
||
|
method::union, |
|
||
|
Returns a new Rect which contains the receiver and aRect.
|
||
|
|
||
|
method::sect, &
|
||
|
Returns a new Rect which is the intersection of the receiver and aRect.
|
||
|
|