01: /*
02: * $RCSfile: ExpCRIF.java,v $
03: *
04: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
05: *
06: * Use is subject to license terms.
07: *
08: * $Revision: 1.1 $
09: * $Date: 2005/02/11 04:56:25 $
10: * $State: Exp $
11: */
12: package com.sun.media.jai.opimage;
13:
14: import java.awt.RenderingHints;
15: import java.awt.geom.Rectangle2D;
16: import java.awt.geom.Rectangle2D.Float;
17: import java.awt.image.RenderedImage;
18: import java.awt.image.renderable.ParameterBlock;
19: import java.awt.image.renderable.RenderableImage;
20: import java.awt.image.renderable.RenderContext;
21: import java.awt.image.renderable.RenderedImageFactory;
22: import javax.media.jai.CRIFImpl;
23: import javax.media.jai.ImageLayout;
24: import java.util.Map;
25:
26: /**
27: * This image factory supports image operator <code>ExpOpImage</code>
28: * in the rendered and renderable image layers.
29: *
30: * @since EA2
31: * @see javax.media.jai.operator.ExpDescriptor
32: * @see ExpOpImage
33: *
34: */
35:
36: public class ExpCRIF extends CRIFImpl {
37:
38: /** Constructor. */
39: public ExpCRIF() {
40: super ("exp");
41: }
42:
43: /**
44: * Creates a new instance of <code>ExpOpImage</code> in the
45: * rendered layer. This method satisfies the implementation of RIF.
46: *
47: * @param paramBlock The source image and the constants.
48: * @param renderHints Optionally contains destination image layout.
49: */
50: public RenderedImage create(ParameterBlock pb,
51: RenderingHints renderHints) {
52: // Get ImageLayout from renderHints if any.
53: ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
54:
55: return new ExpOpImage(pb.getRenderedSource(0), renderHints,
56: layout);
57: }
58: }
|