1 /* Copyright (C) 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: gximag3x.h,v 1.3.6.1.2.1 2003/01/17 00:49:04 giles Exp $ */ 20 /* ImageType 3x internal API */ 21 22 #ifndef gximag3x_INCLUDED 23 # define gximag3x_INCLUDED 24 25 #include "gsipar3x.h" 26 #include "gxiparam.h" 27 28 /* 29 * The machinery for splitting an ImageType3 image into pixel and mask data 30 * is used both for imaging per se and for writing high-level output. 31 * We implement this by making the procedures for setting up the mask image 32 * and clipping devices virtual. 33 */ 34 35 /* 36 * Make the mask image device -- the device that processes mask bits. 37 * The device is closed and freed at the end of processing the image. 38 */ 39 #define IMAGE3X_MAKE_MID_PROC(proc)\ 40 int proc(P6(gx_device **pmidev, gx_device *dev, int width, int height,\ 41 int depth, gs_memory_t *mem)) 42 typedef IMAGE3X_MAKE_MID_PROC((*image3x_make_mid_proc_t)); 43 44 /* 45 * Make the mask clip device -- the device that uses the mask image to 46 * clip the (opaque) image data -- and its enumerator. 47 * The device is closed and freed at the end of processing the image. 48 */ 49 #define IMAGE3X_MAKE_MCDE_PROC(proc)\ 50 int proc(P14(/* The initial arguments are those of begin_typed_image. */\ 51 gx_device *dev,\ 52 const gs_imager_state *pis,\ 53 const gs_matrix *pmat,\ 54 const gs_image_common_t *pic,\ 55 const gs_int_rect *prect,\ 56 const gx_drawing_color *pdcolor,\ 57 const gx_clip_path *pcpath, gs_memory_t *mem,\ 58 gx_image_enum_common_t **pinfo,\ 59 /* The following arguments are added. */\ 60 gx_device **pmcdev, gx_device *midev[2],\ 61 gx_image_enum_common_t *pminfo[2],\ 62 const gs_int_point origin[2],\ 63 const gs_image3x_t *pim)) 64 typedef IMAGE3X_MAKE_MCDE_PROC((*image3x_make_mcde_proc_t)); 65 66 /* 67 * Begin processing an ImageType 3x image, with the mask device creation 68 * procedures as additional parameters. 69 */ 70 int gx_begin_image3x_generic(P11(gx_device * dev, 71 const gs_imager_state *pis, 72 const gs_matrix *pmat, 73 const gs_image_common_t *pic, 74 const gs_int_rect *prect, 75 const gx_drawing_color *pdcolor, 76 const gx_clip_path *pcpath, gs_memory_t *mem, 77 IMAGE3X_MAKE_MID_PROC((*make_mid)), 78 IMAGE3X_MAKE_MCDE_PROC((*make_mcde)), 79 gx_image_enum_common_t **pinfo)); 80 81 #endif /* gximag3x_INCLUDED */ 82