home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / g / gs252src.zip / GS252 / GSPATH.H < prev    next >
C/C++ Source or Header  |  1992-03-06  |  3KB  |  62 lines

  1. /* Copyright (C) 1989, 1992 Aladdin Enterprises.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.  */
  19.  
  20. /* gspath.h */
  21. /* Path manipulation interface for GhostScript library */
  22. /* Requires gsstate.h */
  23.  
  24. /* Path constructors */
  25. extern    int    gs_newpath(P1(gs_state *)),
  26.         gs_moveto(P3(gs_state *, floatp, floatp)),
  27.         gs_rmoveto(P3(gs_state *, floatp, floatp)),
  28.         gs_lineto(P3(gs_state *, floatp, floatp)),
  29.         gs_rlineto(P3(gs_state *, floatp, floatp)),
  30.         gs_arc(P6(gs_state *, floatp, floatp, floatp, floatp, floatp)),
  31.         gs_arcn(P6(gs_state *, floatp, floatp, floatp, floatp, floatp)),
  32.         gs_arcto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, float [4])),
  33.         gs_curveto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, floatp)),
  34.         gs_rcurveto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, floatp)),
  35.         gs_closepath(P1(gs_state *));
  36.  
  37. /* Add the current path to the path in the previous graphics state. */
  38. extern    int    gs_upmergepath(P1(gs_state *));
  39.  
  40. /* Path accessors and transformers */
  41. extern    int    gs_currentpoint(P2(const gs_state *, gs_point *)),
  42.         gs_pathbbox(P2(gs_state *, gs_rect *)),
  43.         gs_flattenpath(P1(gs_state *)),
  44.         gs_reversepath(P1(gs_state *)),
  45.         gs_strokepath(P1(gs_state *));
  46.  
  47. /* Path enumeration */
  48. #define gs_pe_moveto 1
  49. #define gs_pe_lineto 2
  50. #define gs_pe_curveto 3
  51. #define gs_pe_closepath 4
  52. typedef struct gs_path_enum_s gs_path_enum;
  53. extern const uint gs_path_enum_sizeof;
  54. void    gs_path_enum_init(P2(gs_path_enum *, const gs_state *));
  55. int    gs_path_enum_next(P2(gs_path_enum *, gs_point [3])); /* 0 when done */
  56.  
  57. /* Clipping */
  58. extern    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.