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