gscompt.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved.
  2. This file is part of AFPL Ghostscript.
  3. AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author or
  4. distributor accepts any responsibility for the consequences of using it, or
  5. for whether it serves any particular purpose or works at all, unless he or
  6. she says so in writing. Refer to the Aladdin Free Public License (the
  7. "License") for full details.
  8. Every copy of AFPL Ghostscript must include a copy of the License, normally
  9. in a plain ASCII text file named PUBLIC. The License grants you the right
  10. to copy, modify and redistribute AFPL Ghostscript, but only under certain
  11. conditions described in the License. Among other things, the License
  12. requires that the copyright notice and this notice be preserved on all
  13. copies.
  14. */
  15. /*$Id: gscompt.h,v 1.2 2000/09/19 19:00:26 lpd Exp $ */
  16. /* Abstract types for compositing objects */
  17. #ifndef gscompt_INCLUDED
  18. # define gscompt_INCLUDED
  19. /*
  20. * Compositing is the next-to-last step in the rendering pipeline.
  21. * It occurs after color correction but before halftoning (if needed).
  22. *
  23. * gs_composite_t is the abstract superclass for compositing functions such
  24. * as RasterOp functions or alpha-based compositing. Concrete subclasses
  25. * must provide a default implementation (presumably based on
  26. * get_bits_rectangle and copy_color) for devices that provide no optimized
  27. * implementation of their own.
  28. *
  29. * A client that wants to produce composited output asks the target device
  30. * to create an appropriate compositing device based on the target device
  31. * and the gs_composite_t (and possibly other elements of the imager state).
  32. * If the target device doesn't have its own implementation for the
  33. * requested function, format, and state, it passes the buck to the
  34. * gs_composite_t, which may make further tests for special cases before
  35. * creating and returning a compositing device that uses the default
  36. * implementation.
  37. */
  38. typedef struct gs_composite_s gs_composite_t;
  39. /*
  40. * To enable fast cache lookup and equality testing, compositing functions,
  41. * like halftones, black generation functions, etc., carry a unique ID (time
  42. * stamp).
  43. */
  44. gs_id gs_composite_id(P1(const gs_composite_t * pcte));
  45. #endif /* gscompt_INCLUDED */