01: /*
02: * $RCSfile: LogCRIF.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:30 $
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>LogOpImage</code>
28: * in the rendered and renderable image layers.
29: *
30: * @since EA2
31: * @see javax.media.jai.operator.LogDescriptor
32: * @see LogOpImage
33: *
34: */
35:
36: public class LogCRIF extends CRIFImpl {
37:
38: /** Constructor. */
39: public LogCRIF() {
40: super ("log");
41: }
42:
43: /**
44: * Creates a new instance of <code>LogOpImage</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 LogOpImage(pb.getRenderedSource(0), renderHints,
56: layout);
57: }
58: }
|