xref: /plan9/sys/src/cmd/gs/src/gsropc.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 1998 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: gsropc.h,v 1.5 2002/06/16 08:45:42 lpd Exp $ */
18 /* RasterOp-compositing interface */
19 
20 #ifndef gsropc_INCLUDED
21 #  define gsropc_INCLUDED
22 
23 #include "gscompt.h"
24 #include "gsropt.h"
25 
26 /*
27  * Define parameters for RasterOp-compositing.
28  * There are two kinds of RasterOp compositing operations.
29  * If texture == 0, the input data are the texture, and the source is
30  * implicitly all 0 (black).  If texture != 0, it defines the texture,
31  * and the input data are the source.  Note that in the latter case,
32  * the client (the caller of gs_create_composite_rop) promises that
33  * *texture will not change.
34  */
35 
36 #ifndef gx_device_color_DEFINED
37 #  define gx_device_color_DEFINED
38 typedef struct gx_device_color_s gx_device_color;
39 
40 #endif
41 
42 typedef struct gs_composite_rop_params_s {
43     gs_logical_operation_t log_op;
44     const gx_device_color *texture;
45 } gs_composite_rop_params_t;
46 
47 /* Create a RasterOp-compositing object. */
48 int gs_create_composite_rop(gs_composite_t ** ppcte,
49 			    const gs_composite_rop_params_t * params,
50 			    gs_memory_t * mem);
51 
52 #endif /* gsropc_INCLUDED */
53