public class Scale extends TransformOperation implements DrawOperation
ImageIOTask
Modifier and Type | Class and Description |
---|---|
static class |
Scale.ProportionsAttribute
Enumerated class for proportions attribute.
|
instructions
description, location, project
Constructor and Description |
---|
Scale() |
Modifier and Type | Method and Description |
---|---|
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.
|
java.awt.image.BufferedImage |
executeTransformOperation(java.awt.image.BufferedImage image)
Performs the transformations.
|
float |
getHeight()
Get the height.
|
float |
getWidth()
Get the width.
|
java.awt.image.BufferedImage |
performScale(java.awt.image.BufferedImage image)
Scale an image.
|
void |
setHeight(java.lang.String height)
Sets the height of the image, either as an integer or a %.
|
void |
setProportions(Scale.ProportionsAttribute pa)
Sets the behaviour regarding the image proportions.
|
void |
setWidth(java.lang.String width)
Sets the width of the image, either as an integer or a %.
|
addDraw, addRotate, addScale
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes, toString
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public void setProportions(Scale.ProportionsAttribute pa)
pa
- the enumerated value.public void setWidth(java.lang.String width)
width
- the value to use.public void setHeight(java.lang.String height)
height
- the value to use.public float getWidth()
public float getHeight()
public java.awt.image.BufferedImage performScale(java.awt.image.BufferedImage image)
image
- the image to scale.public java.awt.image.BufferedImage executeTransformOperation(java.awt.image.BufferedImage image)
executeTransformOperation
in class TransformOperation
image
- The image to perform the transformation on.public java.awt.image.BufferedImage executeDrawOperation()
executeDrawOperation
in interface DrawOperation