gov.nasa.worldwind.util
Class ImageTiler
java.lang.Object
gov.nasa.worldwind.util.ImageTiler
public class ImageTiler
- extends Object
Subdivides an image into tiles and computes the corresponding sectors. The width and height of the returned tiles can
be specified but default to 1024. If the base image width or height is not evenly divisible by the corresponding
desired tile dimension, tiles along the right and bottom of the base image may contain pixels that do not correspond
to pixels in the image. These pixels will have an alpha component of 0 and the corresponding tile will have an alpha
channel. Otherwise tiles will not have an alpha channel. If the input image is already the desired subimage size, it
is returned without being copied.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_IMAGE_TILE_SIZE
public static int DEFAULT_IMAGE_TILE_SIZE
ImageTiler
public ImageTiler()
getTileHeight
public int getTileHeight()
getTileWidth
public int getTileWidth()
getTransparencyColor
public Color getTransparencyColor()
setTileHeight
public void setTileHeight(int tileHeight)
setTileWidth
public void setTileWidth(int tileWidth)
setTransparencyColor
public void setTransparencyColor(Color transparencyColor)
tileImage
public void tileImage(BufferedImage image,
List<? extends LatLon> corners,
ImageTiler.ImageTilerListener listener)
tileImage
public void tileImage(BufferedImage baseImage,
Sector baseSector,
ImageTiler.ImageTilerListener listener)
- Performs a subdivision according to the current parameters and assuming that the image corresponds with a
Sector rather than a quadrilateral or other shape. Conveys each tile created to the caller via a listener
callback.
- Parameters:
baseImage - the image to tile.baseSector - the sector defining the geographic extent of the base image.listener - the listener to invoke when each new tile is created.