public class TileAnchor extends java.lang.Object
It may represent a reprojected tile, i.e. the tile is rotated / deformed in an arbitrary way. In general, the tile origin cannot be expected to be the upper left corner of the rectangle that is spanned by the 2 points.
The coordinate space may be
Modifier and Type | Field and Description |
---|---|
protected java.awt.geom.Point2D |
nextTileOrigin |
protected java.awt.geom.Point2D |
tileOrigin |
Constructor and Description |
---|
TileAnchor(IProjected tileOrigin,
IProjected nextTileOrigin) |
TileAnchor(java.awt.geom.Point2D tileOrigin,
java.awt.geom.Point2D nextTileOrigin)
Create a new tile anchor.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.AffineTransform |
convert(TileAnchor other)
Create a transformation that converts points from this coordinate space
to another coordinate space.
|
java.awt.geom.Point2D |
getNextTileOrigin() |
java.awt.geom.Point2D |
getTileOrigin() |
java.lang.String |
toString() |
protected final java.awt.geom.Point2D tileOrigin
protected final java.awt.geom.Point2D nextTileOrigin
public TileAnchor(java.awt.geom.Point2D tileOrigin, java.awt.geom.Point2D nextTileOrigin)
tileOrigin
- position of the tile originnextTileOrigin
- position of the opposite tile corner, i.e. the
origin of the tile with index (x+1,y+1), when current tile has index (x,y)public TileAnchor(IProjected tileOrigin, IProjected nextTileOrigin)
public java.awt.geom.Point2D getTileOrigin()
public java.awt.geom.Point2D getNextTileOrigin()
public java.lang.String toString()
toString
in class java.lang.Object
public java.awt.geom.AffineTransform convert(TileAnchor other)
other
- tile anchor of the tile in the target coordinate space