Horizontal coordinate of some corner of the rect.
Vertical coordinate of some corner of the rect.
Width of the new rect. May be negative (see above).
Height of the new rect. May be negative (see above).
The unit of measure is typically pixels. (If used to model computer graphics, vertical coordinates are typically measured downwards from the top of the window. This convention however is not inherent in this object.)
Normally, the x
and y
parameters to the constructor describe the upper left corner of the rect.
However, negative values of width
and height
will be added to the given x
and y
. That is,
a negative value of the width
parameter will extend the rect to the left of the given x
and
a negative value of the height
parameter will extend the rect above the given y
.
In any case, after instantiation the following are guaranteed to always be true:
extent
, width
, and height
properties always give positive values.origin
, top
, and left
properties always reflect the upper left corner.corner
, bottom
, and right
properties always reflect the lower right corner.Note: This object should be instantiated with the new
keyword.
Area of this rect.
For exclusive, maximum horizontal coordinate of this rect + 1. For inclusive, maximum horizontal coordinate of this rect.
Height of this rect (always positive).
Minimum horizontal coordinate of this rect.
Minimum vertical coordinate of this rect.
Width of this rect (always positive).
Adjusts the selection to where it would be after a columns deletion.
true if selection changed, false if it was not changed or null if it should be fully deleted
Adjusts the selection to where it would be after a columns insertion.
true if selection changed
Adjusts the selection to where it would be after a rows deletion.
true if selection changed, false if it was not changed or null if it should be fully deleted
Adjusts the selection to where it would be after a rows insertion.
true if selection changed
Tests whether this rectangle contains a point
The point or rect to test for containment.
true if point is within rectangle
Grows this Rectangle in x direction with let staying fixed
Grows this Rectangle in y direction with top staying fixed
The rectangle to intersect with this rect.
true
iff this rect overlaps with given rect
.
Moves this Rectangle in x direction
Moves this Rectangle in y direction
(Formerly: insetBy
.)
Amount by which to increase (+) or decrease (-) this rect
That is enlarged/shrunk by given padding
.
The shrinkBy method.
Amount by which to decrease (+) or increase (-) this rect.
That is enlarged/shrunk by given padding
.
The growBy method.
The rectangle to union with this rect.
Bounding rect that contains both this rect and the given rect
.
Horizontal coordinate of the new rect.
A copy of this rect but with horizontal position reset to given x
and no width.
Vertical coordinate of the new rect.
A copy of this rect but with vertical position reset to given y
and no height.
Rectangle to test against this rect.
true
iff this
rect is entirely contained within given rect
.
This object represents a rectangular area within an abstract 2-dimensional matrix.