org.apache.tools.ant.types.optional.image

Class Scale

Implemented Interfaces:
DrawOperation

public class Scale
extends TransformOperation
implements DrawOperation

See Also:
Image

Nested Class Summary

static class
Scale.ProportionsAttribute

Field Summary

Fields inherited from class org.apache.tools.ant.types.optional.image.ImageOperation

instructions

Fields inherited from class org.apache.tools.ant.types.DataType

checked, description, ref

Fields inherited from class org.apache.tools.ant.ProjectComponent

project

Method Summary

PlanarImage
executeDrawOperation()
Abstract method which is intended to create an image buffer and return it so it can be drawn into another object.
PlanarImage
executeTransformOperation(PlanarImage image)
float
getHeight()
float
getWidth()
PlanarImage
performScale(PlanarImage image)
void
setHeight(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(String width)
Sets the width of the image, either as an integer or a %.

Methods inherited from class org.apache.tools.ant.types.optional.image.TransformOperation

addRectangle, executeTransformOperation

Methods inherited from class org.apache.tools.ant.types.optional.image.ImageOperation

addDraw, addRectangle, addRotate, addScale, addText

Methods inherited from class org.apache.tools.ant.types.DataType

checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, getCheckedRef, getDescription, getRefid, isChecked, isReference, noChildrenAllowed, setChecked, setDescription, setRefid, tooManyAttributes

Methods inherited from class org.apache.tools.ant.ProjectComponent

getProject, log, log, setProject

Method Details

executeDrawOperation

public PlanarImage 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:
executeDrawOperation in interface DrawOperation

executeTransformOperation

public PlanarImage executeTransformOperation(PlanarImage image)
Overrides:
executeTransformOperation in interface TransformOperation

getHeight

public float getHeight()

getWidth

public float getWidth()

performScale

public PlanarImage performScale(PlanarImage image)

setHeight

public void setHeight(String height)
Sets the height of the image, either as an integer or a %. Defaults to 100%.

setProportions

public void setProportions(Scale.ProportionsAttribute pa)
Sets the behaviour regarding the image proportions.

setWidth

public void setWidth(String width)
Sets the width of the image, either as an integer or a %. Defaults to 100%.

Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.