Package VASSAL.tools.imageop
Class FixedScaleOpBitmapImpl
java.lang.Object
VASSAL.tools.opcache.AbstractOpImpl<BufferedImage>
VASSAL.tools.imageop.AbstractOpImpl
VASSAL.tools.imageop.AbstractTiledOpImpl
VASSAL.tools.imageop.FixedScaleOpBitmapImpl
- All Implemented Interfaces:
ImageOp,ScaleOp,Op<BufferedImage>
An
ImageOp which scales its source.- Since:
- 3.1.0
- Author:
- Joel Uckelman
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final RenderingHintsprotected final intprotected final RenderingHintsprotected final doubleprotected final ImageOpFields inherited from class VASSAL.tools.imageop.AbstractTiledOpImpl
numXTiles, numYTiles, tiles, tileSizeFields inherited from class VASSAL.tools.imageop.AbstractOpImpl
cache, size -
Constructor Summary
ConstructorsConstructorDescriptionFixedScaleOpBitmapImpl(ImageOp sop, double scale, int width, int height) Constructs anImageOpwhich will scale the image produced by its sourceImageOp.FixedScaleOpBitmapImpl(ImageOp sop, double scale, int width, int height, RenderingHints hints) Constructs anImageOpwhich will scale the image produced by its sourceImageOp. -
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().getHints()doublegetScale()Returns the scale factor.Returns a list ofOps on which thisOpdepends.inthashCode()toString()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, 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
-
Field Details
-
sop
-
hints
-
scale
protected final double scale -
hash
protected final int hash -
defaultHints
-
-
Constructor Details
-
FixedScaleOpBitmapImpl
Constructs anImageOpwhich will scale the image produced by its sourceImageOp.- Parameters:
sop- the source operationscale- the scale factor
-
FixedScaleOpBitmapImpl
public FixedScaleOpBitmapImpl(ImageOp sop, double scale, int width, int height, RenderingHints hints) Constructs anImageOpwhich will scale the image produced by its sourceImageOp.- Parameters:
sop- the source operationscale- the scale factorhints- rendering hints
-
-
Method Details
-
fixSize
protected void fixSize()Description copied from class:AbstractOpImplSets thesizewhich is used byAbstractOpImpl.getSize(),AbstractOpImpl.getHeight(), andAbstractOpImpl.getWidth().- Specified by:
fixSizein classAbstractOpImpl
-
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 - Throws:
Exception- passed up from the sourceImageOp.
-
createTileOp
- Specified by:
createTileOpin classAbstractTiledOpImpl
-
getHints
-
getScale
public double getScale()Returns the scale factor. -
equals
-
hashCode
public int hashCode() -
toString
-