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