|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.coverage.raster.geom.RasterRect
public class RasterRect
Simple data structure for a raster rectangle. Stores upper-left pixel coordinate and width and height.
| Field Summary | |
|---|---|
int |
height
The height in pixel. |
int |
width
The width in pixel. |
int |
x
The x pixel position. |
int |
y
The y pixel position. |
| Constructor Summary | |
|---|---|
RasterRect()
Creates a new RasterRect with position 0, 0 and size 0, 0. |
|
RasterRect(int x,
int y,
int width,
int height)
Creates a new RasterRect |
|
RasterRect(RasterRect rasterRect)
|
|
RasterRect(java.awt.Rectangle rect)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object other)
|
int |
hashCode()
Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast. |
static RasterRect |
intersection(RasterRect first,
RasterRect second)
Create an intersection of the given RasterRects, if the given rasterects do not intersect, null will be returned. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int x
public int y
public int width
public int height
| Constructor Detail |
|---|
public RasterRect(int x,
int y,
int width,
int height)
x - upper-left pixely - upper-left pixelwidth - width of rectangleheight - height of rectanglepublic RasterRect()
public RasterRect(java.awt.Rectangle rect)
rect - to copy data of.public RasterRect(RasterRect rasterRect)
rasterRect - to copy data of| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
Combining the hash code(s) computed above: result = 37 * result + code;
hashCode in class java.lang.ObjectObject.hashCode()
public static final RasterRect intersection(RasterRect first,
RasterRect second)
first - second -
null if the given rectangles do not intersect.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||