1
/* Copyright (C) 2001-2006 Artifex Software, Inc.
4
This software is provided AS-IS with no warranty, either express or
7
This software is distributed under license and may not be copied, modified
8
or distributed except as expressly authorized under the terms of that
9
license. Refer to licensing information at http://www.artifex.com/
10
or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
11
San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
14
/* $Id: gximag3x.h 8022 2007-06-05 22:23:38Z giles $ */
15
/* ImageType 3x internal API */
17
#ifndef gximag3x_INCLUDED
18
# define gximag3x_INCLUDED
24
* The machinery for splitting an ImageType3 image into pixel and mask data
25
* is used both for imaging per se and for writing high-level output.
26
* We implement this by making the procedures for setting up the mask image
27
* and clipping devices virtual.
31
* Make the mask image device -- the device that processes mask bits.
32
* The device is closed and freed at the end of processing the image.
34
#define IMAGE3X_MAKE_MID_PROC(proc)\
35
int proc(gx_device **pmidev, gx_device *dev, int width, int height,\
36
int depth, gs_memory_t *mem)
37
typedef IMAGE3X_MAKE_MID_PROC((*image3x_make_mid_proc_t));
40
* Make the mask clip device -- the device that uses the mask image to
41
* clip the (opaque) image data -- and its enumerator.
42
* The device is closed and freed at the end of processing the image.
44
#define IMAGE3X_MAKE_MCDE_PROC(proc)\
45
int proc(/* The initial arguments are those of begin_typed_image. */\
47
const gs_imager_state *pis,\
48
const gs_matrix *pmat,\
49
const gs_image_common_t *pic,\
50
const gs_int_rect *prect,\
51
const gx_drawing_color *pdcolor,\
52
const gx_clip_path *pcpath, gs_memory_t *mem,\
53
gx_image_enum_common_t **pinfo,\
54
/* The following arguments are added. */\
55
gx_device **pmcdev, gx_device *midev[2],\
56
gx_image_enum_common_t *pminfo[2],\
57
const gs_int_point origin[2],\
58
const gs_image3x_t *pim)
59
typedef IMAGE3X_MAKE_MCDE_PROC((*image3x_make_mcde_proc_t));
62
* Begin processing an ImageType 3x image, with the mask device creation
63
* procedures as additional parameters.
65
int gx_begin_image3x_generic(gx_device * dev,
66
const gs_imager_state *pis,
67
const gs_matrix *pmat,
68
const gs_image_common_t *pic,
69
const gs_int_rect *prect,
70
const gx_drawing_color *pdcolor,
71
const gx_clip_path *pcpath, gs_memory_t *mem,
72
IMAGE3X_MAKE_MID_PROC((*make_mid)),
73
IMAGE3X_MAKE_MCDE_PROC((*make_mcde)),
74
gx_image_enum_common_t **pinfo);
76
#endif /* gximag3x_INCLUDED */