01: /*
02: * $RCSfile: MosaicRIF.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:36 $
10: * $State: Exp $
11: */package com.sun.media.jai.opimage;
12:
13: import java.awt.RenderingHints;
14: import java.awt.image.RenderedImage;
15: import java.awt.image.renderable.ParameterBlock;
16: import java.awt.image.renderable.RenderedImageFactory;
17: import java.util.Vector;
18: import javax.media.jai.PlanarImage;
19: import javax.media.jai.ROI;
20: import javax.media.jai.operator.MosaicType;
21:
22: /**
23: * A <code>RIF</code> supporting the "Mosaic" operation in the rendered
24: * image layer.
25: *
26: * @since JAI 1.1.2
27: * @see javax.media.jai.operator.MosaicDescriptor
28: */
29: public class MosaicRIF implements RenderedImageFactory {
30:
31: /** Constructor. */
32: public MosaicRIF() {
33: }
34:
35: /**
36: * Renders a "Mosaic" operation node.
37: */
38: public RenderedImage create(ParameterBlock paramBlock,
39: RenderingHints renderHints) {
40: return new MosaicOpImage(paramBlock.getSources(), RIFUtil
41: .getImageLayoutHint(renderHints), renderHints,
42: (MosaicType) paramBlock.getObjectParameter(0),
43: (PlanarImage[]) paramBlock.getObjectParameter(1),
44: (ROI[]) paramBlock.getObjectParameter(2),
45: (double[][]) paramBlock.getObjectParameter(3),
46: (double[]) paramBlock.getObjectParameter(4));
47: }
48: }
|