Class Scale
- java.lang.Object
- 
- org.apache.tools.ant.ProjectComponent
- 
- org.apache.tools.ant.types.DataType
- 
- org.apache.tools.ant.types.optional.imageio.ImageOperation
- 
- org.apache.tools.ant.types.optional.imageio.TransformOperation
- 
- org.apache.tools.ant.types.optional.imageio.Scale
 
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- DrawOperation
 
 public class Scale extends TransformOperation implements DrawOperation - See Also:
- ImageIOTask
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classScale.ProportionsAttributeEnumerated class for proportions attribute.
 - 
Field Summary- 
Fields inherited from class org.apache.tools.ant.types.optional.imageio.ImageOperationinstructions
 - 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 
- 
 - 
Constructor SummaryConstructors Constructor Description Scale()
 - 
Method SummaryModifier and Type Method Description java.awt.image.BufferedImageexecuteDrawOperation()Abstract method which is intended to create an image buffer and return it so it can be drawn into another object.java.awt.image.BufferedImageexecuteTransformOperation(java.awt.image.BufferedImage image)Performs the transformations.floatgetHeight()Get the height.floatgetWidth()Get the width.java.awt.image.BufferedImageperformScale(java.awt.image.BufferedImage image)Scale an image.voidsetHeight(java.lang.String height)Sets the height of the image, either as an integer or a %.voidsetProportions(Scale.ProportionsAttribute pa)Sets the behaviour regarding the image proportions.voidsetWidth(java.lang.String width)Sets the width of the image, either as an integer or a %.- 
Methods inherited from class org.apache.tools.ant.types.optional.imageio.ImageOperationaddDraw, addRotate, addScale
 - 
Methods inherited from class org.apache.tools.ant.types.DataTypecheckAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes, toString
 - 
Methods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
 
- 
 
- 
- 
- 
Method Detail- 
setProportionspublic void setProportions(Scale.ProportionsAttribute pa) Sets the behaviour regarding the image proportions.- Parameters:
- pa- the enumerated value.
 
 - 
setWidthpublic void setWidth(java.lang.String width) Sets the width of the image, either as an integer or a %. Defaults to 100%.- Parameters:
- width- the value to use.
 
 - 
setHeightpublic void setHeight(java.lang.String height) Sets the height of the image, either as an integer or a %. Defaults to 100%.- Parameters:
- height- the value to use.
 
 - 
getWidthpublic float getWidth() Get the width.- Returns:
- the value converted from the width string.
 
 - 
getHeightpublic float getHeight() Get the height.- Returns:
- the value converted from the height string.
 
 - 
performScalepublic java.awt.image.BufferedImage performScale(java.awt.image.BufferedImage image) Scale an image.- Parameters:
- image- the image to scale.
- Returns:
- the scaled image.
 
 - 
executeTransformOperationpublic java.awt.image.BufferedImage executeTransformOperation(java.awt.image.BufferedImage image) Performs the transformations..- Specified by:
- executeTransformOperationin class- TransformOperation
- Parameters:
- image- The image to perform the transformation on.
- Returns:
- the transformed image.
 
 - 
executeDrawOperationpublic java.awt.image.BufferedImage executeDrawOperation() Abstract method which is intended to create an image buffer and return it so it can be drawn into another object. Use an Alpha channel for a "transparent" background..- Specified by:
- executeDrawOperationin interface- DrawOperation
- Returns:
- a planar image
 
 
- 
 
-