|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.nutiteq.components.MapPos
public class MapPos
Implements a projected position on a map as a set of 3 numbers: (x,y) projected pixel coordinates, (zoom) zoom level.
| Constructor Summary | |
|---|---|
MapPos(int x,
int y,
int zoom)
Constructor for MapPos. |
|
| Method Summary | |
|---|---|
static boolean |
checkBounds(int x,
int y,
int width,
int height,
int screenWidth,
int screenHeight)
Not part of public API Check if an image bounded by left, top, right, bottom can be displayed. |
MapPos |
copy()
Not part of public API Create a copy of this object. |
int |
distanceFromLineInPixels(int x1,
int y1,
int x2,
int y2)
|
int |
distanceFromLineInPixels(Point pOne,
Point pTwo)
|
int |
distanceInPixels(MapPos pos)
Not part of public API |
boolean |
equals(java.lang.Object o)
Equals only compares x, y, zoom. |
int |
getZoom()
|
int |
getX()
|
int |
getY()
|
int |
hashCode()
|
boolean |
isVisible(MapPos middlePoint,
int displayCenterX,
int displayCenterY)
Not part of public API |
void |
setZoom(int zoom)
|
void |
setX(int x)
|
void |
setY(int y)
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapPos(int x,
int y,
int zoom)
x - x coordinatey - y coordinatezoom - zoom| Method Detail |
|---|
public int getX()
public int getY()
public int getZoom()
public void setX(int x)
public void setY(int y)
public void setZoom(int zoom)
public static boolean checkBounds(int x,
int y,
int width,
int height,
int screenWidth,
int screenHeight)
x - top-left cornery - top-left cornerwidth - image widthheight - image height
public MapPos copy()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - other map pos object
public int hashCode()
hashCode in class java.lang.Object
public boolean isVisible(MapPos middlePoint,
int displayCenterX,
int displayCenterY)
public int distanceInPixels(MapPos pos)
public int distanceFromLineInPixels(int x1,
int y1,
int x2,
int y2)
public int distanceFromLineInPixels(Point pOne,
Point pTwo)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||