public class Rect
extends java.lang.Object
| Constructor and Description |
|---|
Rect()
Create a rectangle with all values zero.
|
Rect(double nLLx,
double nLLy,
double nURx,
double nURy)
Create a Rect.
|
Rect(java.awt.geom.Rectangle2D r)
Create a Rect from a java.awt rectangle type
Note that the coordinate systems are inverted for PDFL.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete() |
boolean |
equals(java.lang.Object rhs) |
double |
getBottom()
the Y coordinate of the lower left corner of the rectangle.
|
double |
getHeight()
The height of the Rect.
|
double |
getLeft()
the X coordinate of the lower left corner of the rectangle.
|
double |
getLLx()
the X coordinate of the lower left corner of the rectangle.
|
double |
getLLy()
the Y coordinate of the lower left corner of the rectangle.
|
double |
getRight()
the X coordinate of the upper right corner of the rectangle.
|
double |
getTop()
the Y coordinate of the upper right corner of the rectangle.
|
double |
getURx()
the X coordinate of the upper right corner of the rectangle.
|
double |
getURy()
the Y coordinate of the upper right corner of the rectangle.
|
double |
getWidth()
The width of the Rect.
|
boolean |
inRect(Rect r2)
Check if this rectangle is inside the parameter rectangle.
|
Rect |
intersect(Rect r2)
Obtain the intersection of this rectangle and another rectangle.
|
boolean |
isEmpty()
Check if this rectangle is empty.
|
boolean |
overlaps(Rect r2)
Check if two rectangles overlap.
|
void |
setBottom(double bottom)
the Y coordinate of the lower left corner of the rectangle.
|
void |
setLeft(double left)
the X coordinate of the lower left corner of the rectangle.
|
void |
setLLx(double value)
the X coordinate of the lower left corner of the rectangle.
|
void |
setLLy(double value)
the Y coordinate of the lower left corner of the rectangle.
|
void |
setRight(double right)
the X coordinate of the upper right corner of the rectangle.
|
void |
setTop(double top)
the Y coordinate of the upper right corner of the rectangle.
|
void |
setURx(double value)
the X coordinate of the upper right corner of the rectangle.
|
void |
setURy(double value)
the Y coordinate of the upper right corner of the rectangle.
|
java.lang.String |
toString() |
Rect |
transform(Matrix arg0)
Transform the coordinates of the rectangle by the given Matrix Object.
|
public Rect(java.awt.geom.Rectangle2D r)
r - a rectanglepublic Rect()
public Rect(double nLLx,
double nLLy,
double nURx,
double nURy)
nLLx - the X coordinate of the lower left corner of the rectanglenLLy - the Y coordinate of the lower left corner of the rectanglenURx - the X coordinate of the upper right corner of the rectanglenURy - the Y coordinate of the upper right corner of the rectanglepublic void delete()
public boolean equals(java.lang.Object rhs)
equals in class java.lang.Objectpublic void setLLx(double value)
public double getLLx()
public void setLLy(double value)
public double getLLy()
public void setURx(double value)
public double getURx()
public void setURy(double value)
public double getURy()
public double getLeft()
public void setLeft(double left)
public double getBottom()
public void setBottom(double bottom)
public double getRight()
public void setRight(double right)
public double getTop()
public void setTop(double top)
public double getWidth()
public double getHeight()
public Rect transform(Matrix arg0)
public boolean overlaps(Rect r2)
public boolean inRect(Rect r2)
public boolean isEmpty()
public Rect intersect(Rect r2)
public java.lang.String toString()
toString in class java.lang.Object