home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / program / gs300sr1 / gs300sr1.exe / GSPATH.H < prev    next >
Text File  |  1994-07-27  |  3KB  |  62 lines

  1. /* Copyright (C) 1989, 1992 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. /* gspath.h */
  20. /* Client interface to path manipulation facilities */
  21. /* Requires gsstate.h */
  22.  
  23. /* Path constructors */
  24. int    gs_newpath(P1(gs_state *)),
  25.     gs_moveto(P3(gs_state *, floatp, floatp)),
  26.     gs_rmoveto(P3(gs_state *, floatp, floatp)),
  27.     gs_lineto(P3(gs_state *, floatp, floatp)),
  28.     gs_rlineto(P3(gs_state *, floatp, floatp)),
  29.     gs_arc(P6(gs_state *, floatp, floatp, floatp, floatp, floatp)),
  30.     gs_arcn(P6(gs_state *, floatp, floatp, floatp, floatp, floatp)),
  31.     gs_arcto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, float [4])),
  32.     gs_curveto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, floatp)),
  33.     gs_rcurveto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, floatp)),
  34.     gs_closepath(P1(gs_state *));
  35.  
  36. /* Add the current path to the path in the previous graphics state. */
  37. int    gs_upmergepath(P1(gs_state *));
  38.  
  39. /* Path accessors and transformers */
  40. int    gs_currentpoint(P2(const gs_state *, gs_point *)),
  41.     gs_pathbbox(P2(gs_state *, gs_rect *)),
  42.     gs_flattenpath(P1(gs_state *)),
  43.     gs_reversepath(P1(gs_state *)),
  44.     gs_strokepath(P1(gs_state *));
  45.  
  46. /* Path enumeration */
  47. #define gs_pe_moveto 1
  48. #define gs_pe_lineto 2
  49. #define gs_pe_curveto 3
  50. #define gs_pe_closepath 4
  51. typedef struct gs_path_enum_s gs_path_enum;
  52. gs_path_enum *    gs_path_enum_alloc(P2(gs_memory_t *, client_name_t));
  53. int    gs_path_enum_init(P2(gs_path_enum *, const gs_state *));
  54. int    gs_path_enum_next(P2(gs_path_enum *, gs_point [3])); /* 0 when done */
  55. void    gs_path_enum_cleanup(P1(gs_path_enum *));
  56.  
  57. /* Clipping */
  58. int    gs_clippath(P1(gs_state *)),
  59.     gs_initclip(P1(gs_state *)),
  60.     gs_clip(P1(gs_state *)),
  61.     gs_eoclip(P1(gs_state *));
  62.