1 /* Copyright (C) 2001 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: gdevpdfc.h,v 1.4 2002/05/07 19:56:46 lpd Exp $ */ 18 /* Internal color space writing interfaces for pdfwrite driver. */ 19 20 #ifndef gdevpdfc_INCLUDED 21 # define gdevpdfc_INCLUDED 22 23 /* ------ Exported by gdevpdfc.c for gdevpdfk.c ------ */ 24 25 /* Define the special cases for CIEBased spaces. */ 26 typedef enum { 27 ONE_STEP_NOT, /* not one-step */ 28 ONE_STEP_LMN, /* DecodeLMN (scalar cache) + matrix */ 29 ONE_STEP_ABC /* DecodeABC (vector cache) + matrix */ 30 } cie_cache_one_step_t; 31 32 /* 33 * Finish creating a CIE-based color space (Calxxx or Lab.) 34 */ 35 int pdf_finish_cie_space(cos_array_t *pca, cos_dict_t *pcd, 36 const gs_cie_common *pciec); 37 38 /* ------ Exported by gdevpdfk.c for gdevpdfc.c ------ */ 39 40 /* 41 * Create an ICCBased color space. This is a single-use procedure, 42 * broken out only for readability. 43 */ 44 int pdf_iccbased_color_space(gx_device_pdf *pdev, cos_value_t *pvalue, 45 const gs_color_space *pcs, cos_array_t *pca); 46 47 /* 48 * Convert a CIEBased space to Lab or ICCBased. 49 */ 50 int pdf_convert_cie_space(gx_device_pdf *pdev, cos_array_t *pca, 51 const gs_color_space *pcs, const char *dcsname, 52 const gs_cie_common *pciec, const gs_range *prange, 53 cie_cache_one_step_t one_step, 54 const gs_matrix3 *pmat, const gs_range_t **pprange); 55 56 /* 57 * Create a Lab color space object. 58 */ 59 int pdf_put_lab_color_space(cos_array_t *pca, cos_dict_t *pcd, 60 const gs_range ranges[3] /* only [1] and [2] used */); 61 62 #endif /* gdevpdfc_INCLUDED */ 63