gnu.vnc.awt
Class Rectangle
java.lang.Object
gnu.vnc.awt.Rectangle
public class Rectangle
- extends java.lang.Object
- Author:
- Tal Liron
Constructor Summary |
Rectangle(int x,
int y,
int width,
int height)
Constructor. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
x
public int x
y
public int y
width
public int width
height
public int height
Rectangle
public Rectangle(int x,
int y,
int width,
int height)
- Constructor.
- Parameters:
x
- The x-coordinate.y
- The y-coordinate.width
- The width.height
- The height.
getLocation
public java.awt.Point getLocation()
- Returns the location of the top left corner of the rectangle (as a point).
- Returns:
- The point the rectangle is located at.
intersection
public Rectangle intersection(Rectangle r)
- Parameters:
r
-
- Returns:
contains
public boolean contains(java.awt.Point p)
- Parameters:
p
-
- Returns:
contains
public boolean contains(Rectangle r)
- Parameters:
r
-
- Returns: