01: /*
02: * $RCSfile: AddCollectionCRIF.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:11 $
10: * $State: Exp $
11: */
12: package com.sun.media.jai.opimage;
13:
14: import java.awt.RenderingHints;
15: import java.awt.image.RenderedImage;
16: import java.awt.image.renderable.ParameterBlock;
17: import java.util.Collection;
18: import javax.media.jai.CRIFImpl;
19: import javax.media.jai.ImageLayout;
20: import java.util.Map;
21:
22: /**
23: * A <code>CRIF</code> supporting the "AddCollection" operation
24: * in the rendered and renderable image layers.
25: *
26: * @see javax.media.jai.operator.AddCollectionDescriptor
27: * @see AddCollectionOpImage
28: *
29: *
30: * @since EA3
31: */
32: public class AddCollectionCRIF extends CRIFImpl {
33:
34: /** Constructor. */
35: public AddCollectionCRIF() {
36: super ("addcollection");
37: }
38:
39: /**
40: * Creates a new instance of <code>AddCollectionOpImage</code>
41: * in the rendered layer.
42: *
43: * @param args A collection of rendered images to be added.
44: * @param hints Optionally contains destination image layout.
45: */
46: public RenderedImage create(ParameterBlock args,
47: RenderingHints renderHints) {
48: // Get ImageLayout from renderHints if any.
49: ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
50:
51: return new AddCollectionOpImage((Collection) args.getSource(0),
52: renderHints, layout);
53: }
54: }
|