|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(Rectangle rect)
|
Method Summary | |
---|---|
boolean |
equals(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. |
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(Rectangle rect)
rect
- to copy data of.public RasterRect(RasterRect rasterRect)
rasterRect
- to copy data ofMethod Detail |
---|
public String toString()
toString
in class Object
public boolean equals(Object other)
equals
in class Object
public int hashCode()
Combining the hash code(s) computed above: result = 37 * result + code;
hashCode
in class Object
Object.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 |