home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / program / gs300sr1 / gs300sr1.exe / GSCOLOR2.H < prev    next >
C/C++ Source or Header  |  1994-07-27  |  3KB  |  67 lines

  1. /* Copyright (C) 1992, 1993 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. /* gscolor2.h */
  20. /* Client interface to Level 2 color facilities */
  21. /* (requires gscspace.h, gsmatrix.h) */
  22. #include "gsccolor.h"
  23. #include "gsuid.h"        /* for pattern template */
  24.  
  25. /* Note: clients should use rc_alloc_struct_0 (in gsrefct.h) to allocate */
  26. /* CIE color spaces or rendering structures; makepattern uses */
  27. /* rc_alloc_struct_1 to allocate pattern instances. */
  28.  
  29. /* General color routines */
  30. const gs_color_space *gs_currentcolorspace(P1(const gs_state *));
  31. int    gs_setcolorspace(P2(gs_state *, gs_color_space *));
  32. const gs_client_color *gs_currentcolor(P1(const gs_state *));
  33. int    gs_setcolor(P2(gs_state *, const gs_client_color *));
  34. int    gs_currentoverprint(P1(const gs_state *));
  35. void    gs_setoverprint(P2(gs_state *, int));
  36.  
  37. /* CIE-specific routines */
  38. #ifndef gs_cie_render_DEFINED
  39. #  define gs_cie_render_DEFINED
  40. typedef struct gs_cie_render_s gs_cie_render;
  41. #endif
  42. const gs_cie_render *gs_currentcolorrendering(P1(const gs_state *));
  43. int    gs_setcolorrendering(P2(gs_state *, gs_cie_render *));
  44.  
  45. /* Pattern template */
  46. typedef struct gs_client_pattern_s {
  47.     gs_uid uid;        /* XUID or nothing */
  48.     int PaintType;
  49.     int TilingType;
  50.     gs_rect BBox;
  51.     float XStep;
  52.     float YStep;
  53.     int (*PaintProc)(P2(const gs_client_color *, gs_state *));
  54.     void *client_data;        /* additional client data */
  55. } gs_client_pattern;
  56. #define private_st_client_pattern() /* in gspcolor.c */\
  57.   gs_private_st_ptrs1(st_client_pattern, gs_client_pattern,\
  58.     "client pattern", client_pattern_enum_ptrs, client_pattern_reloc_ptrs,\
  59.     client_data)
  60. #define st_client_pattern_max_ptrs 1
  61.  
  62. /* Pattern-specific routines */
  63. int    gs_makepattern(P4(gs_client_color *, const gs_client_pattern *, const gs_matrix *, gs_state *));
  64. int    gs_setpattern(P2(gs_state *, const gs_client_color *));
  65. int    gs_setpatternspace(P1(gs_state *));
  66. const gs_client_pattern    *gs_getpattern(P1(const gs_client_color *));
  67.