Class ImageItem.BaseOp
java.lang.Object
VASSAL.tools.opcache.AbstractOpImpl<BufferedImage>
VASSAL.tools.imageop.AbstractOpImpl
VASSAL.tools.imageop.AbstractTileOpImpl
VASSAL.build.module.gamepieceimage.ImageItem.BaseOp
- All Implemented Interfaces:
ImageOp, Op<BufferedImage>
- Enclosing class:
ImageItem
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioneval()Runs theOp.protected voidfixSize()Sets thesizewhich is used byAbstractOpImpl.getSize(),AbstractOpImpl.getHeight(), andAbstractOpImpl.getWidth().intReturns the height of theBufferedImagewhich would be returned byImageOp.getImage().getSize()Returns the size of theBufferedImagewhich would be returned byImageOp.getImage().Returns a list ofOps on which thisOpdepends.intgetWidth()Returns the width of theBufferedImagewhich would be returned byImageOp.getImage().Methods inherited from class AbstractTileOpImpl
getFutureTile, getNumXTiles, getNumYTiles, getTile, getTileHeight, getTileIndices, getTileOp, getTileSize, getTileWidthModifier and TypeMethodDescriptiongetFutureTile(int tileX, int tileY, ImageOpObserver obs) Submits a request for tile(tileX,tileY), and returns a reference to that request.intReturns the number of tiles along the x-axis.intReturns the number of tiles along the y-axis.getTile(int tileX, int tileY, ImageOpObserver obs) Calculates tile(tileX,tileY), and reports completion or failure to the specifiedImageOpObserver.intReturns the standard height of theBufferedImagetiles which are returned byImageOp.getTile(Point, ImageOpObserver).Point[]getTileIndices(Rectangle rect) Returns an array ofPoints representing the tiles intersecting the givenRectangle.getTileOp(int tileX, int tileY) Returns anImageOpwhich can produce the requested tile.Returns the standard size of theBufferedImagetiles which are returned byImageOp.getTile(Point, ImageOpObserver).intReturns the standard width of theBufferedImagetiles which are returned byImageOp.getTile(Point, ImageOpObserver).Methods inherited from class AbstractOpImpl
clearCache, getFutureImage, getFutureTile, getImage, getImage, getSizeFromCache, getTile, getTileOpModifier and TypeMethodDescriptionstatic voidSubmits a request for theBufferedImageproduced by this operation, and returns a reference to that request.getFutureTile(Point p, ImageOpObserver obs) Submits a request for tile(tileX,tileY), and returns a reference to that request.getImage()Calculates theBufferedImageproduced by this operation.getImage(ImageOpObserver obs) Calculates theBufferedImageproduced by this operation, and reports completion or failure to the specifiedImageOpObserver.protected DimensionA utility method for retrieving the size of the computedImagefrom the cache if theImageis cached.getTile(Point p, ImageOpObserver obs) Calculates tile(p.x,p.y), and reports completion or failure to the specifiedImageOpObserver.Returns anImageOpwhich can produce the requested tile.Methods inherited from class AbstractOpImpl
get, get, getFuture, newKey, updateModifier and TypeMethodDescriptionget()get(OpObserver<BufferedImage> obs) getFuture(OpObserver<BufferedImage> obs) newKey()Returns the current cache key for thisOp.voidupdate()Invalidates the current cache key for thisOp.
-
Method Details
-
eval
Description copied from class:AbstractOpImplRuns 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()Description copied from class:AbstractOpImplSets thesizewhich is used byAbstractOpImpl.getSize(),AbstractOpImpl.getHeight(), andAbstractOpImpl.getWidth().- Specified by:
fixSizein classAbstractOpImpl
-
getSize
Description copied from class:AbstractOpImplReturns the size of theBufferedImagewhich would be returned byImageOp.getImage(). The size is cached so that it need not be recalculated on each call.- Specified by:
getSizein interfaceImageOp- Overrides:
getSizein classAbstractOpImpl- Returns:
- the size of the resulting
BufferedImagein pixels - See Also:
-
getWidth
public int getWidth()Description copied from class:AbstractOpImplReturns the width of theBufferedImagewhich would be returned byImageOp.getImage(). The width is cached so that it need not be recalculated on each call.- Specified by:
getWidthin interfaceImageOp- Overrides:
getWidthin classAbstractOpImpl- Returns:
- the width of the resulting
BufferedImagein pixels - See Also:
-
getHeight
public int getHeight()Description copied from class:AbstractOpImplReturns the height of theBufferedImagewhich would be returned byImageOp.getImage(). The height is cached so that it need not be recalculated on each call.- Specified by:
getHeightin interfaceImageOp- Overrides:
getHeightin classAbstractOpImpl- Returns:
- the height of the resulting
BufferedImagein pixels - See Also:
-
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
-