2 |
- |
1 |
/* Copyright (C) 1997 Aladdin Enterprises. All rights reserved.
|
|
|
2 |
|
|
|
3 |
This software is provided AS-IS with no warranty, either express or
|
|
|
4 |
implied.
|
|
|
5 |
|
|
|
6 |
This software is distributed under license and may not be copied,
|
|
|
7 |
modified or distributed except as expressly authorized under the terms
|
|
|
8 |
of the license contained in the file LICENSE in this distribution.
|
|
|
9 |
|
|
|
10 |
For more information about licensing, please refer to
|
|
|
11 |
http://www.ghostscript.com/licensing/. For information on
|
|
|
12 |
commercial licensing, go to http://www.artifex.com/licensing/ or
|
|
|
13 |
contact Artifex Software, Inc., 101 Lucas Valley Road #110,
|
|
|
14 |
San Rafael, CA 94903, U.S.A., +1(415)492-9861.
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
/* $Id: gscompt.h,v 1.5 2002/06/16 08:45:42 lpd Exp $ */
|
|
|
18 |
/* Abstract types for compositing objects */
|
|
|
19 |
|
|
|
20 |
#ifndef gscompt_INCLUDED
|
|
|
21 |
# define gscompt_INCLUDED
|
|
|
22 |
|
|
|
23 |
/*
|
|
|
24 |
* Compositing is the next-to-last step in the rendering pipeline.
|
|
|
25 |
* It occurs after color correction but before halftoning (if needed).
|
|
|
26 |
*
|
|
|
27 |
* gs_composite_t is the abstract superclass for compositing functions such
|
|
|
28 |
* as RasterOp functions or alpha-based compositing. Concrete subclasses
|
|
|
29 |
* must provide a default implementation (presumably based on
|
|
|
30 |
* get_bits_rectangle and copy_color) for devices that provide no optimized
|
|
|
31 |
* implementation of their own.
|
|
|
32 |
*
|
|
|
33 |
* A client that wants to produce composited output asks the target device
|
|
|
34 |
* to create an appropriate compositing device based on the target device
|
|
|
35 |
* and the gs_composite_t (and possibly other elements of the imager state).
|
|
|
36 |
* If the target device doesn't have its own implementation for the
|
|
|
37 |
* requested function, format, and state, it passes the buck to the
|
|
|
38 |
* gs_composite_t, which may make further tests for special cases before
|
|
|
39 |
* creating and returning a compositing device that uses the default
|
|
|
40 |
* implementation.
|
|
|
41 |
*/
|
|
|
42 |
typedef struct gs_composite_s gs_composite_t;
|
|
|
43 |
|
|
|
44 |
/*
|
|
|
45 |
* To enable fast cache lookup and equality testing, compositing functions,
|
|
|
46 |
* like halftones, black generation functions, etc., carry a unique ID (time
|
|
|
47 |
* stamp).
|
|
|
48 |
*/
|
|
|
49 |
gs_id gs_composite_id(const gs_composite_t * pcte);
|
|
|
50 |
|
|
|
51 |
#endif /* gscompt_INCLUDED */
|