1 /* Copyright (C) 1997, 2000 artofcode LLC.  All rights reserved.
2 
3   This program is free software; you can redistribute it and/or modify it
4   under the terms of the GNU General Public License as published by the
5   Free Software Foundation; either version 2 of the License, or (at your
6   option) any later version.
7 
8   This program is distributed in the hope that it will be useful, but
9   WITHOUT ANY WARRANTY; without even the implied warranty of
10   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11   General Public License for more details.
12 
13   You should have received a copy of the GNU General Public License along
14   with this program; if not, write to the Free Software Foundation, Inc.,
15   59 Temple Place, Suite 330, Boston, MA, 02111-1307.
16 
17 */
18 
19 /*$Id: gsiparm3.h,v 1.4.6.1.2.1 2003/01/17 00:49:02 giles Exp $ */
20 /* ImageType 3 image parameter definition */
21 
22 #ifndef gsiparm3_INCLUDED
23 #  define gsiparm3_INCLUDED
24 
25 #include "gsiparam.h"
26 
27 /*
28  * See Section 4.3 of the Adobe PostScript Version 3010 Supplement
29  * for a definition of ImageType 3 and 4 images.
30  */
31 
32 /*
33  * If InterleaveType is 3, the data source for the mask is provided as an
34  * additional data source *before* the data sources for the pixel data.  For
35  * both InterleaveType 2 and 3, the client is responsible for always
36  * providing mask data before the pixel data that it masks.  (The
37  * implementation does not currently check this, but it should.)
38  */
39 typedef enum {
40     interleave_chunky = 1,
41     interleave_scan_lines = 2,
42     interleave_separate_source = 3
43 } gs_image3_interleave_type_t;
44 typedef struct gs_image3_s {
45     gs_pixel_image_common;	/* DataDict */
46     int InterleaveType;
47     gs_data_image_t MaskDict;
48 } gs_image3_t;
49 
50 #define private_st_gs_image3()	/* in gximage3.c */\
51   gs_private_st_suffix_add0(st_gs_image3, gs_image3_t, "gs_image3_t",\
52     image3_enum_ptrs, image3_reloc_ptrs, st_gs_pixel_image)
53 
54 /*
55  * Initialize an ImageType 3 image.
56  */
57 void gs_image3_t_init(P3(gs_image3_t * pim, const gs_color_space * color_space,
58 			 gs_image3_interleave_type_t interleave_type));
59 
60 #endif /* gsiparm3_INCLUDED */
61