2362N/A * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * A <code>Rectangle</code> specifies an area in a coordinate space that is 0N/A * enclosed by the <code>Rectangle</code> object's upper-left point 0N/A * in the coordinate space, its width, and its height. 0N/A * A <code>Rectangle</code> object's <code>width</code> and 0N/A * <code>height</code> are <code>public</code> fields. The constructors 0N/A * that create a <code>Rectangle</code>, and the methods that can modify 0N/A * one, do not prevent setting a negative value for width or height. 0N/A * A {@code Rectangle} whose width or height is exactly zero has location 0N/A * along those axes with zero dimension, but is otherwise considered empty. 0N/A * The {@link #isEmpty} method will return true for such a {@code Rectangle}. 0N/A * Methods which test if an empty {@code Rectangle} contains or intersects 0N/A * a point or rectangle will always return false if either dimension is zero. 0N/A * Methods which combine such a {@code Rectangle} with a point or rectangle 0N/A * will include the location of the {@code Rectangle} on that axis in the 0N/A * result as if the {@link #add(Point)} method were being called. 0N/A * <a name="NonExistant"> 0N/A * A {@code Rectangle} whose width or height is negative has neither 0N/A * location nor dimension along those axes with negative dimensions. 0N/A * Such a {@code Rectangle} is treated as non-existant along those axes. 0N/A * Such a {@code Rectangle} is also empty with respect to containment 0N/A * calculations and methods which test if it contains or intersects a 0N/A * point or rectangle will always return false. 0N/A * Methods which combine such a {@code Rectangle} with a point or rectangle 0N/A * will ignore the {@code Rectangle} entirely in generating the result. 0N/A * If two {@code Rectangle} objects are combined and each has a negative 0N/A * dimension, the result will have at least one negative dimension. 0N/A * Methods which affect only the location of a {@code Rectangle} will 0N/A * operate on its location regardless of whether or not it has a negative 0N/A * or zero dimension along either axis. 0N/A * Note that a {@code Rectangle} constructed with the default no-argument 0N/A * constructor will have dimensions of {@code 0x0} and therefore be empty. 0N/A * That {@code Rectangle} will still have a location of {@code (0,0)} and 0N/A * will contribute that location to the union and add operations. 0N/A * Code attempting to accumulate the bounds of a set of points should 0N/A * therefore initially construct the {@code Rectangle} with a specifically 0N/A * negative width and height or it should use the first point in the set 0N/A * to construct the {@code Rectangle}. 0N/A * Rectangle bounds = new Rectangle(0, 0, -1, -1); 0N/A * for (int i = 0; i < points.length; i++) { 0N/A * bounds.add(points[i]); 0N/A * or if we know that the points array contains at least one point: 0N/A * Rectangle bounds = new Rectangle(points[0]); 0N/A * for (int i = 1; i < points.length; i++) { 0N/A * bounds.add(points[i]); 0N/A * This class uses 32-bit integers to store its location and dimensions. 0N/A * Frequently operations may produce a result that exceeds the range of 0N/A * The methods will calculate their results in a way that avoids any 0N/A * 32-bit overflow for intermediate results and then choose the best 0N/A * representation to store the final results back into the 32-bit fields 0N/A * which hold the location and dimensions. 0N/A * The location of the result will be stored into the {@link #x} and 0N/A * {@link #y} fields by clipping the true result to the nearest 32-bit value. 0N/A * The values stored into the {@link #width} and {@link #height} dimension 0N/A * fields will be chosen as the 32-bit values that encompass the largest 0N/A * part of the true result as possible. 0N/A * Generally this means that the dimension will be clipped independently 0N/A * to the range of 32-bit integers except that if the location had to be 0N/A * moved to store it into its pair of 32-bit fields then the dimensions 0N/A * will be adjusted relative to the "best representation" of the location. 0N/A * If the true result had a negative dimension and was therefore 0N/A * non-existant along one or both axes, the stored dimensions will be 0N/A * negative numbers in those axes. 0N/A * If the true result had a location that could be represented within 0N/A * the range of 32-bit integers, but zero dimension along one or both 0N/A * axes, then the stored dimensions will be zero in those axes. 0N/A * @author Sami Shaio 0N/A * The X coordinate of the upper-left corner of the <code>Rectangle</code>. 0N/A * @see #setLocation(int, int) 0N/A * @see #getLocation() 0N/A * The Y coordinate of the upper-left corner of the <code>Rectangle</code>. 0N/A * @see #setLocation(int, int) 0N/A * @see #getLocation() 0N/A * The width of the <code>Rectangle</code>. 0N/A * @see #setSize(int, int) 0N/A * The height of the <code>Rectangle</code>. 0N/A * @see #setSize(int, int) 0N/A * JDK 1.1 serialVersionUID 0N/A * Initialize JNI field and method IDs 0N/A /* ensure that the necessary native libraries are loaded */ 0N/A * Constructs a new <code>Rectangle</code> whose upper-left corner 0N/A * is at (0, 0) in the coordinate space, and whose width and 0N/A * height are both zero. 0N/A * Constructs a new <code>Rectangle</code>, initialized to match 0N/A * the values of the specified <code>Rectangle</code>. 0N/A * @param r the <code>Rectangle</code> from which to copy initial values 0N/A * to a newly constructed <code>Rectangle</code> 0N/A * Constructs a new <code>Rectangle</code> whose upper-left corner is 0N/A * {@code (x,y)} and whose width and height 0N/A * are specified by the arguments of the same name. 0N/A * @param x the specified X coordinate 0N/A * @param y the specified Y coordinate 0N/A * @param width the width of the <code>Rectangle</code> 0N/A * @param height the height of the <code>Rectangle</code> 0N/A * Constructs a new <code>Rectangle</code> whose upper-left corner 0N/A * is at (0, 0) in the coordinate space, and whose width and 0N/A * height are specified by the arguments of the same name. 0N/A * @param width the width of the <code>Rectangle</code> 0N/A * @param height the height of the <code>Rectangle</code> 0N/A * Constructs a new <code>Rectangle</code> whose upper-left corner is 0N/A * specified by the {@link Point} argument, and 0N/A * whose width and height are specified by the 0N/A * {@link Dimension} argument. 0N/A * @param p a <code>Point</code> that is the upper-left corner of 0N/A * the <code>Rectangle</code> 0N/A * @param d a <code>Dimension</code>, representing the 0N/A * width and height of the <code>Rectangle</code> 0N/A * Constructs a new <code>Rectangle</code> whose upper-left corner is the 0N/A * specified <code>Point</code>, and whose width and height are both zero. 0N/A * @param p a <code>Point</code> that is the top left corner 0N/A * of the <code>Rectangle</code> 0N/A this(p.x, p.y,
0,
0);
0N/A * Constructs a new <code>Rectangle</code> whose top left corner is 0N/A * (0, 0) and whose width and height are specified 0N/A * by the <code>Dimension</code> argument. 0N/A * @param d a <code>Dimension</code>, specifying width and height 0N/A * Returns the X coordinate of the bounding <code>Rectangle</code> in 0N/A * <code>double</code> precision. 0N/A * @return the X coordinate of the bounding <code>Rectangle</code>. 0N/A * Returns the Y coordinate of the bounding <code>Rectangle</code> in 0N/A * <code>double</code> precision. 1067N/A * @return the Y coordinate of the bounding <code>Rectangle</code>. 0N/A * Returns the width of the bounding <code>Rectangle</code> in 0N/A * <code>double</code> precision. 0N/A * @return the width of the bounding <code>Rectangle</code>. 0N/A * Returns the height of the bounding <code>Rectangle</code> in 0N/A * <code>double</code> precision. 0N/A * @return the height of the bounding <code>Rectangle</code>. 0N/A * Gets the bounding <code>Rectangle</code> of this <code>Rectangle</code>. 0N/A * This method is included for completeness, to parallel the 0N/A * <code>getBounds</code> method of 0N/A * {@link Component}. 0N/A * @return a new <code>Rectangle</code>, equal to the 0N/A * bounding <code>Rectangle</code> for this <code>Rectangle</code>. 0N/A * @see java.awt.Component#getBounds 0N/A * @see #setBounds(Rectangle) 0N/A * @see #setBounds(int, int, int, int) 0N/A * Sets the bounding <code>Rectangle</code> of this <code>Rectangle</code> 0N/A * to match the specified <code>Rectangle</code>. 0N/A * This method is included for completeness, to parallel the 0N/A * <code>setBounds</code> method of <code>Component</code>. 0N/A * @param r the specified <code>Rectangle</code> 0N/A * @see java.awt.Component#setBounds(java.awt.Rectangle) 0N/A * Sets the bounding <code>Rectangle</code> of this 0N/A * <code>Rectangle</code> to the specified 0N/A * <code>x</code>, <code>y</code>, <code>width</code>, 0N/A * and <code>height</code>. 0N/A * This method is included for completeness, to parallel the 0N/A * <code>setBounds</code> method of <code>Component</code>. 0N/A * @param x the new X coordinate for the upper-left 0N/A * corner of this <code>Rectangle</code> 0N/A * @param y the new Y coordinate for the upper-left 0N/A * corner of this <code>Rectangle</code> 0N/A * @param width the new width for this <code>Rectangle</code> 0N/A * @param height the new height for this <code>Rectangle</code> 0N/A * @see java.awt.Component#setBounds(int, int, int, int) 0N/A * Sets the bounds of this {@code Rectangle} to the integer bounds 0N/A * which encompass the specified {@code x}, {@code y}, {@code width}, 0N/A * and {@code height}. 0N/A * If the parameters specify a {@code Rectangle} that exceeds the 0N/A * maximum range of integers, the result will be the best 0N/A * representation of the specified {@code Rectangle} intersected 0N/A * with the maximum integer bounds. 0N/A * @param x the X coordinate of the upper-left corner of 0N/A * the specified rectangle 0N/A * @param y the Y coordinate of the upper-left corner of 0N/A * the specified rectangle 0N/A * @param width the width of the specified rectangle 0N/A * @param height the new height of the specified rectangle 0N/A // Too far in positive X direction to represent... 0N/A // We cannot even reach the left side of the specified 0N/A // rectangle even with both x & width set to MAX_VALUE. 0N/A // The intersection with the "maximal integer rectangle" 0N/A // is non-existant so we should use a width < 0. 0N/A // REMIND: Should we try to determine a more "meaningful" 0N/A // adjusted value for neww than just "-1"? // Too far in positive Y direction to represent... // Return best integer representation for v, clipped to integer // range and floor-ed or ceiling-ed, depending on the boolean. private static int clip(
double v,
boolean doceil) {
* Sets the bounding <code>Rectangle</code> of this * <code>Rectangle</code> to the specified * <code>x</code>, <code>y</code>, <code>width</code>, * and <code>height</code>. * @param x the new X coordinate for the upper-left * corner of this <code>Rectangle</code> * @param y the new Y coordinate for the upper-left * corner of this <code>Rectangle</code> * @param width the new width for this <code>Rectangle</code> * @param height the new height for this <code>Rectangle</code> * @deprecated As of JDK version 1.1, * replaced by <code>setBounds(int, int, int, int)</code>. * Returns the location of this <code>Rectangle</code>. * This method is included for completeness, to parallel the * <code>getLocation</code> method of <code>Component</code>. * @return the <code>Point</code> that is the upper-left corner of * this <code>Rectangle</code>. * @see java.awt.Component#getLocation * @see #setLocation(Point) * @see #setLocation(int, int) * Moves this <code>Rectangle</code> to the specified location. * This method is included for completeness, to parallel the * <code>setLocation</code> method of <code>Component</code>. * @param p the <code>Point</code> specifying the new location * for this <code>Rectangle</code> * @see java.awt.Component#setLocation(java.awt.Point) * Moves this <code>Rectangle</code> to the specified location. * This method is included for completeness, to parallel the * <code>setLocation</code> method of <code>Component</code>. * @param x the X coordinate of the new location * @param y the Y coordinate of the new location * @see java.awt.Component#setLocation(int, int) * Moves this <code>Rectangle</code> to the specified location. * @param x the X coordinate of the new location * @param y the Y coordinate of the new location * @deprecated As of JDK version 1.1, * replaced by <code>setLocation(int, int)</code>. public void move(
int x,
int y) {
* Translates this <code>Rectangle</code> the indicated distance, * to the right along the X coordinate axis, and * downward along the Y coordinate axis. * @param dx the distance to move this <code>Rectangle</code> * @param dy the distance to move this <code>Rectangle</code> * @see java.awt.Rectangle#setLocation(int, int) * @see java.awt.Rectangle#setLocation(java.awt.Point) // Only adjust width if it was valid (>= 0). // The right edge is now conceptually at // newv+width, but we may move newv to prevent // overflow. But we want the right edge to // remain at its new location in spite of the // clipping. Think of the following adjustment // conceptually the same as: // width += newv; newv = MIN_VALUE; width -= newv; // width may go negative if the right edge went past // MIN_VALUE, but it cannot overflow since it cannot // have moved more than MIN_VALUE and any non-negative // number + MIN_VALUE does not overflow. // moving rightward (or staying still) // Conceptually the same as: // width += newv; newv = MAX_VALUE; width -= newv; // With large widths and large displacements // we may overflow so we need to check it. // See above comment about no overflow in this case // moving downward (or staying still) * Gets the size of this <code>Rectangle</code>, represented by * the returned <code>Dimension</code>. * This method is included for completeness, to parallel the * <code>getSize</code> method of <code>Component</code>. * @return a <code>Dimension</code>, representing the size of * this <code>Rectangle</code>. * @see java.awt.Component#getSize * @see #setSize(Dimension) * @see #setSize(int, int) * Sets the size of this <code>Rectangle</code> to match the * specified <code>Dimension</code>. * This method is included for completeness, to parallel the * <code>setSize</code> method of <code>Component</code>. * @param d the new size for the <code>Dimension</code> object * @see java.awt.Component#setSize(java.awt.Dimension) * Sets the size of this <code>Rectangle</code> to the specified * This method is included for completeness, to parallel the * <code>setSize</code> method of <code>Component</code>. * @param width the new width for this <code>Rectangle</code> * @param height the new height for this <code>Rectangle</code> * @see java.awt.Component#setSize(int, int) * Sets the size of this <code>Rectangle</code> to the specified * @param width the new width for this <code>Rectangle</code> * @param height the new height for this <code>Rectangle</code> * @deprecated As of JDK version 1.1, * replaced by <code>setSize(int, int)</code>. * Checks whether or not this <code>Rectangle</code> contains the * specified <code>Point</code>. * @param p the <code>Point</code> to test * @return <code>true</code> if the specified <code>Point</code> * is inside this <code>Rectangle</code>; * <code>false</code> otherwise. * Checks whether or not this <code>Rectangle</code> contains the * point at the specified location {@code (x,y)}. * @param x the specified X coordinate * @param y the specified Y coordinate * @return <code>true</code> if the point * {@code (x,y)} is inside this * <code>Rectangle</code>; * <code>false</code> otherwise. * Checks whether or not this <code>Rectangle</code> entirely contains * the specified <code>Rectangle</code>. * @param r the specified <code>Rectangle</code> * @return <code>true</code> if the <code>Rectangle</code> * is contained entirely inside this <code>Rectangle</code>; * <code>false</code> otherwise * Checks whether this <code>Rectangle</code> entirely contains * the <code>Rectangle</code> * at the specified location {@code (X,Y)} with the * specified dimensions {@code (W,H)}. * @param X the specified X coordinate * @param Y the specified Y coordinate * @param W the width of the <code>Rectangle</code> * @param H the height of the <code>Rectangle</code> * @return <code>true</code> if the <code>Rectangle</code> specified by * is entirely enclosed inside this <code>Rectangle</code>; * <code>false</code> otherwise. public boolean contains(
int X,
int Y,
int W,
int H) {
if ((w | h | W | H) <
0) {
// At least one of the dimensions is negative... // Note: if any dimension is zero, tests below must return false... // X+W overflowed or W was zero, return false if... // either original w or W was zero or // x+w did not overflow or // the overflowed x+w is smaller than the overflowed X+W if (w >= x || W > w)
return false;
// X+W did not overflow and W was not zero, return false if... // original w was zero or // x+w did not overflow and x+w is smaller than X+W if (w >= x && W > w)
return false;
if (h >= y || H > h)
return false;
if (h >= y && H > h)
return false;
* Checks whether or not this <code>Rectangle</code> contains the * point at the specified location {@code (X,Y)}. * @param X the specified X coordinate * @param Y the specified Y coordinate * @return <code>true</code> if the point * {@code (X,Y)} is inside this * <code>Rectangle</code>; * <code>false</code> otherwise. * @deprecated As of JDK version 1.1, * replaced by <code>contains(int, int)</code>. public boolean inside(
int X,
int Y) {
// At least one of the dimensions is negative... // Note: if either dimension is zero, tests below must return false... return ((w < x || w > X) &&
* Determines whether or not this <code>Rectangle</code> and the specified * <code>Rectangle</code> intersect. Two rectangles intersect if * their intersection is nonempty. * @param r the specified <code>Rectangle</code> * @return <code>true</code> if the specified <code>Rectangle</code> * and this <code>Rectangle</code> intersect; * <code>false</code> otherwise. if (
rw <=
0 ||
rh <=
0 ||
tw <=
0 ||
th <=
0) {
* Computes the intersection of this <code>Rectangle</code> with the * specified <code>Rectangle</code>. Returns a new <code>Rectangle</code> * that represents the intersection of the two rectangles. * If the two rectangles do not intersect, the result will be * @param r the specified <code>Rectangle</code> * @return the largest <code>Rectangle</code> contained in both the * specified <code>Rectangle</code> and in * this <code>Rectangle</code>; or if the rectangles * do not intersect, an empty rectangle. // tx2,ty2 will never overflow (they will never be // larger than the smallest of the two source w,h) // they might underflow, though... * Computes the union of this <code>Rectangle</code> with the * specified <code>Rectangle</code>. Returns a new * <code>Rectangle</code> that * represents the union of the two rectangles. * If either {@code Rectangle} has any dimension less than zero * the rules for <a href=#NonExistant>non-existant</a> rectangles * If only one has a dimension less than zero, then the result * will be a copy of the other {@code Rectangle}. * If both have dimension less than zero, then the result will * have at least one dimension less than zero. * If the resulting {@code Rectangle} would have a dimension * too large to be expressed as an {@code int}, the result * will have a dimension of {@code Integer.MAX_VALUE} along * @param r the specified <code>Rectangle</code> * @return the smallest <code>Rectangle</code> containing both * the specified <code>Rectangle</code> and this * <code>Rectangle</code>. // This rectangle has negative dimensions... // If r has non-negative dimensions then it is the answer. // If r is non-existant (has a negative dimension), then both // are non-existant and we can return any non-existant rectangle // as an answer. Thus, returning r meets that criterion. // Either way, r is our answer. // tx2,ty2 will never underflow since both original rectangles // were already proven to be non-empty // they might overflow, though... * Adds a point, specified by the integer arguments {@code newx,newy} * to the bounds of this {@code Rectangle}. * If this {@code Rectangle} has any dimension less than zero, * the rules for <a href=#NonExistant>non-existant</a> * In that case, the new bounds of this {@code Rectangle} will * have a location equal to the specified coordinates and * width and height equal to zero. * After adding a point, a call to <code>contains</code> with the * added point as an argument does not necessarily return * <code>true</code>. The <code>contains</code> method does not * return <code>true</code> for points on the right or bottom * edges of a <code>Rectangle</code>. Therefore, if the added point * falls on the right or bottom edge of the enlarged * <code>Rectangle</code>, <code>contains</code> returns * <code>false</code> for that point. * If the specified point must be contained within the new * {@code Rectangle}, a 1x1 rectangle should be added instead: * r.add(newx, newy, 1, 1); * @param newx the X coordinate of the new point * @param newy the Y coordinate of the new point * Adds the specified {@code Point} to the bounds of this * If this {@code Rectangle} has any dimension less than zero, * the rules for <a href=#NonExistant>non-existant</a> * In that case, the new bounds of this {@code Rectangle} will * have a location equal to the coordinates of the specified * {@code Point} and width and height equal to zero. * After adding a <code>Point</code>, a call to <code>contains</code> * with the added <code>Point</code> as an argument does not * necessarily return <code>true</code>. The <code>contains</code> * method does not return <code>true</code> for points on the right * or bottom edges of a <code>Rectangle</code>. Therefore if the added * <code>Point</code> falls on the right or bottom edge of the * enlarged <code>Rectangle</code>, <code>contains</code> returns * <code>false</code> for that <code>Point</code>. * If the specified point must be contained within the new * {@code Rectangle}, a 1x1 rectangle should be added instead: * r.add(pt.x, pt.y, 1, 1); * @param pt the new <code>Point</code> to add to this * Adds a <code>Rectangle</code> to this <code>Rectangle</code>. * The resulting <code>Rectangle</code> is the union of the two * If either {@code Rectangle} has any dimension less than 0, the * result will have the dimensions of the other {@code Rectangle}. * If both {@code Rectangle}s have at least one dimension less * than 0, the result will have at least one dimension less than 0. * If either {@code Rectangle} has one or both dimensions equal * to 0, the result along those axes with 0 dimensions will be * equivalent to the results obtained by adding the corresponding * origin coordinate to the result rectangle along that axis, * similar to the operation of the {@link #add(Point)} method, * but contribute no further dimension beyond that. * If the resulting {@code Rectangle} would have a dimension * too large to be expressed as an {@code int}, the result * will have a dimension of {@code Integer.MAX_VALUE} along * @param r the specified <code>Rectangle</code> // tx2,ty2 will never underflow since both original // rectangles were non-empty // they might overflow, though... * Resizes the <code>Rectangle</code> both horizontally and vertically. * This method modifies the <code>Rectangle</code> so that it is * <code>h</code> units larger on both the left and right side, * and <code>v</code> units larger at both the top and bottom. * The new <code>Rectangle</code> has {@code (x - h, y - v)} * as its upper-left corner, * width of {@code (width + 2h)}, * and a height of {@code (height + 2v)}. * If negative values are supplied for <code>h</code> and * <code>v</code>, the size of the <code>Rectangle</code> * The {@code grow} method will check for integer overflow * and underflow, but does not check whether the resulting * values of {@code width} and {@code height} grow * from negative to non-negative or shrink from non-negative * @param h the horizontal expansion * @param v the vertical expansion public void grow(
int h,
int v) {
// Non-existant in X direction // Final width must remain negative so subtract x0 before // it is clipped so that we avoid the risk that the clipping // of x0 will reverse the ordering of x0 and x1. // Clip x0 before we subtract it from x1 in case the clipping // affects the representable area of the rectangle. // The only way x1 can be negative now is if we clipped // x0 against MIN and x1 is less than MIN - in which case // we want to leave the width negative since the result // did not intersect the representable area. // Non-existant in Y direction public int outcode(
double x,
double y) {
* Note on casts to double below. If the arithmetic of * x+w or y+h is done in int, then we may get integer * overflow. By converting to double before the addition * we force the addition to be carried out in double to * avoid overflow in the comparison. * See bug 4320890 for problems that this can cause. }
else if (x >
this.x + (
double)
this.
width) {
}
else if (y >
this.y + (
double)
this.
height) {
* Checks whether two rectangles are equal. * The result is <code>true</code> if and only if the argument is not * <code>null</code> and is a <code>Rectangle</code> object that has the * same upper-left corner, width, and height as * this <code>Rectangle</code>. * @param obj the <code>Object</code> to compare with * this <code>Rectangle</code> * @return <code>true</code> if the objects are equal; * <code>false</code> otherwise. * Returns a <code>String</code> representing this * <code>Rectangle</code> and its values. * @return a <code>String</code> representing this * <code>Rectangle</code> object's coordinate and size values.