1. /*
  2. * @(#)RenderedImageFactory.java 1.6 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. /* ********************************************************************
  8. **********************************************************************
  9. **********************************************************************
  10. *** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
  11. *** As an unpublished work pursuant to Title 17 of the United ***
  12. *** States Code. All rights reserved. ***
  13. **********************************************************************
  14. **********************************************************************
  15. **********************************************************************/
  16. package java.awt.image.renderable;
  17. import java.awt.image.RenderedImage;
  18. import java.awt.RenderingHints;
  19. /**
  20. * The RenderedImageFactory interface (often abbreviated RIF) is
  21. * intended to be implemented by classes that wish to act as factories
  22. * to produce different renderings, for example by executing a series
  23. * of BufferedImageOps on a set of sources, depending on a specific
  24. * set of parameters, properties, and rendering hints.
  25. */
  26. public interface RenderedImageFactory {
  27. /**
  28. * Creates a RenderedImage representing the results of an imaging
  29. * operation (or chain of operations) for a given ParameterBlock and
  30. * RenderingHints. The RIF may also query any source images
  31. * referenced by the ParameterBlock for their dimensions,
  32. * SampleModels, properties, etc., as necessary.
  33. *
  34. * <p> The create() method can return null if the
  35. * RenderedImageFactory is not capable of producing output for the
  36. * given set of source images and parameters. For example, if a
  37. * RenderedImageFactory is only capable of performing a 3x3
  38. * convolution on single-banded image data, and the source image has
  39. * multiple bands or the convolution Kernel is 5x5, null should be
  40. * returned.
  41. *
  42. * <p> Hints should be taken into account, but can be ignored.
  43. * The created RenderedImage may have a property identified
  44. * by the String HINTS_OBSERVED to indicate which RenderingHints
  45. * were used to create the image. In addition any RenderedImages
  46. * that are obtained via the getSources() method on the created
  47. * RenderedImage may have such a property.
  48. *
  49. * @param paramBlock a ParameterBlock containing sources and parameters
  50. * for the RenderedImage to be created.
  51. * @param hints a RenderingHints object containing hints.
  52. * @return A RenderedImage containing the desired output.
  53. */
  54. RenderedImage create(ParameterBlock paramBlock,
  55. RenderingHints hints);
  56. }