Package VASSAL.tools.image.tilecache
Class TileSlicerImpl
java.lang.Object
VASSAL.tools.image.tilecache.TileSlicerImpl
- All Implemented Interfaces:
TileSlicer
public class TileSlicerImpl extends Object implements TileSlicer
Slices an image into tiles.
- Since:
- 3.2.0
- Author:
- Joel Uckelman
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
TileSlicerImpl.TaskMaker
-
Constructor Summary
Constructors Constructor Description TileSlicerImpl()
-
Method Summary
Modifier and Type Method Description protected static void
queueTileTasks(BufferedImage src, String iname, String tpath, int div, int tw, int th, int dw, int dh, TileSlicerImpl.TaskMaker tm, ExecutorService exec, List<Future<Void>> futures)
void
slice(BufferedImage src, String iname, String tpath, int tw, int th, ExecutorService exec, Callback<Void> progress)
Slices an image into tiles.
-
Constructor Details
-
TileSlicerImpl
public TileSlicerImpl()
-
-
Method Details
-
slice
public void slice(BufferedImage src, String iname, String tpath, int tw, int th, ExecutorService exec, Callback<Void> progress) throws IOExceptionSlices an image into tiles.- Specified by:
slice
in interfaceTileSlicer
- Parameters:
src
- the source imageiname
- the basename for the tilestpath
- the path for the tilestw
- the tile widthth
- the tile heightexec
- the executor in which to run tasksprogress
- a callback for indicating progress- Throws:
IOException
-
queueTileTasks
protected static void queueTileTasks(BufferedImage src, String iname, String tpath, int div, int tw, int th, int dw, int dh, TileSlicerImpl.TaskMaker tm, ExecutorService exec, List<Future<Void>> futures)
-