Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Interface java.awt.image.renderable.ContextualRenderedImageFactory


public interface ContextualRenderedImageFactory
extends RenderedImageFactory
ContextualRenderedImageFactory provides an interface for the functionality that may differ between instances of RenderableImageOp. In this way there does not need to be a subclass of RenderableImageOp for each rendering-independent operator.

All operations that are to be used in a rendering-independent chain must implement ContextualRenderedImageFactory.

This interface is intended to be used only by the RenderableImageOp class. It is not intended to be used by developers, unless they are writing a RenderableImageOp.

Classes that implement this interface must provide a constructor with no arguments so they can be instantiated by the class loader.


Method Summary
RenderedImage  createOp(RenderContext renderContext, ParameterBlock paramBlock)
Creates a rendering, given a RenderContext and a ParameterBlock containing the operation's sources and parameters.
Rectangle2D  getBoundingBox(ParameterBlock paramBlock)
Returns the bounding box for the output of the operation, performed on a given set of sources.
Object  getProperty(ParameterBlock pb, String name)
Gets the appropriate instance of the property specified by the name parameter.
RenderContext  mapRenderContext(int i, RenderContext renderContext, ParameterBlock paramBlock, RenderableImageOp parentOp)
Maps the operation's output RenderContext into a RenderContext for each of the operation's sources.
 

Method Detail

mapRenderContext

public RenderContext mapRenderContext(int i,
                                      RenderContext renderContext,
                                      ParameterBlock paramBlock,
                                      RenderableImageOp parentOp)
Maps the operation's output RenderContext into a RenderContext for each of the operation's sources. This is useful for operations that can be expressed in whole or in part simply as alterations in the RenderContext, such as an affine mapping, or operations that wish to obtain lower quality renderings of their sources in order to save processing effort or transmission bandwith. Some operations, such as blur, can also use this mechanism to avoid obtaining sources of higher quality than necessary.
Parameters:
i - the index of the source image.
renderContext - the RenderContext being applied to the operation.
paramBlock - a ParameterBlock containing the operation's sources and parameters.
parentOp - the RenderableImageOp from which this method is being called.

createOp

public RenderedImage createOp(RenderContext renderContext,
                              ParameterBlock paramBlock)
Creates a rendering, given a RenderContext and a ParameterBlock containing the operation's sources and parameters. The output is a RenderedImage that takes the RenderContext into account to determine its dimensions and placement on the image plane. This method houses the "intelligence" that allows a rendering-independent operation to adapt to a specific render context.
Parameters:
renderContext - The RenderContext that specifies the rendering.
paramBlock - a ParameterBlock containing the operation's sources and parameters.

getBoundingBox

public Rectangle2D getBoundingBox(ParameterBlock paramBlock)
Returns the bounding box for the output of the operation, performed on a given set of sources. The bounds are returned as a Rectangle2D, that is, and axis-aligned rectangle with floating-point corner coordinates.
Parameters:
paramBlock - a ParameterBlock containing the operation's sources and parameters.
Returns:
a Rectangle2D specifying the bounding box of the output.

getProperty

public Object getProperty(ParameterBlock pb,
                          String name)
Gets the appropriate instance of the property specified by the name parameter. This method must determine which instance of a property to return when there are multiple sources that each specify the property.
Parameters:
paramBlock - a ParameterBlock containing the operation's sources and parameters.
name - a String naming the desired property.
Returns:
an object reference to the value of the property requested.

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.