home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / UsingPDF / GhostScript / source / gs5.10 / gsfunc0.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-27  |  2.1 KB  |  60 lines

  1. /* Copyright (C) 1997 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17. */
  18.  
  19. /* gsfunc0.h */
  20. /* Definitions for FunctionType 0 (Sampled) Functions */
  21.  
  22. #ifndef gsfunc0_INCLUDED
  23. #  define gsfunc0_INCLUDED
  24.  
  25. #include "gsfunc.h"
  26. #include "gsdsrc.h"
  27.  
  28. /* ---------------- Types and structures ---------------- */
  29.  
  30. /* Define the Function type. */
  31. #define function_type_Sampled 0
  32.  
  33. /* Define Sampled functions. */
  34. typedef struct gs_function_Sd_params_s {
  35.   gs_function_params_common;
  36.   int Order;            /* 1 or 3, optional */
  37.   gs_data_source_t DataSource;
  38.   int BitsPerSample;        /* 1, 2, 4, 8, 12, 16, 24, 32 */
  39.   const float *Encode;        /* 2 x m, optional */
  40.   const float *Decode;        /* 2 x n, optional */
  41.   const int *Size;        /* m */
  42. } gs_function_Sd_params_t;
  43. #define private_st_function_Sd()    /* in gsfunc.c */\
  44.   gs_private_st_suffix_add3(st_function_Sd, gs_function_Sd_t,\
  45.     "gs_function_Sd_t", function_Sd_enum_ptrs, function_Sd_reloc_ptrs,\
  46.     st_function, params.Encode, params.Decode, params.Size)
  47.  
  48. /* ---------------- Procedures ---------------- */
  49.  
  50. /* Allocate and initialize a Sampled function. */
  51. int gs_function_Sd_init(P3(gs_function_t **ppfn,
  52.                const gs_function_Sd_params_t *params,
  53.                gs_memory_t *mem));
  54.  
  55. /* Free the parameters of a Sampled function. */
  56. void gs_function_Sd_free_params(P2(gs_function_Sd_params_t *params,
  57.                    gs_memory_t *mem));
  58.  
  59. #endif                    /* gsfunc0_INCLUDED */
  60.