xref: /plan9/sys/src/cmd/gs/src/gxoprect.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 2002 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: gxoprect.h,v 1.2 2004/01/29 18:19:41 ray Exp $ */
18 /* geneic overprint fill rectangle interface */
19 
20 #ifndef gxoprect_INCLUDED
21 #define gxoprect_INCLUDED
22 
23 /*
24  * Perform the fill rectangle operation for a non-separable color encoding
25  * that requires overprint support.
26  *
27  * Returns 0 on success, < 0 in the event of an error.
28  */
29 extern  int     gx_overprint_generic_fill_rectangle(
30     gx_device *             tdev,
31     gx_color_index          drawn_comps,
32     int                     x,
33     int                     y,
34     int                     w,
35     int                     h,
36     gx_color_index          color,
37     gs_memory_t *           mem );
38 
39 /*
40  * Perform the fill rectangle operation of a separable color encoding.
41  * There are two versions of this routine: ..._1 for cases in which the
42  * color depth is a divisor of 8 * sizeof(mono_fill_chunk), and ..._2 if
43  * this is not the case (most typically if the depth == 24).
44  *
45  * For both cases, the color and retain_mask values passed to this
46  * procedure are expected to be already swapped as required for a byte-
47  * oriented bitmap. This consideration affects only little-endian
48  * machines. For those machines, if depth > 9 the color passed to these
49  * two procedures will not be the same as that passed to
50  * gx_overprint_generic_fill_rectangle.
51  *
52  * Returns 0 on success, < 0 in the event of an error.
53  */
54 extern  int     gx_overprint_sep_fill_rectangle_1(
55     gx_device *             tdev,
56     gx_color_index          retain_mask,    /* already swapped */
57     int                     x,
58     int                     y,
59     int                     w,
60     int                     h,
61     gx_color_index          color,          /* already swapped */
62     gs_memory_t *           mem );
63 
64 extern  int     gx_overprint_sep_fill_rectangle_2(
65     gx_device *             tdev,
66     gx_color_index          retain_mask,    /* already swapped */
67     int                     x,
68     int                     y,
69     int                     w,
70     int                     h,
71     gx_color_index          color,          /* already swapped */
72     gs_memory_t *           mem );
73 
74 #endif  /* gxoprect_INCLUDED */
75