Package VASSAL.tools.imageop
Class ImageSourceOpBitmapImpl
java.lang.Object
VASSAL.tools.opcache.AbstractOpImpl<BufferedImage>
VASSAL.tools.imageop.AbstractOpImpl
VASSAL.tools.imageop.AbstractTiledOpImpl
VASSAL.tools.imageop.ImageSourceOpBitmapImpl
- All Implemented Interfaces:
ImageOp,SourceOp,Op<BufferedImage>
An
ImageOp which uses a fixed image as its source.
ImageSourceOp holds a reference to the Image
it was constructed with in order to prevent it from being garbage
collected from the soft cache, since this op has no way of recreating
the source image.- Since:
- 3.1.0
- Author:
- Joel Uckelman
-
Field Summary
Fields inherited from class VASSAL.tools.imageop.AbstractTiledOpImpl
numXTiles, numYTiles, tiles, tileSizeFields inherited from class VASSAL.tools.imageop.AbstractOpImpl
cache, size -
Constructor Summary
ConstructorsConstructorDescriptionImageSourceOpBitmapImpl(BufferedImage image)Constructs anImageOpwhich will hold and return the image it is constructed with. -
Method Summary
Modifier and TypeMethodDescriptionprotected ImageOpcreateTileOp(int tileX, int tileY)booleaneval()Runs theOp.protected voidfixSize()Sets thesizewhich is used byAbstractOpImpl.getSize(),AbstractOpImpl.getHeight(), andAbstractOpImpl.getWidth().getName()Returns a list ofOps on which thisOpdepends.inthashCode()Methods inherited from class VASSAL.tools.imageop.AbstractTiledOpImpl
fixTileSize, getFutureTile, getNumXTiles, getNumYTiles, getTile, getTileHeight, getTileIndices, getTileOp, getTileSize, getTileWidthMethods inherited from class VASSAL.tools.imageop.AbstractOpImpl
clearCache, getFutureImage, getFutureTile, getHeight, getImage, getImage, getSize, getSizeFromCache, getTile, getTileOp, getWidthMethods inherited from class VASSAL.tools.opcache.AbstractOpImpl
get, get, getFuture, newKey, updateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface VASSAL.tools.imageop.ImageOp
getFutureImage, getFutureTile, getFutureTile, getHeight, getImage, getImage, getNumXTiles, getNumYTiles, getSize, getTile, getTile, getTileHeight, getTileIndices, getTileOp, getTileOp, getTileSize, getTileWidth, getWidth
-
Constructor Details
-
ImageSourceOpBitmapImpl
Constructs anImageOpwhich will hold and return the image it is constructed with.- Parameters:
image- the source image- Throws:
IllegalArgumentException- ifimage == null.
-
-
Method Details
-
getSources
Description copied from class:AbstractOpImplReturns a list ofOps on which thisOpdepends.- Specified by:
getSourcesin interfaceOp<BufferedImage>- Specified by:
getSourcesin classAbstractOpImpl<BufferedImage>- Returns:
- the
Ops on which thisOpdepends
-
eval
Runs theOp. This method should be called only by the caching framework.- Specified by:
evalin interfaceImageOp- Specified by:
evalin interfaceOp<BufferedImage>- Specified by:
evalin classAbstractOpImpl- Returns:
- the result of running this
Op
-
fixSize
protected void fixSize()Sets thesizewhich is used byAbstractOpImpl.getSize(),AbstractOpImpl.getHeight(), andAbstractOpImpl.getWidth().- Specified by:
fixSizein classAbstractOpImpl
-
createTileOp
- Specified by:
createTileOpin classAbstractTiledOpImpl
-
getName
-
equals
-
hashCode
public int hashCode()
-