de.enough.polish.propertyfunctions
Class ImageWidthFunction

java.lang.Object
  extended by de.enough.polish.Extension
      extended by de.enough.polish.propertyfunctions.PropertyFunction
          extended by de.enough.polish.propertyfunctions.ResourceFuntion
              extended by de.enough.polish.propertyfunctions.ImageResourceFunction
                  extended by de.enough.polish.propertyfunctions.ImageWidthFunction

public class ImageWidthFunction
extends ImageResourceFunction

Measures the width of the given image. Usage: imagewidth( name )

Copyright Enough Software 2005

 history
        Mar 29, 2006 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.Extension
antProject, autoStartCondition, environment, extensionDefinition, extensionManager, extensionSetting, extensionTypeDefinition, isBuildStarted
 
Constructor Summary
ImageWidthFunction()
          Creates a new width function.
 
Method Summary
 String process(BufferedImage image, File resource, String resourceName, String[] arguments, Environment env)
          Evaluates the given image.
 
Methods inherited from class de.enough.polish.propertyfunctions.ImageResourceFunction
process
 
Methods inherited from class de.enough.polish.propertyfunctions.ResourceFuntion
process
 
Methods inherited from class de.enough.polish.propertyfunctions.PropertyFunction
execute, needsDefinedPropertyValue
 
Methods inherited from class de.enough.polish.Extension
configure, executeAntTarget, executeAntTarget, finalize, getAntProject, getAutoStartCondition, getEnvironment, getExtensionDefinition, getExtensionSetting, getInstance, getParameterValue, getType, init, initialize, isConditionFulfilled, notifyBuildEnd, notifyBuildStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageWidthFunction

public ImageWidthFunction()
Creates a new width function.

Method Detail

process

public String process(BufferedImage image,
                      File resource,
                      String resourceName,
                      String[] arguments,
                      Environment env)
               throws IOException
Description copied from class: ImageResourceFunction
Evaluates the given image.

Specified by:
process in class ImageResourceFunction
Parameters:
image - the image
resource - the resource in question
resourceName - the name of the resource
arguments - any arguments
env - the environment
Returns:
the result from this operation
Throws:
IOException - when the processing fails