All Packages Class Hierarchy This Package Previous Next Index
Class fabula.util.Rect
java.lang.Object
|
+----fabula.util.Rect
- public class Rect
- extends Object
The class Rect
defines several methods for handling
rectangles easy
-
Bottom(Rectangle)
- returns the bottom position of the rectangle
-
Bounds(int, int, int, int)
- Returns a bounding rectangle
-
CentralPoint(Rectangle)
- Returns a the central point for a rectangle
-
Grow(Rectangle, int)
- grows the rectangle
-
Height(Rectangle)
- returns the height of the rectangle
-
Include(Rectangle, Rectangle)
- check if the two rectangles intersects
-
Intersection(Rectangle, Rectangle)
- Returns the intersection of the two rectangles
-
IsSquare(Rectangle)
- Check if the rectangle is a square
-
Left(Rectangle)
- returns the left position of the rectangle
-
MoveTo(Rectangle, int, int)
- absolute move of the rectangle
-
Point(Rectangle, Point)
- checks if the point is inside the rectangle
-
RelativeMove(Rectangle, int, int)
- relative move of the rectangle
-
Right(Rectangle)
- returns the right position of the rectangle
-
Set(int, int, int, int)
- build a rectangle in Windows notation
-
SetPoint(Point, Point)
- Create a rectangle with given two points
-
Top(Rectangle)
- returns the top position of the rectangle
-
Width(Rectangle)
- returns the widht of the rectangle
Height
public static int Height(Rectangle R)
- returns the height of the rectangle
Width
public static int Width(Rectangle R)
- returns the widht of the rectangle
Left
public static int Left(Rectangle R)
- returns the left position of the rectangle
Top
public static int Top(Rectangle R)
- returns the top position of the rectangle
Right
public static int Right(Rectangle R)
- returns the right position of the rectangle
Bottom
public static int Bottom(Rectangle R)
- returns the bottom position of the rectangle
Grow
public static Rectangle Grow(Rectangle R,
int Delta)
- grows the rectangle
RelativeMove
public static Rectangle RelativeMove(Rectangle R,
int dx,
int dy)
- relative move of the rectangle
MoveTo
public static Rectangle MoveTo(Rectangle R,
int x,
int y)
- absolute move of the rectangle
Set
public static Rectangle Set(int Left,
int Top,
int Right,
int Bottom)
- build a rectangle in Windows notation
SetPoint
public static Rectangle SetPoint(Point TopLeft,
Point BottomRight)
- Create a rectangle with given two points
Include
public static boolean Include(Rectangle R1,
Rectangle R2)
- check if the two rectangles intersects
Point
public static boolean Point(Rectangle R,
Point P)
- checks if the point is inside the rectangle
Intersection
public static Rectangle Intersection(Rectangle R1,
Rectangle R2)
- Returns the intersection of the two rectangles
IsSquare
public static boolean IsSquare(Rectangle R)
- Check if the rectangle is a square
CentralPoint
public static Point CentralPoint(Rectangle R)
- Returns a the central point for a rectangle
Bounds
public static Rectangle Bounds(int aLeft,
int aTop,
int aWidth,
int aHeight)
- Returns a bounding rectangle
All Packages Class Hierarchy This Package Previous Next Index