javax.media.jai.operator
Class ShearDescriptor

java.lang.Object
  |
  +--javax.media.jai.OperationDescriptorImpl
        |
        +--javax.media.jai.operator.ShearDescriptor
All Implemented Interfaces:
OperationDescriptor, RegistryElementDescriptor, Serializable

public class ShearDescriptor
extends OperationDescriptorImpl

An OperationDescriptor describing the "Shear" operation.

The "Shear" operation shears an image either horizontally or vertically. For each pixel (x, y) of the destination, the source value at the fractional subpixel position (x', y') is constructed by means of an Interpolation object and written to the destination.

If the "shearDir" parameter is equal to SHEAR_HORIZONTAL then x' = (x - xTrans - y*shear) and y' = y. If the "shearDir" parameter is equal to SHEAR_VERTICAL then x' = x and y' = (y - yTrans - x*shear).

It may be noted that the minX, minY, width and height hints as specified through the JAI.KEY_IMAGE_LAYOUT hint in the RenderingHints object are not honored, as this operator calculates the destination image bounds itself. The other ImageLayout hints, like tileWidth and tileHeight, however are honored.

"Shear" defines a PropertyGenerator that performs an identical transformation on the "ROI" property of the source image, which can be retrieved by calling the getProperty method with "ROI" as the property name.

Resource List
Name Value
GlobalName shear
LocalName shear
Vendor com.sun.media.jai
Description Shears an image.
DocURL http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/ShearDescriptor.html
Version 1.0
arg0Desc The shear value.
arg1Desc The shear direction.
arg2Desc The X translation.
arg3Desc The Y translation.
arg4Desc The interpolation method for resampling.

Parameter List
Name Class Type Default Value
shear java.lang.Float NO_PARAMETER_DEFAULT
shearDir javax.media.jai.operator.ShearDir NO_PARAMETER_DEFAULT
xTrans java.lang.Float 0.0F
yTrans java.lang.Float 0.0F
interpolation javax.media.jai.Interpolation InterpolationNearest

See Also:
Interpolation, OperationDescriptor, ShearDir, Serialized Form

Field Summary
static ShearDir SHEAR_HORIZONTAL
           
static ShearDir SHEAR_VERTICAL
           
 
Fields inherited from class javax.media.jai.OperationDescriptorImpl
resources, sourceNames, supportedModes
 
Constructor Summary
ShearDescriptor()
          Constructor.
 
Method Summary
 PropertyGenerator[] getPropertyGenerators()
          Returns an array of PropertyGenerators implementing property inheritance for the "Shear" operation.
 
Methods inherited from class javax.media.jai.OperationDescriptorImpl
arePropertiesSupported, getDefaultSourceClass, getDestClass, getDestClass, getInvalidRegion, getName, getNumParameters, getNumSources, getParamClasses, getParamDefaults, getParamDefaultValue, getParameterListDescriptor, getParamMaxValue, getParamMinValue, getParamNames, getPropertyGenerators, getRenderableDestClass, getRenderableSourceClasses, getResourceBundle, getResources, getSourceClasses, getSourceClasses, getSourceNames, getSupportedModes, isImmediate, isModeSupported, isRenderableSupported, isRenderedSupported, makeDefaultSourceClassList, validateArguments, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHEAR_HORIZONTAL

public static final ShearDir SHEAR_HORIZONTAL

SHEAR_VERTICAL

public static final ShearDir SHEAR_VERTICAL
Constructor Detail

ShearDescriptor

public ShearDescriptor()
Constructor.
Method Detail

getPropertyGenerators

public PropertyGenerator[] getPropertyGenerators()
Returns an array of PropertyGenerators implementing property inheritance for the "Shear" operation.
Overrides:
getPropertyGenerators in class OperationDescriptorImpl
Returns:
An array of property generators.