gsstate.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved.
  2. This software is provided AS-IS with no warranty, either express or
  3. implied.
  4. This software is distributed under license and may not be copied,
  5. modified or distributed except as expressly authorized under the terms
  6. of the license contained in the file LICENSE in this distribution.
  7. For more information about licensing, please refer to
  8. http://www.ghostscript.com/licensing/. For information on
  9. commercial licensing, go to http://www.artifex.com/licensing/ or
  10. contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  11. San Rafael, CA 94903, U.S.A., +1(415)492-9861.
  12. */
  13. /* $Id: gsstate.h,v 1.9 2003/06/16 15:04:50 igor Exp $ */
  14. /* Public graphics state API */
  15. #ifndef gsstate_INCLUDED
  16. # define gsstate_INCLUDED
  17. /* Opaque type for a graphics state */
  18. #ifndef gs_state_DEFINED
  19. # define gs_state_DEFINED
  20. typedef struct gs_state_s gs_state;
  21. #endif
  22. /* opague type for overprint compositor parameters */
  23. #ifndef gs_overprint_params_t_DEFINED
  24. # define gs_overprint_params_t_DEFINED
  25. typedef struct gs_overprint_params_s gs_overprint_params_t;
  26. #endif
  27. /* Initial allocation and freeing */
  28. gs_state *gs_state_alloc(gs_memory_t *); /* 0 if fails */
  29. int gs_state_free(gs_state *);
  30. /* Initialization, saving, restoring, and copying */
  31. int gs_gsave(gs_state *), gs_grestore(gs_state *), gs_grestoreall(gs_state *);
  32. int gs_grestore_only(gs_state *);
  33. int gs_gsave_for_save(gs_state *, gs_state **), gs_grestoreall_for_restore(gs_state *, gs_state *);
  34. gs_state *gs_gstate(gs_state *);
  35. gs_state *gs_state_copy(gs_state *, gs_memory_t *);
  36. int gs_copygstate(gs_state * /*to */ , const gs_state * /*from */ ),
  37. gs_currentgstate(gs_state * /*to */ , const gs_state * /*from */ ),
  38. gs_setgstate(gs_state * /*to */ , const gs_state * /*from */ );
  39. int gs_state_update_overprint(gs_state *, const gs_overprint_params_t *);
  40. bool gs_currentoverprint(const gs_state *);
  41. void gs_setoverprint(gs_state *, bool);
  42. int gs_currentoverprintmode(const gs_state *);
  43. int gs_setoverprintmode(gs_state *, int);
  44. int gs_do_set_overprint(gs_state *);
  45. int gs_initgraphics(gs_state *);
  46. /* Device control */
  47. #include "gsdevice.h"
  48. /* Line parameters and quality */
  49. #include "gsline.h"
  50. /* Color and gray */
  51. #include "gscolor.h"
  52. /* Halftone screen */
  53. #include "gsht.h"
  54. #include "gscsel.h"
  55. int gs_setscreenphase(gs_state *, int, int, gs_color_select_t);
  56. int gs_currentscreenphase(const gs_state *, gs_int_point *, gs_color_select_t);
  57. #define gs_sethalftonephase(pgs, px, py)\
  58. gs_setscreenphase(pgs, px, py, gs_color_select_all)
  59. #define gs_currenthalftonephase(pgs, ppt)\
  60. gs_currentscreenphase(pgs, ppt, 0)
  61. int gx_imager_setscreenphase(gs_imager_state *, int, int, gs_color_select_t);
  62. /* Miscellaneous */
  63. int gs_setfilladjust(gs_state *, floatp, floatp);
  64. int gs_currentfilladjust(const gs_state *, gs_point *);
  65. void gs_setlimitclamp(gs_state *, bool);
  66. bool gs_currentlimitclamp(const gs_state *);
  67. void gs_settextrenderingmode(gs_state * pgs, uint trm);
  68. uint gs_currenttextrenderingmode(const gs_state * pgs);
  69. #include "gscpm.h"
  70. gs_in_cache_device_t gs_incachedevice(const gs_state *);
  71. #endif /* gsstate_INCLUDED */