xref: /plan9/sys/src/cmd/gs/src/gsiparm3.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 1997, 2000 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: gsiparm3.h,v 1.7 2002/06/16 08:45:42 lpd Exp $ */
18 /* ImageType 3 image parameter definition */
19 
20 #ifndef gsiparm3_INCLUDED
21 #  define gsiparm3_INCLUDED
22 
23 #include "gsiparam.h"
24 
25 /*
26  * See Section 4.3 of the Adobe PostScript Version 3010 Supplement
27  * for a definition of ImageType 3 and 4 images.
28  */
29 
30 /*
31  * If InterleaveType is 3, the data source for the mask is provided as an
32  * additional data source *before* the data sources for the pixel data.  For
33  * both InterleaveType 2 and 3, the client is responsible for always
34  * providing mask data before the pixel data that it masks.  (The
35  * implementation does not currently check this, but it should.)
36  */
37 typedef enum {
38     interleave_chunky = 1,
39     interleave_scan_lines = 2,
40     interleave_separate_source = 3
41 } gs_image3_interleave_type_t;
42 typedef struct gs_image3_s {
43     gs_pixel_image_common;	/* DataDict */
44     int InterleaveType;
45     gs_data_image_t MaskDict;
46 } gs_image3_t;
47 
48 #define private_st_gs_image3()	/* in gximage3.c */\
49   gs_private_st_suffix_add0(st_gs_image3, gs_image3_t, "gs_image3_t",\
50     image3_enum_ptrs, image3_reloc_ptrs, st_gs_pixel_image)
51 
52 /*
53  * Initialize an ImageType 3 image.
54  */
55 void gs_image3_t_init(gs_image3_t * pim, const gs_color_space * color_space,
56 		      gs_image3_interleave_type_t interleave_type);
57 
58 #endif /* gsiparm3_INCLUDED */
59