public class BitmapRegionTileSource extends Object implements TiledImageRenderer.TileSource
TiledImageRenderer.TileSource
using
BitmapRegionDecoder
to wrap a local fileModifier and Type | Class and Description |
---|---|
static class |
BitmapRegionTileSource.BitmapSource |
static class |
BitmapRegionTileSource.FilePathBitmapSource |
static class |
BitmapRegionTileSource.ResourceBitmapSource |
static class |
BitmapRegionTileSource.UriBitmapSource |
Modifier and Type | Field and Description |
---|---|
static int |
MAX_PREVIEW_SIZE |
Constructor and Description |
---|
BitmapRegionTileSource(Context context,
BitmapRegionTileSource.BitmapSource source) |
Modifier and Type | Method and Description |
---|---|
int |
getImageHeight() |
int |
getImageWidth() |
BasicTexture |
getPreview()
Return a Preview image if available.
|
int |
getRotation() |
Bitmap |
getTile(int level,
int x,
int y,
Bitmap bitmap)
The tile returned by this method can be specified this way: Assuming
the image size is (width, height), first take the intersection of (0,
0) - (width, height) and (x, y) - (x + tileSize, y + tileSize).
|
int |
getTileSize()
If the source does not care about the tile size, it should use
TiledImageRenderer.suggestedTileSize(Context) |
public static final int MAX_PREVIEW_SIZE
public BitmapRegionTileSource(Context context, BitmapRegionTileSource.BitmapSource source)
public int getTileSize()
TiledImageRenderer.TileSource
TiledImageRenderer.suggestedTileSize(Context)
getTileSize
in interface TiledImageRenderer.TileSource
public int getImageWidth()
getImageWidth
in interface TiledImageRenderer.TileSource
public int getImageHeight()
getImageHeight
in interface TiledImageRenderer.TileSource
public BasicTexture getPreview()
TiledImageRenderer.TileSource
getPreview
in interface TiledImageRenderer.TileSource
public int getRotation()
getRotation
in interface TiledImageRenderer.TileSource
public Bitmap getTile(int level, int x, int y, Bitmap bitmap)
TiledImageRenderer.TileSource
getTile
in interface TiledImageRenderer.TileSource