Package VASSAL.tools.imageop
Class RotateScaleOpSVGImpl
java.lang.Object
VASSAL.tools.opcache.AbstractOpImpl<BufferedImage>
VASSAL.tools.imageop.AbstractOpImpl
VASSAL.tools.imageop.AbstractTileOpImpl
VASSAL.tools.imageop.RotateScaleOpSVGImpl
- All Implemented Interfaces:
ImageOp,RotateOp,RotateScaleOp,ScaleOp,SourceOp,SVGOp,Op<BufferedImage>
public class RotateScaleOpSVGImpl extends AbstractTileOpImpl implements RotateScaleOp, SVGOp
An
ImageOp which rotates and scales its source. Rotation
is about the center of the source image, and scaling ranges from
(0,Double.MAX_VALUE). If a source is to be both rotated
and scaled, using one RotateScaleOp will produce better
results than doing the rotation and scaling separately with
one RotateOp and one ScaleOp.- Since:
- 3.1.0
- Author:
- Joel Uckelman
-
Field Summary
Fields inherited from class VASSAL.tools.imageop.AbstractOpImpl
cache, size -
Constructor Summary
Constructors Constructor Description RotateScaleOpSVGImpl(SVGOp sop, double angle, double scale)Constructs anImageOpwhich will rotate and scale the image produced by its sourceImageOp.RotateScaleOpSVGImpl(SVGOp sop, double angle, double scale, RenderingHints hints)Constructs anImageOpwhich will rotate and scale the image produced by its sourceImageOp. -
Method Summary
Modifier and Type Method Description booleanequals(Object o)BufferedImageeval()Runs theOp.protected voidfixSize()Sets thesizewhich is used byAbstractOpImpl.getSize(),AbstractOpImpl.getHeight(), andAbstractOpImpl.getWidth().doublegetAngle()Returns the angle of rotation.RenderingHintsgetHints()StringgetName()doublegetScale()Returns the scale factor.List<Op<?>>getSources()Returns a list ofOps on which thisOpdepends.inthashCode()Methods inherited from class VASSAL.tools.imageop.AbstractTileOpImpl
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
-
RotateScaleOpSVGImpl
Constructs anImageOpwhich will rotate and scale the image produced by its sourceImageOp.- Parameters:
sop- the source operationangle- the angle of rotation, in degreesscale- the scale factor
-
RotateScaleOpSVGImpl
Constructs anImageOpwhich will rotate and scale the image produced by its sourceImageOp.- Parameters:
sop- the source operationangle- the angle of rotation, in degreesscale- the scale factorhints- rendering hints- Throws:
IllegalArgumentException- ifsop == 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 - Throws:
Exception- passed up from the sourceImageOp.
-
fixSize
protected void fixSize()Sets thesizewhich is used byAbstractOpImpl.getSize(),AbstractOpImpl.getHeight(), andAbstractOpImpl.getWidth().- Specified by:
fixSizein classAbstractOpImpl
-
getAngle
public double getAngle()Returns the angle of rotation. -
getScale
public double getScale()Returns the scale factor. -
getName
-
getHints
-
equals
-
hashCode
public int hashCode()
-